diff --git a/src/components/ContainerDetailsSubheader.react.js b/src/components/ContainerDetailsSubheader.react.js index b793e8332b..fd18ab2c25 100644 --- a/src/components/ContainerDetailsSubheader.react.js +++ b/src/components/ContainerDetailsSubheader.react.js @@ -87,6 +87,16 @@ var ContainerDetailsSubheader = React.createClass({ containerActions.start(this.props.container.Name); } }, + handleDocs: function () { + let repoUri = 'https://hub.docker.com/r/'; + let imageName = this.props.container.Config.Image.split(':')[0]; + if (imageName.indexOf('/') === -1) { + repoUri = repoUri + 'library/' + imageName; + } else { + repoUri = repoUri + imageName; + } + shell.openExternal(repoUri); + }, handleTerminal: function () { if (!this.disableTerminal()) { metrics.track('Terminaled Into Container'); @@ -119,6 +129,10 @@ var ContainerDetailsSubheader = React.createClass({ action: true, disabled: this.disableTerminal() }); + var docsActionClass = classNames({ + action: true, + disabled: false + }); var currentRoutes = _.map(this.context.router.getCurrentRoutes(), r => r.name); var currentRoute = _.last(currentRoutes); @@ -149,6 +163,7 @@ var ContainerDetailsSubheader = React.createClass({ ); } + return (