1
0
mirror of https://github.com/docker/docs.git synced 2026-11-05 00:14:17 +03:00

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

View File

@@ -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;