@@ -124,6 +124,7 @@ export default Ember.ObjectController.extend(NewOrEditContainer, {
124124 } ,
125125
126126 initFields : function ( ) {
127+ this . set ( 'error' , null ) ;
127128 this . initNetwork ( ) ;
128129 this . initEnvironment ( ) ;
129130 this . initPorts ( ) ;
@@ -138,11 +139,16 @@ export default Ember.ObjectController.extend(NewOrEditContainer, {
138139 this . userImageUuidDidChange ( ) ;
139140 this . terminalDidChange ( ) ;
140141 this . restartDidChange ( ) ;
142+ this . send ( 'chooseRegistry' , this . get ( 'selectedRegistry' ) ) ;
143+ this . updateImageUuid ( ) ;
144+ this . set ( 'restartLimit' , 5 ) ;
145+ this . set ( 'restart' , 'no' ) ; // This has to come after restartLimit because changing the limit sets restart.
146+ this . set ( 'terminal' , 'both' ) ;
141147 } ,
142148
143149 // Restart
144- restart : 'no' ,
145- restartLimit : 5 ,
150+ restart : null , // 'no',
151+ restartLimit : null , // 5,
146152
147153 restartDidChange : function ( ) {
148154 var policy = { } ;
@@ -250,7 +256,8 @@ export default Ember.ObjectController.extend(NewOrEditContainer, {
250256
251257 // Image
252258 registryChoices : null ,
253- displayPrefix : 'docker:' ,
259+ selectedRegistry : null ,
260+ displayPrefix : '' ,
254261 userImageUuid : 'ubuntu:14.04.1' ,
255262 credentialChoices : null ,
256263 showCredential : Ember . computed . gt ( 'credentialChoices.length' , 0 ) ,
@@ -441,7 +448,7 @@ export default Ember.ObjectController.extend(NewOrEditContainer, {
441448 } . observes ( 'memoryMb' ) ,
442449
443450 // Terminal
444- terminal : 'both' ,
451+ terminal : null , // 'both',
445452 terminalDidChange : function ( ) {
446453 var val = this . get ( 'terminal' ) ;
447454 var stdinOpen = ( val === 'interactive' || val === 'both' ) ;
0 commit comments