ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ababiic...@apache.org
Subject ambari git commit: AMBARI-11880 Issue with overrides on the depended config group. (ababiichuk)
Date Fri, 12 Jun 2015 14:00:15 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk acecac370 -> d918c2c18


AMBARI-11880 Issue with overrides on the depended config group. (ababiichuk)


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

Branch: refs/heads/trunk
Commit: d918c2c1887c1a3811a7f093bc75e86b7a930a40
Parents: acecac3
Author: aBabiichuk <ababiichuk@cybervisiontech.com>
Authored: Fri Jun 12 16:18:00 2015 +0300
Committer: aBabiichuk <ababiichuk@cybervisiontech.com>
Committed: Fri Jun 12 17:00:08 2015 +0300

----------------------------------------------------------------------
 .../app/mixins/common/configs/enhanced_configs.js      | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/d918c2c1/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 cf8e60d..cf6a400 100644
--- a/ambari-web/app/mixins/common/configs/enhanced_configs.js
+++ b/ambari-web/app/mixins/common/configs/enhanced_configs.js
@@ -362,8 +362,9 @@ App.EnhancedConfigsMixin = Em.Mixin.create({
   _saveRecommendedValues: function(data, updateOnlyBoundaries, changedConfigs, selectedConfigGroup)
{
     Em.assert('invalid data - `data.resources[0].recommendations.blueprint.configurations`
not defined ', data && data.resources[0] && Em.get(data.resources[0], 'recommendations.blueprint.configurations'));
     var configObject = data.resources[0].recommendations.blueprint.configurations;
-    this.parseConfigsByTag(configObject, updateOnlyBoundaries, changedConfigs, selectedConfigGroup);
-    if (!this.get('selectedConfigGroup.isDefault') && data.resources[0].recommendations['config-groups'])
{
+    if (!selectedConfigGroup) {
+      this.parseConfigsByTag(configObject, updateOnlyBoundaries, changedConfigs, selectedConfigGroup);
+    } else if (data.resources[0].recommendations['config-groups']){
       var configFroGroup = data.resources[0].recommendations['config-groups'][0];
       this.parseConfigsByTag(configFroGroup.configurations, updateOnlyBoundaries, changedConfigs,
selectedConfigGroup);
       this.parseConfigsByTag(configFroGroup.dependent_configurations, updateOnlyBoundaries,
changedConfigs, selectedConfigGroup);
@@ -426,7 +427,7 @@ App.EnhancedConfigsMixin = Em.Mixin.create({
               Em.set(dependentProperty, 'value', initialValue);
               Em.set(dependentProperty, 'recommendedValue', recommendedValue);
               Em.set(dependentProperty, 'toDelete', false);
-              Em.set(dependentProperty, 'toAdd', isNewProperty);
+              Em.set(dependentProperty, 'toAdd', false);
               Em.set(dependentProperty, 'parentConfigs', dependentProperty.parentConfigs.concat(parentPropertiesNames).uniq());
             } else {
               this.get('_dependentConfigValues').pushObject({
@@ -695,12 +696,6 @@ App.EnhancedConfigsMixin = Em.Mixin.create({
             }
             cp.set('recommendedValue', propertyToUpdate.recommendedValue);
           } else {
-            if (stepConfigs.get('serviceName') !== this.get('content.serviceName')) {
-              if (propertyToUpdate.saveRecommended || cp.get('value') == propertyToUpdate.recommendedValue)
{
-                cp.set('value', this.useInitialValue(stepConfigs.get('serviceName')) ? cp.get('initialValue')
: cp.get('savedValue'));
-              }
-              cp.set('recommendedValue', propertyToUpdate.recommendedValue);
-            }
             var overriddenConfig = cp.get('overrides') && cp.get('overrides').findProperty('group.name',
selectedGroup.get('name'));
             if (overriddenConfig) {
               if (propertyToUpdate.saveRecommended || overriddenConfig.get('value') == propertyToUpdate.recommendedValue)
{


Mime
View raw message