Updated Branches: refs/heads/trunk 4f822ca93 -> e30633c19
AMBARI-4007. In installer overriding config launches the service save confirmation popup. (ababiichuk via onechiporenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e30633c1 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e30633c1 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e30633c1 Branch: refs/heads/trunk Commit: e30633c19d171a6cdb356e1fc92099354b8da7cd Parents: 4f822ca Author: Oleg Nechiporenko <onechipore...@apache.org> Authored: Tue Dec 10 20:16:11 2013 +0200 Committer: Oleg Nechiporenko <onechipore...@apache.org> Committed: Tue Dec 10 20:16:11 2013 +0200 ---------------------------------------------------------------------- ...onfig_launch_switch_config_group_of_host.hbs | 20 ++++++++++++++++++++ ambari-web/app/utils/config.js | 11 +++++------ 2 files changed, 25 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/e30633c1/ambari-web/app/templates/utils/config_launch_switch_config_group_of_host.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/utils/config_launch_switch_config_group_of_host.hbs b/ambari-web/app/templates/utils/config_launch_switch_config_group_of_host.hbs new file mode 100644 index 0000000..7a3d8be --- /dev/null +++ b/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"}} http://git-wip-us.apache.org/repos/asf/ambari/blob/e30633c1/ambari-web/app/utils/config.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/utils/config.js b/ambari-web/app/utils/config.js index e1f04da..c2575bf 100644 --- a/ambari-web/app/utils/config.js +++ b/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') }) }); },