diff --git a/awx/ui/client/src/inventories-hosts/inventories/related/groups/related/nested-hosts/group-nested-hosts-list.controller.js b/awx/ui/client/src/inventories-hosts/inventories/related/groups/related/nested-hosts/group-nested-hosts-list.controller.js index 1a3d565144..f86a550218 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/related/groups/related/nested-hosts/group-nested-hosts-list.controller.js +++ b/awx/ui/client/src/inventories-hosts/inventories/related/groups/related/nested-hosts/group-nested-hosts-list.controller.js @@ -6,10 +6,10 @@ export default ['$scope', 'NestedHostsListDefinition', '$rootScope', 'GetBasePath', 'rbacUiControlService', 'Dataset', '$state', '$filter', 'Prompt', 'Wait', - 'HostsService', 'SetStatus', 'canAdd', 'GroupsService', 'ProcessErrors', 'groupData', + 'HostsService', 'SetStatus', 'canAdd', 'GroupsService', 'ProcessErrors', 'groupData', 'inventoryData', function($scope, NestedHostsListDefinition, $rootScope, GetBasePath, rbacUiControlService, Dataset, $state, $filter, Prompt, Wait, - HostsService, SetStatus, canAdd, GroupsService, ProcessErrors, groupData) { + HostsService, SetStatus, canAdd, GroupsService, ProcessErrors, groupData, inventoryData) { let list = NestedHostsListDefinition; @@ -25,6 +25,8 @@ export default ['$scope', 'NestedHostsListDefinition', '$rootScope', 'GetBasePat $scope[`${list.iterator}_dataset`] = Dataset.data; $scope[list.name] = $scope[`${list.iterator}_dataset`].results; + $scope.inventory_obj = inventoryData; + $rootScope.flashMessage = null; $scope.$watchCollection(list.name, function() { diff --git a/awx/ui/client/src/inventories-hosts/inventories/related/groups/related/nested-hosts/group-nested-hosts.list.js b/awx/ui/client/src/inventories-hosts/inventories/related/groups/related/nested-hosts/group-nested-hosts.list.js index 8b8322aa08..5e9b4d21d4 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/related/groups/related/nested-hosts/group-nested-hosts.list.js +++ b/awx/ui/client/src/inventories-hosts/inventories/related/groups/related/nested-hosts/group-nested-hosts.list.js @@ -102,7 +102,7 @@ export default ['i18n', function(i18n) { showTipWhenDisabled: true, tooltipInnerClass: "Tooltip-wide", // TODO: we don't always want to show this - ngShow: true + ngShow: 'inventory_obj.summary_fields.user_capabilities.adhoc' }, refresh: { mode: 'all', diff --git a/awx/ui/client/src/inventories-hosts/inventories/related/hosts/related-host.list.js b/awx/ui/client/src/inventories-hosts/inventories/related/hosts/related-host.list.js index 51ac3d1b41..467b0113db 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/related/hosts/related-host.list.js +++ b/awx/ui/client/src/inventories-hosts/inventories/related/hosts/related-host.list.js @@ -115,7 +115,7 @@ export default ['i18n', function(i18n) { showTipWhenDisabled: true, tooltipInnerClass: "Tooltip-wide", // TODO: we don't always want to show this - ngShow: true + ngShow: 'inventory_obj.summary_fields.user_capabilities.adhoc' }, create: { mode: 'all',