ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akovale...@apache.org
Subject git commit: AMBARI-4146. Inconsistent behavior of "Save" button in "Manage Configuration Groups" dialog window in hadoop installer. (akovalenko)
Date Fri, 20 Dec 2013 19:04:25 GMT
Updated Branches:
  refs/heads/trunk d60ee2cb1 -> 3d362faed


AMBARI-4146. Inconsistent behavior of "Save" button in "Manage Configuration Groups" dialog
window in hadoop installer. (akovalenko)


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

Branch: refs/heads/trunk
Commit: 3d362faed500e149963699eccf20d7ca42af2daa
Parents: d60ee2c
Author: Aleksandr Kovalenko <akovalenko@hortonworks.com>
Authored: Fri Dec 20 21:02:09 2013 +0200
Committer: Aleksandr Kovalenko <akovalenko@hortonworks.com>
Committed: Fri Dec 20 21:03:50 2013 +0200

----------------------------------------------------------------------
 .../main/service/manage_config_groups_controller.js | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/3d362fae/ambari-web/app/controllers/main/service/manage_config_groups_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/manage_config_groups_controller.js b/ambari-web/app/controllers/main/service/manage_config_groups_controller.js
index 849a579..6309524 100644
--- a/ambari-web/app/controllers/main/service/manage_config_groups_controller.js
+++ b/ambari-web/app/controllers/main/service/manage_config_groups_controller.js
@@ -467,16 +467,26 @@ App.ManageConfigGroupsController = Em.Controller.extend({
    */
   copyConfigGroups: function (originGroups) {
     var configGroups = [];
-    var defaultConfigGroup = App.ConfigGroup.create($.extend(false, {},originGroups.findProperty('isDefault')));
+    var result = [];
+    var defaultConfigGroup = App.ConfigGroup.create($.extend(true, {}, originGroups.findProperty('isDefault')));
     originGroups.forEach(function (configGroup) {
       if (!configGroup.get('isDefault')) {
-        var copiedGroup = App.ConfigGroup.create($.extend(false, {}, configGroup));
+        var copiedGroup = App.ConfigGroup.create($.extend(true, {}, configGroup));
         copiedGroup.set('parentConfigGroup', defaultConfigGroup);
         configGroups.pushObject(copiedGroup);
       }
     });
     defaultConfigGroup.set('childConfigGroups', configGroups.slice());
     configGroups.pushObject(defaultConfigGroup);
-    return configGroups;
+    configGroups.forEach(function (group) {
+      var groupCopy = {};
+      for (var prop in group) {
+        if (group.hasOwnProperty(prop)) {
+          groupCopy[prop] = group[prop];
+        }
+      }
+      result.push(App.ConfigGroup.create(groupCopy));
+    }, this);
+    return result;
   }
 });


Mime
View raw message