From b876d92132041ed06a7497bb42fc435b0aa858fd Mon Sep 17 00:00:00 2001 From: MilanPospisil Date: Tue, 2 Jul 2024 18:47:05 +0200 Subject: [PATCH] Prevent instance group fallback in inventories tooltip (#2630) --- frontend/awx/resources/inventories/InventoryForm.tsx | 7 ++++--- .../inventories/InventoryPage/InventoryDetails.tsx | 6 +++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/frontend/awx/resources/inventories/InventoryForm.tsx b/frontend/awx/resources/inventories/InventoryForm.tsx index df64b48f4f..fc07c5a9b4 100644 --- a/frontend/awx/resources/inventories/InventoryForm.tsx +++ b/frontend/awx/resources/inventories/InventoryForm.tsx @@ -322,6 +322,9 @@ export function useInventoryFormDetailLabels() { limit: t( `The limit to restrict the returned hosts for the related auto-created inventory source, special to constructed inventory.` ), + prevent_instance_group_fallback: t( + `Prevent instance group fallback: If enabled, the inventory will prevent adding any organization instance groups to the list of preferred instances groups to run associated job templates on. Note: If this setting is enabled and you provided an empty list, the global instance groups will be applied.` + ), }; } @@ -431,9 +434,7 @@ function InventoryInputs(props: { inventoryKind: string }) { {inventoryKind === '' && ( label={t('Prevent instance group fallback')} diff --git a/frontend/awx/resources/inventories/InventoryPage/InventoryDetails.tsx b/frontend/awx/resources/inventories/InventoryPage/InventoryDetails.tsx index 7d193dcb7b..c26e593496 100644 --- a/frontend/awx/resources/inventories/InventoryPage/InventoryDetails.tsx +++ b/frontend/awx/resources/inventories/InventoryPage/InventoryDetails.tsx @@ -242,7 +242,11 @@ export function InventoryDetailsInner(props: { inventory: InventoryWithSource }) }) } /> - + {inventory.prevent_instance_group_fallback && (