mirror of https://github.com/docker/docs.git
Hide folders if there are no volumes.
This commit is contained in:
parent
bebb2395f9
commit
903c90e997
|
@ -17,6 +17,7 @@ var ContainerHomeFolder = React.createClass({
|
|||
},
|
||||
render: function () {
|
||||
var folders;
|
||||
console.log(_.keys(this.props.container.Volumes));
|
||||
if (this.props.container) {
|
||||
var self = this;
|
||||
folders = _.map(self.props.container.Volumes, function (val, key) {
|
||||
|
@ -33,15 +34,21 @@ var ContainerHomeFolder = React.createClass({
|
|||
}
|
||||
});
|
||||
}
|
||||
return (
|
||||
<div className="folders wrapper">
|
||||
<h4>Edit Files</h4>
|
||||
<div className="widget">
|
||||
{folders}
|
||||
if (this.props.container && _.keys(this.props.container.Volumes).length > 0 && this.props.container.State.Running) {
|
||||
return (
|
||||
<div className="folders wrapper">
|
||||
<h4>Edit Files</h4>
|
||||
<div className="widget">
|
||||
{folders}
|
||||
</div>
|
||||
<div className="subtext" onClick={this.handleClickChangeFolders}>Change Folders</div>
|
||||
</div>
|
||||
<div className="subtext" onClick={this.handleClickChangeFolders}>Change Folders</div>
|
||||
</div>
|
||||
);
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
<div></div>
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -150,6 +150,7 @@
|
|||
position: relative;
|
||||
top: 0px;
|
||||
padding: 3px 5px;
|
||||
text-decoration: underline;
|
||||
&:hover {
|
||||
background-color: @brand-action;
|
||||
color: white;
|
||||
|
|
Loading…
Reference in New Issue