From 7791c5f5ba637c709b8425bf86d34d82756a435d Mon Sep 17 00:00:00 2001 From: John Mitchell Date: Wed, 20 Mar 2019 11:34:05 -0400 Subject: [PATCH] hide groups that host is already associated with on relevant lists --- .../shared/associate-groups/associate-groups.controller.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/awx/ui/client/src/inventories-hosts/shared/associate-groups/associate-groups.controller.js b/awx/ui/client/src/inventories-hosts/shared/associate-groups/associate-groups.controller.js index 5f24ea6608..03e5fe7158 100644 --- a/awx/ui/client/src/inventories-hosts/shared/associate-groups/associate-groups.controller.js +++ b/awx/ui/client/src/inventories-hosts/shared/associate-groups/associate-groups.controller.js @@ -23,11 +23,14 @@ page_size: 5 }; - if($state.params.group_id) { + if ($state.params.group_id) { $scope.associate_group_default_params.not__id = $state.params.group_id; $scope.associate_group_queryset.not__id = $state.params.group_id; $scope.associate_group_default_params.not__parents = $state.params.group_id; $scope.associate_group_queryset.not__parents = $state.params.group_id; + } else if ($state.params.host_id) { + $scope.associate_group_default_params.not__hosts = $state.params.host_id; + $scope.associate_group_queryset.not__hosts = $state.params.host_id; } let list = _.cloneDeep(GroupList);