Updated Branches: refs/heads/trunk 98cb71247 -> 2b013ac35
AMBARI-2640. Going back to Customize Services page from the Install page resets certain directory values. (Aleksandr Kovalenko via yusaku) Project: http://git-wip-us.apache.org/repos/asf/incubator-ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ambari/commit/2b013ac3 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/2b013ac3 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/2b013ac3 Branch: refs/heads/trunk Commit: 2b013ac35ca4937847e5546fd82f590d498aefbe Parents: 98cb712 Author: Yusaku Sako <[email protected]> Authored: Fri Jul 12 06:44:23 2013 -0700 Committer: Yusaku Sako <[email protected]> Committed: Fri Jul 12 06:44:27 2013 -0700 ---------------------------------------------------------------------- ambari-web/app/controllers/wizard/step7_controller.js | 2 +- ambari-web/app/utils/config.js | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/2b013ac3/ambari-web/app/controllers/wizard/step7_controller.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/wizard/step7_controller.js b/ambari-web/app/controllers/wizard/step7_controller.js index c22ec20..b7cd34d 100644 --- a/ambari-web/app/controllers/wizard/step7_controller.js +++ b/ambari-web/app/controllers/wizard/step7_controller.js @@ -83,7 +83,7 @@ App.WizardStep7Controller = Em.Controller.extend({ //STEP 5: Add custom configs App.config.addCustomConfigs(configs); //STEP 6: Distribute configs by service and wrap each one in App.ServiceConfigProperty (configs -> serviceConfigs) - var serviceConfigs = App.config.renderConfigs(configs, this.get('allInstalledServiceNames'), this.get('selectedServiceNames')); + var serviceConfigs = App.config.renderConfigs(configs, storedConfigs, this.get('allInstalledServiceNames'), this.get('selectedServiceNames')); this.set('stepConfigs', serviceConfigs); this.activateSpecialConfigs(); this.set('selectedService', this.get('stepConfigs').filterProperty('showConfig', true).objectAt(0)); http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/2b013ac3/ambari-web/app/utils/config.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/utils/config.js b/ambari-web/app/utils/config.js index 14545c0..c7c1b5f 100644 --- a/ambari-web/app/utils/config.js +++ b/ambari-web/app/utils/config.js @@ -387,7 +387,7 @@ App.config = Em.Object.create({ * @param selectedServiceNames * @return {Array} */ - renderConfigs: function (configs, allInstalledServiceNames, selectedServiceNames) { + renderConfigs: function (configs, storedConfigs, allInstalledServiceNames, selectedServiceNames) { var renderedServiceConfigs = []; var localDB = { hosts: App.db.getHosts(), @@ -414,7 +414,9 @@ App.config = Em.Object.create({ _config.isOverridable = (_config.isOverridable === undefined) ? true : _config.isOverridable; serviceConfigProperty = App.ServiceConfigProperty.create(_config); this.updateHostOverrides(serviceConfigProperty, _config); - serviceConfigProperty.initialValue(localDB); + if (!storedConfigs) { + serviceConfigProperty.initialValue(localDB); + } this.tweakDynamicDefaults(localDB, serviceConfigProperty, _config); serviceConfigProperty.validate(); configsByService.pushObject(serviceConfigProperty);
