Repository: ambari Updated Branches: refs/heads/branch-2.1 49244c78e -> e516be183
AMBARI-12742. Manage config groups: Removing a host from config group does not work (onechiporenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e516be18 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e516be18 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e516be18 Branch: refs/heads/branch-2.1 Commit: e516be1838c1fec8740e45ec10c07078e17bb0c9 Parents: 49244c7 Author: Oleg Nechiporenko <onechipore...@apache.org> Authored: Wed Aug 12 17:46:24 2015 +0300 Committer: Oleg Nechiporenko <onechipore...@apache.org> Committed: Thu Aug 13 12:22:38 2015 +0300 ---------------------------------------------------------------------- .../main/service/manage_config_groups_controller.js | 7 +++++++ 1 file changed, 7 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/e516be18/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 a037a1c..4328a7a 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 @@ -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', []); },