File tree Expand file tree Collapse file tree
client/directives/components/newContainer Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ label.grid-block.align-center.btn.btn-radio(
1717label.grid-block.align-center.btn.btn-radio (
1818 data-event-name = "Selected Compose Setup"
1919 ng-class = "{'active': NCC.state.dockerFileTab === 'compose'}"
20- ng-click = "NCC.state.dockerFileTab = 'compose'; NCC.state.configurationMethod = 'dockerComposeFile' "
20+ ng-click = "NCC.setToComposeTab() "
2121)
2222 svg.grid-block.shrink.btn.btn-xs.btn-icon.btn-add.iconnables.icons-check
2323 use(
@@ -30,7 +30,7 @@ label.grid-block.align-center.btn.btn-radio(
3030label.grid-block.align-center.btn.btn-radio (
3131 data-event-name = "Selected Dockerfile Setup"
3232 ng-class = "{'active': NCC.state.dockerFileTab === 'dockerfile'}"
33- ng-click = "NCC.state.dockerFileTab = 'dockerfile'; NCC.state.configurationMethod = 'dockerfile' "
33+ ng-click = "NCC.setToDockerTab() "
3434 ng-if = "!$root.featureFlags.kubernetes"
3535)
3636 svg.grid-block.shrink.btn.btn-xs.btn-icon.btn-add.iconnables.icons-check
Original file line number Diff line number Diff line change @@ -400,6 +400,20 @@ function NewContainerController(
400400 return $rootScope . isLoading . newContainerSingleRepo || $rootScope . isLoading . creatingDockerCompose ;
401401 } ;
402402
403+ NCC . setToComposeTab = function ( ) {
404+ if ( ! NCC . isSaving ( ) ) {
405+ NCC . state . dockerFileTab = 'compose' ;
406+ NCC . state . configurationMethod = 'dockerComposeFile' ;
407+ }
408+ } ;
409+
410+ NCC . setToDockerTab = function ( ) {
411+ if ( ! NCC . isSaving ( ) ) {
412+ NCC . state . dockerFileTab = 'dockerfile' ;
413+ NCC . state . configurationMethod = 'dockerfile' ;
414+ }
415+ } ;
416+
403417 NCC . populateComposeErrorMessage = function ( errorMsg ) {
404418 var err = / V a l i d a t i o n E r r o r ( .* ) / . exec ( errorMsg ) ;
405419 if ( err ) {
You can’t perform that action at this time.
0 commit comments