You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by al...@apache.org on 2013/11/28 22:31:14 UTC

[2/2] git commit: AMBARI-3925. Adding host to multiple groups at the same time fails (alexantonenko)

AMBARI-3925. Adding host to multiple groups at the same time fails (alexantonenko)


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

Branch: refs/heads/trunk
Commit: e86e013eab5f0dc98b78811ea810f5eee4d3bbaa
Parents: 60bbb1d
Author: Alex Antonenko <hi...@gmail.com>
Authored: Thu Nov 28 23:23:42 2013 +0200
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Thu Nov 28 23:23:42 2013 +0200

----------------------------------------------------------------------
 .../main/service/manage_config_groups_controller.js           | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/e86e013e/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 9e9d361..1e846ba 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
@@ -314,10 +314,14 @@ App.ManageConfigGroupsController = Em.Controller.extend({
         if (!this.get('enablePrimary')) {
           return false;
         }
+        var copyHsots = this.get('content.loadedHostsToGroupMap')[this.get('content.selectedConfigGroup.name')];
+        delete this.get('content.loadedHostsToGroupMap')[this.get('content.selectedConfigGroup.name')];
+        this.get('content.loadedHostsToGroupMap')[this.get('configGroupName')] = copyHsots;
         this.get('content.selectedConfigGroup').set('name', this.get('configGroupName'));
         this.get('content.selectedConfigGroup').set('description', this.get('configGroupDesc'));
         this.get('content.selectedConfigGroup.apiResponse').group_name = this.get('configGroupName');
         this.get('content.selectedConfigGroup.apiResponse').description = this.get('configGroupDesc');
+
         var configGroup = {
           ConfigGroup: this.get('content.selectedConfigGroup.apiResponse')
         };
@@ -594,6 +598,9 @@ App.InstallerManageConfigGroupsController = App.ManageConfigGroupsController.ext
         if (!this.get('enablePrimary')) {
           return false;
         }
+        var copyHsots = self.get('loadedHostsToGroupMap')[self.get('selectedConfigGroup.name')];
+        delete self.get('loadedHostsToGroupMap')[self.get('selectedConfigGroup.name')];
+        self.get('loadedHostsToGroupMap')[this.get('configGroupName')] = copyHsots;
         self.set('selectedConfigGroup.name', this.get('configGroupName'));
         self.set('selectedConfigGroup.description', this.get('configGroupDesc'));
         this.hide();