ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ababiic...@apache.org
Subject git commit: AMBARI-8184 Comparing identical config versions created by rollback for a new config group shows incorrect differences. (ababiichuk)
Date Thu, 06 Nov 2014 16:45:55 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-1.7.0 0b930529c -> ceb454991


AMBARI-8184 Comparing identical config versions created by rollback for a new config group
shows incorrect differences. (ababiichuk)


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

Branch: refs/heads/branch-1.7.0
Commit: ceb45499122738682ae102023ea31ec90cf99f0b
Parents: 0b93052
Author: aBabiichuk <ababiichuk@cybervisiontech.com>
Authored: Thu Nov 6 18:45:50 2014 +0200
Committer: aBabiichuk <ababiichuk@cybervisiontech.com>
Committed: Thu Nov 6 18:45:50 2014 +0200

----------------------------------------------------------------------
 ambari-web/app/controllers/main/service/info/configs.js | 6 +++---
 ambari-web/app/models/service_config.js                 | 3 ++-
 2 files changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/ceb45499/ambari-web/app/controllers/main/service/info/configs.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/info/configs.js b/ambari-web/app/controllers/main/service/info/configs.js
index bb0cac7..4dcc8a9 100644
--- a/ambari-web/app/controllers/main/service/info/configs.js
+++ b/ambari-web/app/controllers/main/service/info/configs.js
@@ -799,8 +799,7 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ServerValidatorM
    * @return {Boolean}
    */
   hasCompareDiffs: function (originalConfig, compareConfig) {
-    return (originalConfig.value !== compareConfig.value) ||
-    (originalConfig.isFinal !== (compareConfig.isFinal == true));
+    return (originalConfig.value !== compareConfig.value) || (!!originalConfig.isFinal !==
(compareConfig.isFinal == true));
   },
 
   /**
@@ -1236,6 +1235,7 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ServerValidatorM
       }
       parentOverridesArray.pushObject(newSCP);
       serviceConfigProperty.set('overrideValues', parentOverridesArray.mapProperty('value'));
+      serviceConfigProperty.set('overrideIsFinalValues', parentOverridesArray.mapProperty('isFinal'));
       console.debug("createOverrideProperty(): Added override to main-property:", serviceConfigProperty.get('name'));
     }, this);
   },
@@ -1658,7 +1658,7 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.ServerValidatorM
   buildGroupDesiredConfigs: function (configs, timeTag) {
     var sites = [];
     var time = timeTag || (new Date).getTime();
-    var siteFileNames = configs.mapProperty('filename');
+    var siteFileNames = configs.mapProperty('filename').uniq();
     sites = siteFileNames.map(function (filename) {
       return {
         type: filename.replace('.xml', ''),

http://git-wip-us.apache.org/repos/asf/ambari/blob/ceb45499/ambari-web/app/models/service_config.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/service_config.js b/ambari-web/app/models/service_config.js
index cc864b2..e9fe148 100644
--- a/ambari-web/app/models/service_config.js
+++ b/ambari-web/app/models/service_config.js
@@ -224,7 +224,8 @@ App.ServiceConfigProperty = Ember.Object.extend({
   }.property('overrides', 'overrides.length', 'isOriginalSCP'),
   isOverrideChanged: function () {
     if (Em.isNone(this.get('overrides')) && this.get('overrideValues.length') ===
0) return false;
-    return JSON.stringify(this.get('overrides').mapProperty('value')) !== JSON.stringify(this.get('overrideValues'));
+    return JSON.stringify(this.get('overrides').mapProperty('isFinal')) !== JSON.stringify(this.get('overrideIsFinalValues'))
+      || JSON.stringify(this.get('overrides').mapProperty('value')) !== JSON.stringify(this.get('overrideValues'));
   }.property('isOverridden', 'overrides.@each.isNotDefaultValue'),
   isRemovable: function() {
     var isOriginalSCP = this.get('isOriginalSCP');


Mime
View raw message