Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 e50fac36e -> b7b72065a


AMBARI-11906. Install Wizard: Moving from review step to customize services 
page cause js error. (alexantonenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b7b72065
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b7b72065
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b7b72065

Branch: refs/heads/branch-2.1
Commit: b7b72065ac699a79606d6423823c380841b84f98
Parents: e50fac3
Author: Alex Antonenko <hiv...@gmail.com>
Authored: Sun Jun 14 01:24:57 2015 +0300
Committer: Alex Antonenko <hiv...@gmail.com>
Committed: Sun Jun 14 16:07:59 2015 +0300

----------------------------------------------------------------------
 ambari-web/app/controllers/wizard/step7_controller.js | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/b7b72065/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 d20cee5..3cf8f56 100644
--- a/ambari-web/app/controllers/wizard/step7_controller.js
+++ b/ambari-web/app/controllers/wizard/step7_controller.js
@@ -677,12 +677,14 @@ App.WizardStep7Controller = 
Em.Controller.extend(App.ServerValidatorMixin, App.E
     var self = this;
     this.loadServerSideConfigsRecommendations().always(function () {
       // format descriptor configs
-      var serviceConfigProperties = 
(self.get('content.serviceConfigProperties') || []).mapProperty('name');
-      var recommendedToDelete = 
self.get('_dependentConfigValues').filterProperty('toDelete');
+      var serviceConfigPropertiesNames = 
(self.get('content.serviceConfigProperties') || []).mapProperty('name'),
+       serviceConfigPropertiesFileNames = 
(self.get('content.serviceConfigProperties') || []).mapProperty('filename'),
+       recommendedToDelete = 
self.get('_dependentConfigValues').filterProperty('toDelete');
       recommendedToDelete.forEach(function (c) {
-        var name = Em.get(c, 'propertyName');
-        if (serviceConfigProperties.contains(name)) {
-          
Em.set(self.get('_dependentConfigValues').findProperty('propertyName', 
name).findProperty('fileName', serviceConfigProperties.get('filename')), 
'toDelete', false);
+        var name = Em.get(c, 'propertyName'),
+         filename = Em.get(c, 'fileName');
+        if (serviceConfigPropertiesNames.contains(name) && 
serviceConfigPropertiesFileNames.contains(filename)) {
+          Em.set(c, 'toDelete', false);
         }
       });
 

Reply via email to