From 52f388fce65e494b5e5defc121bce628dabcfa1a Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Tue, 26 May 2015 09:47:28 -0700 Subject: [PATCH] Check for library namespace instead of is_official flag --- src/components/ImageCard.react.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/ImageCard.react.js b/src/components/ImageCard.react.js index eaf3b6c5..5a94d488 100644 --- a/src/components/ImageCard.react.js +++ b/src/components/ImageCard.react.js @@ -48,8 +48,8 @@ var ImageCard = React.createClass({ metrics.track('Created Container', { from: 'search', private: this.props.image.is_private, - official: this.props.image.is_official, - user_repo: this.props.image.is_user_repo, + official: this.props.image.namespace === 'library', + userowned: this.props.image.is_user_repo, recommended: this.props.image.is_recommended }); let name = containerStore.generateName(this.props.image.name); @@ -68,7 +68,7 @@ var ImageCard = React.createClass({ }, handleRepoClick: function () { var repoUri = 'https://registry.hub.docker.com/'; - if (this.props.image.is_official) { + if (this.props.image.namespace === 'library') { repoUri = repoUri + '_/' + this.props.image.name; } else { repoUri = repoUri + 'u/' + this.props.image.namespace + '/' + this.props.image.name;