From 11cc7e37e1aacc45e8a68337ac6003840fa8d5a4 Mon Sep 17 00:00:00 2001 From: Marliana Lara Date: Thu, 13 Jan 2022 11:04:43 -0500 Subject: [PATCH] Add prefiltered link to inventory source sync jobs --- awx/ui/src/components/JobList/JobList.js | 11 +++++++++-- awx/ui/src/screens/Inventory/Inventory.js | 3 +++ .../Inventory/InventoryList/InventoryListItem.js | 16 +++++++++++++--- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/awx/ui/src/components/JobList/JobList.js b/awx/ui/src/components/JobList/JobList.js index 53af3f00b4..4471df2333 100644 --- a/awx/ui/src/components/JobList/JobList.js +++ b/awx/ui/src/components/JobList/JobList.js @@ -26,7 +26,11 @@ import JobListItem from './JobListItem'; import JobListCancelButton from './JobListCancelButton'; import useWsJobs from './useWsJobs'; -function JobList({ defaultParams, showTypeColumn = false }) { +function JobList({ + defaultParams, + showTypeColumn = false, + additionalRelatedSearchableKeys = [], +}) { const qsConfig = getQSConfig( 'job', { @@ -243,7 +247,10 @@ function JobList({ defaultParams, showTypeColumn = false }) { } clearSelected={clearSelected} toolbarSearchableKeys={searchableKeys} - toolbarRelatedSearchableKeys={relatedSearchableKeys} + toolbarRelatedSearchableKeys={[ + ...relatedSearchableKeys, + ...additionalRelatedSearchableKeys, + ]} renderToolbar={(props) => ( , diff --git a/awx/ui/src/screens/Inventory/InventoryList/InventoryListItem.js b/awx/ui/src/screens/Inventory/InventoryList/InventoryListItem.js index 8c1287d39c..49a0456e8d 100644 --- a/awx/ui/src/screens/Inventory/InventoryList/InventoryListItem.js +++ b/awx/ui/src/screens/Inventory/InventoryList/InventoryListItem.js @@ -95,9 +95,19 @@ function InventoryListItem({ )} - {inventory.kind !== 'smart' && ( - - )} + {inventory.kind !== 'smart' && + (inventory.has_inventory_sources ? ( + + + + ) : ( + + ))} {inventory.kind === 'smart' ? t`Smart Inventory` : t`Inventory`}