mirror of https://github.com/docker/docs.git
Settings and container ip and ports widget.
This commit is contained in:
parent
7375216f19
commit
cad849b74e
|
@ -66,14 +66,14 @@ var ContainerHomePreview = React.createClass({
|
|||
</div>
|
||||
);
|
||||
} else {
|
||||
var ports = _.map(_.pairs(this.props.ports), function (pair) {
|
||||
var ports = _.map(_.pairs(this.props.ports), pair => {
|
||||
var key = pair[0];
|
||||
var val = pair[1];
|
||||
return (
|
||||
<div key={key} className="table-values">
|
||||
<span className="value-left">{key}</span><span className="icon icon-arrow-right"></span>
|
||||
<span className="value-right">{val.display}</span>
|
||||
</div>
|
||||
<tr key={key}>
|
||||
<td>{key}</td>
|
||||
<td>{val.display}</td>
|
||||
</tr>
|
||||
);
|
||||
});
|
||||
|
||||
|
@ -87,13 +87,17 @@ var ContainerHomePreview = React.createClass({
|
|||
</div>
|
||||
</div>
|
||||
<p>You can access this container using the following IP address and port:</p>
|
||||
<div className="table ports">
|
||||
<div className="table-labels">
|
||||
<div className="label-left">DOCKER PORT</div>
|
||||
<div className="label-right">MAC PORT</div>
|
||||
</div>
|
||||
{ports}
|
||||
</div>
|
||||
<table className="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>DOCKER PORT</th>
|
||||
<th>MAC PORT</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{ports}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
@ -62,7 +62,7 @@ var ContainerSettingsPorts = React.createClass({
|
|||
<div className="settings-panel">
|
||||
<div className="settings-section">
|
||||
<h3>Configure Ports</h3>
|
||||
<table className="table">
|
||||
<table className="table ports">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>DOCKER PORT</th>
|
||||
|
|
|
@ -72,7 +72,7 @@ var ContainerSettingsVolumes = React.createClass({
|
|||
<div className="settings-panel">
|
||||
<div className="settings-section">
|
||||
<h3>Configure Volumes</h3>
|
||||
<table className="table">
|
||||
<table className="table volumes">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>DOCKER FOLDER</th>
|
||||
|
|
|
@ -37,55 +37,32 @@
|
|||
padding-bottom: 0px;
|
||||
}
|
||||
.table {
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
.icon-arrow-right {
|
||||
color: #BBB;
|
||||
font-size: 13px;
|
||||
margin: 0px 8px;
|
||||
position: relative;
|
||||
top: 2px;
|
||||
flex: 0 auto;
|
||||
min-width: 13px;
|
||||
}
|
||||
&.ports {
|
||||
.table-labels {
|
||||
margin-top: 20px;
|
||||
flex: 1 auto;
|
||||
display: flex;
|
||||
font-size: 10px;
|
||||
color: @gray-light;
|
||||
.label-left {
|
||||
flex: 0 auto;
|
||||
min-width: 60px;
|
||||
margin-right: 30px;
|
||||
text-align: right;
|
||||
}
|
||||
.label-right {
|
||||
flex: 1 auto;
|
||||
display: inline-block;
|
||||
color: @gray-normal;
|
||||
font-size: 12px;
|
||||
margin-left: 0.2rem;
|
||||
max-width: 300px;
|
||||
tr {
|
||||
&:first-child {
|
||||
td {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
.table-values {
|
||||
flex: 1 auto;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
margin: 8px 0;
|
||||
font-size: 12px;
|
||||
.value-left {
|
||||
td {
|
||||
border-color: @color-divider;
|
||||
&.right {
|
||||
text-align: right;
|
||||
min-width: 70px;
|
||||
flex: 0 auto;
|
||||
padding: 0px;
|
||||
}
|
||||
.value-right {
|
||||
flex: 1 auto;
|
||||
-webkit-user-select: text;
|
||||
max-width: 170px;
|
||||
padding: 0px;
|
||||
}
|
||||
}
|
||||
}
|
||||
th {
|
||||
font-size: 10px;
|
||||
color: @gray-lighter;
|
||||
font-weight: 500;
|
||||
border: none;
|
||||
&.right {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
.frame {
|
||||
padding-top: 8rem;
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
outline: none;
|
||||
&.active {
|
||||
li {
|
||||
font-weight: 500;
|
||||
border-bottom: 2px solid @brand-primary;
|
||||
color: @gray-darkest;
|
||||
}
|
||||
|
@ -110,6 +111,12 @@
|
|||
}
|
||||
}
|
||||
.table {
|
||||
&.ports {
|
||||
max-width: 500px;
|
||||
}
|
||||
&.volumes {
|
||||
max-width: 100%;
|
||||
}
|
||||
color: @gray-normal;
|
||||
tr {
|
||||
&:first-child {
|
||||
|
|
Loading…
Reference in New Issue