Skip to content

Commit

Permalink
Prevent instance group fallback in inventories tooltip (#2630)
Browse files Browse the repository at this point in the history
  • Loading branch information
MilanPospisil authored Jul 2, 2024
1 parent 755c6b6 commit b876d92
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
7 changes: 4 additions & 3 deletions frontend/awx/resources/inventories/InventoryForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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.`
),
};
}

Expand Down Expand Up @@ -431,9 +434,7 @@ function InventoryInputs(props: { inventoryKind: string }) {
{inventoryKind === '' && (
<PageFormGroup
label={t('Options')}
labelHelp={t(
'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.'
)}
labelHelp={inventoryFormDetailLables.prevent_instance_group_fallback}
>
<PageFormCheckbox<InventoryCreate>
label={t('Prevent instance group fallback')}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,11 @@ export function InventoryDetailsInner(props: { inventory: InventoryWithSource })
})
}
/>
<PageDetail label={t('Enabled options')} isEmpty={!inventory.prevent_instance_group_fallback}>
<PageDetail
label={t('Enabled options')}
isEmpty={!inventory.prevent_instance_group_fallback}
helpText={inventoryFormDetailLables.prevent_instance_group_fallback}
>
<TextList component={TextListVariants.ul}>
{inventory.prevent_instance_group_fallback && (
<TextListItem component={TextListItemVariants.li}>
Expand Down

0 comments on commit b876d92

Please sign in to comment.