mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 09:27:36 -02:30
Add links to inventory source and project to inventory update details view of Jobs list
* Addresses #8839 Signed-off-by: Hideki Saito <saito@fgrep.org>
This commit is contained in:
@@ -124,7 +124,7 @@ SUMMARIZABLE_FK_FIELDS = {
|
|||||||
'last_update': DEFAULT_SUMMARY_FIELDS + ('status', 'failed', 'license_error'),
|
'last_update': DEFAULT_SUMMARY_FIELDS + ('status', 'failed', 'license_error'),
|
||||||
'current_update': DEFAULT_SUMMARY_FIELDS + ('status', 'failed', 'license_error'),
|
'current_update': DEFAULT_SUMMARY_FIELDS + ('status', 'failed', 'license_error'),
|
||||||
'current_job': DEFAULT_SUMMARY_FIELDS + ('status', 'failed', 'license_error'),
|
'current_job': DEFAULT_SUMMARY_FIELDS + ('status', 'failed', 'license_error'),
|
||||||
'inventory_source': ('source', 'last_updated', 'status'),
|
'inventory_source': ('id', 'name', 'source', 'last_updated', 'status'),
|
||||||
'custom_inventory_script': DEFAULT_SUMMARY_FIELDS,
|
'custom_inventory_script': DEFAULT_SUMMARY_FIELDS,
|
||||||
'source_script': DEFAULT_SUMMARY_FIELDS,
|
'source_script': DEFAULT_SUMMARY_FIELDS,
|
||||||
'role': ('id', 'role_field'),
|
'role': ('id', 'role_field'),
|
||||||
|
|||||||
@@ -61,6 +61,8 @@ function JobDetail({ job, i18n }) {
|
|||||||
credentials,
|
credentials,
|
||||||
instance_group: instanceGroup,
|
instance_group: instanceGroup,
|
||||||
inventory,
|
inventory,
|
||||||
|
inventory_source,
|
||||||
|
source_project,
|
||||||
job_template: jobTemplate,
|
job_template: jobTemplate,
|
||||||
workflow_job_template: workflowJobTemplate,
|
workflow_job_template: workflowJobTemplate,
|
||||||
labels,
|
labels,
|
||||||
@@ -203,6 +205,33 @@ function JobDetail({ job, i18n }) {
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
{inventory_source && (
|
||||||
|
<Detail
|
||||||
|
label={i18n._(t`Inventory Source`)}
|
||||||
|
value={
|
||||||
|
<Link
|
||||||
|
to={`/inventories/inventory/${inventory.id}/sources/${inventory_source.id}`}
|
||||||
|
>
|
||||||
|
{inventory_source.name}
|
||||||
|
</Link>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
{inventory_source && inventory_source.source === 'scm' && (
|
||||||
|
<Detail
|
||||||
|
label={i18n._(t`Project`)}
|
||||||
|
value={
|
||||||
|
<StatusDetailValue>
|
||||||
|
{source_project.status && (
|
||||||
|
<StatusIcon status={source_project.status} />
|
||||||
|
)}
|
||||||
|
<Link to={`/projects/${source_project.id}`}>
|
||||||
|
{source_project.name}
|
||||||
|
</Link>
|
||||||
|
</StatusDetailValue>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
{project && (
|
{project && (
|
||||||
<Detail
|
<Detail
|
||||||
label={i18n._(t`Project`)}
|
label={i18n._(t`Project`)}
|
||||||
|
|||||||
Reference in New Issue
Block a user