Просмотр исходного кода

AMBARI-12742. Manage config groups: Removing a host from config group does not work (onechiporenko)

Oleg Nechiporenko 10 лет назад
Родитель
Сommit
08ce3411fa

+ 7 - 0
ambari-web/app/controllers/main/service/manage_config_groups_controller.js

@@ -534,7 +534,14 @@ App.ManageConfigGroupsController = Em.Controller.extend(App.ConfigOverridable, {
       return;
     }
     var hosts = this.get('selectedHosts').slice();
+    var newHosts = [];
     this.get('selectedConfigGroup.parentConfigGroup.hosts').pushObjects(hosts);
+    this.get('selectedConfigGroup.hosts').forEach(function(host) {
+      if (!hosts.contains(host)) {
+        newHosts.pushObject(host);
+      }
+    });
+    this.set('selectedConfigGroup.hosts', newHosts);
     this.set('selectedHosts', []);
   },