mirror of
https://github.com/ansible/awx.git
synced 2026-01-12 02:19:58 -03:30
Merge pull request #11534 from marshmalien/7678-inv-sync-link
Link from sync status icon to prefiltered list of inventory source sync jobs
This commit is contained in:
commit
4cdc88e4bb
@ -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) => (
|
||||
<DatalistToolbar
|
||||
{...props}
|
||||
|
||||
@ -167,6 +167,9 @@ function Inventory({ setBreadcrumb }) {
|
||||
inventory.id,
|
||||
or__workflowjob__inventory: inventory.id,
|
||||
}}
|
||||
additionalRelatedSearchableKeys={[
|
||||
'inventoryupdate__inventory_source__inventory',
|
||||
]}
|
||||
/>
|
||||
</Route>,
|
||||
<Route path="*" key="not-found">
|
||||
|
||||
@ -95,9 +95,19 @@ function InventoryListItem({
|
||||
)}
|
||||
</TdBreakWord>
|
||||
<Td dataLabel={t`Status`}>
|
||||
{inventory.kind !== 'smart' && (
|
||||
<StatusLabel status={syncStatus} tooltipContent={tooltipContent} />
|
||||
)}
|
||||
{inventory.kind !== 'smart' &&
|
||||
(inventory.has_inventory_sources ? (
|
||||
<Link
|
||||
to={`/inventories/inventory/${inventory.id}/jobs?job.or__inventoryupdate__inventory_source__inventory__id=${inventory.id}`}
|
||||
>
|
||||
<StatusLabel
|
||||
status={syncStatus}
|
||||
tooltipContent={tooltipContent}
|
||||
/>
|
||||
</Link>
|
||||
) : (
|
||||
<StatusLabel status={syncStatus} tooltipContent={tooltipContent} />
|
||||
))}
|
||||
</Td>
|
||||
<Td dataLabel={t`Type`}>
|
||||
{inventory.kind === 'smart' ? t`Smart Inventory` : t`Inventory`}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user