Ver código fonte

AMBARI-4007. In installer overriding config launches the service save confirmation popup. (ababiichuk via onechiporenko)

Oleg Nechiporenko 11 anos atrás
pai
commit
e30633c19d

+ 20 - 0
ambari-web/app/templates/utils/config_launch_switch_config_group_of_host.hbs

@@ -0,0 +1,20 @@
+{{!
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+}}
+
+{{t installer.controls.slaveComponentGroups}}: 
+{{view Em.Select contentBinding="view.parentView.configGroups" optionLabelPath="content.displayName" selectionBinding="view.parentView.selectedConfigGroup"}}

+ 5 - 6
ambari-web/app/utils/config.js

@@ -1006,7 +1006,7 @@ App.config = Em.Object.create({
    *  is closed, cancelled or OK is pressed.
    */
 
-  saveGroupConfirmationPopup: function(groupName,isInstaller) {
+  saveGroupConfirmationPopup: function(groupName) {
     App.ModalPopup.show({
       header: Em.I18n.t('config.group.save.confirmation.header'),
       secondary: Em.I18n.t('config.group.save.confirmation.manage.button'),
@@ -1015,8 +1015,7 @@ App.config = Em.Object.create({
         templateName: require('templates/common/configs/saveConfigGroup')
       }),
       onSecondary: function() {
-        var controller = isInstaller ? App.router.get('wizardStep7Controller') : undefined;
-        App.router.get('mainServiceInfoConfigsController').manageConfigurationGroups(controller);
+        App.router.get('mainServiceInfoConfigsController').manageConfigurationGroups();
         this.hide();
       }
     });
@@ -1083,9 +1082,10 @@ App.config = Em.Object.create({
             configGroups.pushObject(newConfigGroup);
             if (isInstaller) {
               self.persistWizardStep7ConfigGroups();
+            } else {
+              self.saveGroupConfirmationPopup(newConfigGroupName);
             }
             this.hide();
-            self.saveGroupConfirmationPopup(newConfigGroupName,isInstaller);
             callback(newConfigGroup);
           }
         }
@@ -1179,8 +1179,7 @@ App.config = Em.Object.create({
         }
       },
       bodyClass: Ember.View.extend({
-        template: Em.Handlebars.compile('{{t installer.controls.slaveComponentGroups}}: ' +
-          '{{view Em.Select contentBinding="view.parentView.configGroups" optionLabelPath="content.displayName" selectionBinding="view.parentView.selectedConfigGroup"}}')
+        templateName: require('templates/utils/config_launch_switch_config_group_of_host')
       })
     });
   },