diff --git a/src/components/ContainerDetailsSubheader.react.js b/src/components/ContainerDetailsSubheader.react.js
index e4793d6d5b..e53204bd90 100644
--- a/src/components/ContainerDetailsSubheader.react.js
+++ b/src/components/ContainerDetailsSubheader.react.js
@@ -1,16 +1,9 @@
-var $ = require('jquery');
var _ = require('underscore');
var React = require('react');
-var exec = require('exec');
var shell = require('shell');
var metrics = require('../utils/MetricsUtil');
var ContainerUtil = require('../utils/ContainerUtil');
-var util = require('../utils/Util');
-var machine = require('../utils/DockerMachineUtil');
-var RetinaImage = require('react-retina-image');
var classNames = require('classnames');
-var resources = require('../utils/ResourcesUtil');
-var dockerUtil = require('../utils/DockerUtil');
var containerActions = require('../actions/ContainerActions');
var dockerMachineUtil = require('../utils/DockerMachineUtil');
diff --git a/src/components/ContainerSettings.react.js b/src/components/ContainerSettings.react.js
index 70f1faecc3..def09db363 100644
--- a/src/components/ContainerSettings.react.js
+++ b/src/components/ContainerSettings.react.js
@@ -55,6 +55,11 @@ var ContainerSettings = React.createClass({
Volumes
+
+
+ Advanced
+
+
diff --git a/src/components/ContainerSettingsAdvanced.react.js b/src/components/ContainerSettingsAdvanced.react.js
new file mode 100644
index 0000000000..c041445472
--- /dev/null
+++ b/src/components/ContainerSettingsAdvanced.react.js
@@ -0,0 +1,60 @@
+var React = require('react/addons');
+var metrics = require('../utils/MetricsUtil');
+var ContainerUtil = require('../utils/ContainerUtil');
+var containerActions = require('../actions/ContainerActions');
+
+var ContainerSettingsAdvanced = React.createClass({
+ mixins: [React.addons.LinkedStateMixin],
+
+ contextTypes: {
+ router: React.PropTypes.func
+ },
+
+ getInitialState: function () {
+ let [tty, openStdin] = ContainerUtil.mode(this.props.container) || [true, true];
+ return {
+ tty: tty,
+ openStdin: openStdin
+ };
+ },
+
+ handleSaveAdvancedOptions: function () {
+ metrics.track('Saved Advanced Options');
+ let tty = this.state.tty;
+ let openStdin = this.state.openStdin;
+ containerActions.update(this.props.container.Name, {Tty: tty, OpenStdin: openStdin});
+ },
+
+ handleChangeTty: function () {
+ this.setState({
+ tty: !this.state.tty
+ });
+ },
+
+ handleChangeOpenStdin: function () {
+ this.setState({
+ openStdin: !this.state.openStdin
+ });
+ },
+
+ render: function () {
+ if (!this.props.container) {
+ return false;
+ }
+
+ return (
+
+
+
Advanced Options
+
+
Save
+
+
+ );
+ }
+});
+
+module.exports = ContainerSettingsAdvanced;
diff --git a/src/components/ContainerSettingsGeneral.react.js b/src/components/ContainerSettingsGeneral.react.js
index af6cf08285..6ca461fc35 100644
--- a/src/components/ContainerSettingsGeneral.react.js
+++ b/src/components/ContainerSettingsGeneral.react.js
@@ -22,14 +22,10 @@ var ContainerSettingsGeneral = React.createClass({
return [util.randomId(), e[0], e[1]];
});
- let [tty, openStdin] = ContainerUtil.mode(this.props.container) || [true, true];
-
return {
slugName: null,
nameError: null,
- env: env,
- tty: tty,
- openStdin: openStdin
+ env: env
};
},
@@ -94,9 +90,7 @@ var ContainerSettingsGeneral = React.createClass({
list.push(key + '=' + value);
}
});
- let tty = this.state.tty;
- let openStdin = this.state.openStdin;
- containerActions.update(this.props.container.Name, {Env: list, Tty: tty, OpenStdin: openStdin});
+ containerActions.update(this.props.container.Name, {Env: list});
},
handleChangeEnvKey: function (index, event) {
@@ -139,18 +133,6 @@ var ContainerSettingsGeneral = React.createClass({
metrics.track('Removed Environment Variable');
},
- handleChangeTty: function () {
- this.setState({
- tty: !this.state.tty
- });
- },
-
- handleChangeOpenStdin: function () {
- this.setState({
- openStdin: !this.state.openStdin
- });
- },
-
handleDeleteContainer: function () {
dialog.showMessageBox({
message: 'Are you sure you want to delete this container?',
@@ -230,14 +212,6 @@ var ContainerSettingsGeneral = React.createClass({
{vars}
-
-
-
Advanced Options
-
Attach standard streams to a tty, including stdin if it is not closed
-
Keep STDIN open even if not attached
-
-
Save
-
Delete Container
Delete Container
diff --git a/src/components/Containers.react.js b/src/components/Containers.react.js
index 521001629a..449afb4835 100644
--- a/src/components/Containers.react.js
+++ b/src/components/Containers.react.js
@@ -6,7 +6,6 @@ var containerStore = require('../stores/ContainerStore');
var ContainerList = require('./ContainerList.react');
var Header = require('./Header.react');
var metrics = require('../utils/MetricsUtil');
-var RetinaImage = require('react-retina-image');
var shell = require('shell');
var machine = require('../utils/DockerMachineUtil');
diff --git a/src/routes.js b/src/routes.js
index d946cdbbda..ca86453266 100644
--- a/src/routes.js
+++ b/src/routes.js
@@ -11,6 +11,7 @@ var ContainerSettings = require('./components/ContainerSettings.react');
var ContainerSettingsGeneral = require('./components/ContainerSettingsGeneral.react');
var ContainerSettingsPorts = require('./components/ContainerSettingsPorts.react');
var ContainerSettingsVolumes = require('./components/ContainerSettingsVolumes.react');
+var ContainerSettingsAdvanced = require('./components/ContainerSettingsAdvanced.react');
var Preferences = require('./components/Preferences.react');
var NewContainerSearch = require('./components/NewContainerSearch.react');
var NewContainerPull = require('./components/NewContainerPull.react');
@@ -42,6 +43,7 @@ var routes = (
+
diff --git a/src/stores/ContainerStore.js b/src/stores/ContainerStore.js
index da39037352..bbdb56fd4f 100644
--- a/src/stores/ContainerStore.js
+++ b/src/stores/ContainerStore.js
@@ -1,9 +1,7 @@
import _ from 'underscore';
-import deepExtend from 'deep-extend';
import alt from '../alt';
import containerServerActions from '../actions/ContainerServerActions';
import containerActions from '../actions/ContainerActions';
-var LogStore = require('./LogStore');
class ContainerStore {
constructor () {
diff --git a/src/utils/RegHubUtil.js b/src/utils/RegHubUtil.js
index e831ee945a..0e2470c297 100644
--- a/src/utils/RegHubUtil.js
+++ b/src/utils/RegHubUtil.js
@@ -5,7 +5,6 @@ var util = require('../utils/Util');
var hubUtil = require('../utils/HubUtil');
var repositoryServerActions = require('../actions/RepositoryServerActions');
var tagServerActions = require('../actions/TagServerActions');
-var Promise = require('bluebird');
let REGHUB2_ENDPOINT = process.env.REGHUB2_ENDPOINT || 'https://registry.hub.docker.com/v2';
let searchReq = null;
@@ -62,7 +61,7 @@ module.exports = {
let data = JSON.parse(body);
let repos = data.repos;
async.map(repos, (repo, cb) => {
- let name = repo.repo;
+ var name = repo.repo;
if (util.isOfficialRepo(name)) {
name = 'library/' + name;
}
diff --git a/styles/container-settings.less b/styles/container-settings.less
index d37ade6650..ae13769197 100644
--- a/styles/container-settings.less
+++ b/styles/container-settings.less
@@ -138,5 +138,14 @@
margin-right: 0.5rem;
}
}
+ .checkboxes {
+ padding: 1rem 0;
+ p {
+ color: @gray-normal;
+ }
+ input[type="checkbox"] {
+ margin-right: 0.8rem;
+ }
+ }
}
}
diff --git a/styles/preferences.less b/styles/preferences.less
index 84f1194c5c..189d46bf55 100644
--- a/styles/preferences.less
+++ b/styles/preferences.less
@@ -16,7 +16,6 @@
.title {
margin-top: 40px;
- border-bottom: 1px solid #EEE;
text-align: left;
font-size: 18px;
font-weight: 400;