incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akovale...@apache.org
Subject git commit: AMBARI-3822. Selecting newly created config-group throws JS error in manage config-groups dialog. (akovalenko)
Date Wed, 20 Nov 2013 12:08:04 GMT
Updated Branches:
  refs/heads/trunk 04b138176 -> dc4c08dbe


AMBARI-3822. Selecting newly created config-group throws JS error in manage config-groups
dialog. (akovalenko)


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

Branch: refs/heads/trunk
Commit: dc4c08dbe6a632e303acad3f711847d6b90f3b1d
Parents: 04b1381
Author: Aleksandr Kovalenko <oleksandr.kovalenko@ukr.net>
Authored: Wed Nov 20 14:06:34 2013 +0200
Committer: Aleksandr Kovalenko <oleksandr.kovalenko@ukr.net>
Committed: Wed Nov 20 14:06:34 2013 +0200

----------------------------------------------------------------------
 .../controllers/main/service/manage_config_groups_controller.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/dc4c08db/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 532a404..3c3272c 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
@@ -292,19 +292,20 @@ App.ManageConfigGroupsController = Em.Controller.extend({
   onAddNewConfigGroup: function (data) {
     var loadedHostNamesMap = {};
     loadedHostNamesMap.length = 0;
+    var defaultConfigGroup = this.get('configGroups').popObject();
     var newConfigGroupData = App.ConfigGroup.create({
       id: data.resources[0].ConfigGroup.id,
       name: this.get('configGroupName'),
       description: this.get('configGroupDesc'),
       isDefault: false,
-      parentConfigGroup: null,
+      parentConfigGroup: defaultConfigGroup,
       service: this.get('serviceName'),
       hosts: [],
       configSiteTags: [],
       loadedHostNamesMap: loadedHostNamesMap,
       hostsModified: false
     });
-    var defaultConfigGroup = this.get('configGroups').popObject();
+    defaultConfigGroup.get('childConfigGroups').push(newConfigGroupData);
     this.get('configGroups').pushObjects([newConfigGroupData, defaultConfigGroup]);
     this.updateConfigGroup(data.resources[0].ConfigGroup.id);
     this.addGroupPopup.hide();


Mime
View raw message