You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ab...@apache.org on 2015/04/22 12:40:08 UTC

ambari git commit: AMBARI-10647 Configs should be removed/added when /recommendations says so (additional patch). (ababiichuk)

Repository: ambari
Updated Branches:
  refs/heads/trunk 0678ca10e -> 99a9f0696


AMBARI-10647 Configs should be removed/added when /recommendations says so (additional patch). (ababiichuk)


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

Branch: refs/heads/trunk
Commit: 99a9f0696e5c034f92aa43bc4c904e8a04c24c5d
Parents: 0678ca1
Author: aBabiichuk <ab...@cybervisiontech.com>
Authored: Wed Apr 22 13:17:54 2015 +0300
Committer: aBabiichuk <ab...@cybervisiontech.com>
Committed: Wed Apr 22 13:17:54 2015 +0300

----------------------------------------------------------------------
 ambari-web/app/mixins/common/configs/enhanced_configs.js | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/99a9f069/ambari-web/app/mixins/common/configs/enhanced_configs.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mixins/common/configs/enhanced_configs.js b/ambari-web/app/mixins/common/configs/enhanced_configs.js
index fb0bf14..7762188 100644
--- a/ambari-web/app/mixins/common/configs/enhanced_configs.js
+++ b/ambari-web/app/mixins/common/configs/enhanced_configs.js
@@ -399,7 +399,7 @@ App.EnhancedConfigsMixin = Em.Mixin.create({
 
           var isNewProperty = (!notDefaultGroup && Em.isNone(cp)) || (notDefaultGroup && group && Em.isNone(override));
 
-          if (!updateOnlyBoundaries && group && !parentPropertiesNames.contains(propertyName) && defaultValue != recommendedValue) { //on first initial request we don't need to change values
+          if (!updateOnlyBoundaries && !parentPropertiesNames.contains(propertyName) && defaultValue != recommendedValue) { //on first initial request we don't need to change values
             if (dependentProperty) {
               Em.set(dependentProperty, 'value', defaultValue);
               Em.set(dependentProperty, 'recommendedValue', recommendedValue);
@@ -488,7 +488,7 @@ App.EnhancedConfigsMixin = Em.Mixin.create({
                 self.get('_dependentConfigValues').pushObject({
                   saveRecommended: true,
                   saveRecommendedDefault: true,
-                  propertyValue: cp.get('defaultValue'),
+                  propertyValue: cp && cp.get('defaultValue'),
                   toDelete: true,
                   toAdd: false,
                   isDeleted: true,
@@ -554,9 +554,7 @@ App.EnhancedConfigsMixin = Em.Mixin.create({
             serviceName: stepConfigs.get('serviceName'),
             filename: App.config.getOriginalFileName(Em.get(propertyToAdd, 'fileName')),
             isNotSaved: !Em.get(propertyToAdd, 'isDeleted'),
-            isRequired: false,
-            group: selectedGroup.get('isDefault') ? null : selectedGroup,
-            isOverridable: selectedGroup.get('isDefault')
+            isRequired: false
           }));
         } else {
           var cp = stepConfigs.get('configs').filterProperty('name', Em.get(propertyToAdd, 'propertyName')).findProperty('filename', App.config.getOriginalFileName(Em.get(propertyToAdd, 'fileName')));