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/06/24 13:30:35 UTC

ambari git commit: AMBARI-12066 Service Configs: config groups list is not updated[patch 2]. (ababiichuk)

Repository: ambari
Updated Branches:
  refs/heads/trunk 4ef534b55 -> 81427c528


AMBARI-12066 Service Configs: config groups list is not updated[patch 2]. (ababiichuk)


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

Branch: refs/heads/trunk
Commit: 81427c5288cff6200bd4798435dcd3b2e51d2dfb
Parents: 4ef534b
Author: aBabiichuk <ab...@cybervisiontech.com>
Authored: Tue Jun 23 20:22:46 2015 +0300
Committer: aBabiichuk <ab...@cybervisiontech.com>
Committed: Wed Jun 24 14:27:48 2015 +0300

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


http://git-wip-us.apache.org/repos/asf/ambari/blob/81427c52/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 e40d7f7..01189d6 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
@@ -533,10 +533,6 @@ App.ManageConfigGroupsController = Em.Controller.extend(App.ConfigOverridable, {
     this.set('selectedHosts', selectedConfigGroup.get('hosts'));
     this.deleteHosts();
     this.get('configGroups').removeObject(selectedConfigGroup);
-    var groupFromModel = App.ServiceConfigGroup.find().filterProperty('serviceName', selectedConfigGroup.get('service.serviceName')).findProperty('name', selectedConfigGroup.get('name'));
-    if (groupFromModel) {
-      App.configGroupsMapper.deleteRecord(groupFromModel);
-    }
     this.set('selectedConfigGroup', this.get('configGroups').findProperty('isDefault'));
   },
 
@@ -790,7 +786,14 @@ App.ManageConfigGroupsController = Em.Controller.extend(App.ConfigOverridable, {
               configsController.clearConfigurationGroupHosts(cg, initalGroupState, finishFunction, finishFunction);
             }, this);
             modifiedConfigGroups.toDelete.forEach(function (cg) {
-              configsController.deleteConfigurationGroup(cg, finishFunction, finishFunction);
+              var deleteSuccess = function() {
+                var groupFromModel = App.ServiceConfigGroup.find().filterProperty('serviceName', cg.get('service.serviceName')).findProperty('name', cg.get('name'));
+                if (groupFromModel) {
+                  App.configGroupsMapper.deleteRecord(groupFromModel);
+                }
+                finishFunction();
+              };
+              configsController.deleteConfigurationGroup(cg, deleteSuccess, finishFunction);
             }, this);
           } else if (!createQueriesRun && deleteQueriesCounter < 1) {
             createQueriesRun = true;