Check for library namespace instead of is_official flag

This commit is contained in:
Jeffrey Morgan 2015-05-26 09:47:28 -07:00
parent 38cf06f111
commit 52f388fce6
1 changed files with 3 additions and 3 deletions

View File

@ -48,8 +48,8 @@ var ImageCard = React.createClass({
metrics.track('Created Container', { metrics.track('Created Container', {
from: 'search', from: 'search',
private: this.props.image.is_private, private: this.props.image.is_private,
official: this.props.image.is_official, official: this.props.image.namespace === 'library',
user_repo: this.props.image.is_user_repo, userowned: this.props.image.is_user_repo,
recommended: this.props.image.is_recommended recommended: this.props.image.is_recommended
}); });
let name = containerStore.generateName(this.props.image.name); let name = containerStore.generateName(this.props.image.name);
@ -68,7 +68,7 @@ var ImageCard = React.createClass({
}, },
handleRepoClick: function () { handleRepoClick: function () {
var repoUri = 'https://registry.hub.docker.com/'; 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; repoUri = repoUri + '_/' + this.props.image.name;
} else { } else {
repoUri = repoUri + 'u/' + this.props.image.namespace + '/' + this.props.image.name; repoUri = repoUri + 'u/' + this.props.image.namespace + '/' + this.props.image.name;