Updated option text and added default of on for tty and stdin during initial container creation

This commit is contained in:
TeckniX 2015-06-18 12:10:29 -04:00
parent e7e5957a1b
commit ef1c69f56c
3 changed files with 7 additions and 6 deletions

View File

@ -22,7 +22,7 @@ var ContainerSettingsGeneral = React.createClass({
return [util.randomId(), e[0], e[1]];
});
let [tty, openStdin] = ContainerUtil.mode(this.props.container) || [false, false];
let [tty, openStdin] = ContainerUtil.mode(this.props.container) || [true, true];
return {
slugName: null,
@ -232,7 +232,7 @@ var ContainerSettingsGeneral = React.createClass({
</div>
<div className="settings-section">
<div className="env-vars">
<h4>Foreground Options</h4>
<h4>Advanced Options</h4>
<p><input type="checkbox" checked={this.state.tty} onChange={this.handleChangeTty}/> Attach standard streams to a tty, including stdin if it is not closed</p>
<p><input type="checkbox" checked={this.state.openStdin} onChange={this.handleChangeOpenStdin}/> Keep STDIN open even if not attached</p>
</div>

View File

@ -16,7 +16,7 @@ var ContainerUtil = {
// Provide Foreground options
mode: function (container) {
if (!container || !container.Config) {
return [false, false];
return [true, true];
}
return [container.Config.Tty, container.Config.OpenStdin];
},

View File

@ -25,8 +25,6 @@ export default {
throw new Error('Certificate directory does not exist');
}
console.log(ip);
this.host = ip;
this.client = new dockerode({
protocol: 'https',
@ -103,6 +101,7 @@ export default {
containerData.Env = containerData.Config.Env;
}
containerData.Volumes = _.mapObject(containerData.Volumes, () => {return {};});
let existing = this.client.getContainer(name);
@ -162,6 +161,8 @@ export default {
Config: {
Image: imageName,
},
Tty: true,
OpenStdin: true,
State: {
Downloading: true
}
@ -183,7 +184,7 @@ export default {
delete this.placeholders[name];
localStorage.setItem('placeholders', JSON.stringify(this.placeholders));
this.createContainer(name, {Image: imageName});
this.createContainer(name, {Image: imageName, Tty: true, OpenStdin: true});
},
// progress is actually the progression PER LAYER (combined in columns)