Skip to content

Commit

Permalink
Merge pull request #109 from vincent99/registrybug
Browse files Browse the repository at this point in the history
Fix preserved state when returning to add container
  • Loading branch information
vincent99 committed Mar 26, 2015
2 parents 060012a + 6134311 commit 993cb36
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
15 changes: 11 additions & 4 deletions app/pods/containers/new/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ export default Ember.ObjectController.extend(NewOrEditContainer, {
},

initFields: function() {
this.set('error',null);
this.initNetwork();
this.initEnvironment();
this.initPorts();
Expand All @@ -138,11 +139,16 @@ export default Ember.ObjectController.extend(NewOrEditContainer, {
this.userImageUuidDidChange();
this.terminalDidChange();
this.restartDidChange();
this.send('chooseRegistry', this.get('selectedRegistry'));
this.updateImageUuid();
this.set('restartLimit', 5);
this.set('restart', 'no'); // This has to come after restartLimit because changing the limit sets restart.
this.set('terminal', 'both');
},

// Restart
restart: 'no',
restartLimit: 5,
restart: null, //'no',
restartLimit: null, //5,

restartDidChange: function() {
var policy = {};
Expand Down Expand Up @@ -250,7 +256,8 @@ export default Ember.ObjectController.extend(NewOrEditContainer, {

// Image
registryChoices: null,
displayPrefix: 'docker:',
selectedRegistry: null,
displayPrefix: '',
userImageUuid: 'ubuntu:14.04.1',
credentialChoices: null,
showCredential: Ember.computed.gt('credentialChoices.length',0),
Expand Down Expand Up @@ -441,7 +448,7 @@ export default Ember.ObjectController.extend(NewOrEditContainer, {
}.observes('memoryMb'),

// Terminal
terminal: 'both',
terminal: null, //'both',
terminalDidChange: function() {
var val = this.get('terminal');
var stdinOpen = ( val === 'interactive' || val === 'both' );
Expand Down
1 change: 1 addition & 0 deletions app/pods/containers/new/route.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ export default Ember.Route.extend({
if (isExiting)
{
controller.set('tab', 'command');
controller.set('advanced', false);
}
}
});
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ui",
"version": "0.13.0",
"version": "0.13.1",
"private": true,
"directories": {
"doc": "doc",
Expand Down

0 comments on commit 993cb36

Please sign in to comment.