mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 01:57:35 -03: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:
parent
67f1f9ac69
commit
82a226d1fe
@ -124,7 +124,7 @@ SUMMARIZABLE_FK_FIELDS = {
|
||||
'last_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'),
|
||||
'inventory_source': ('source', 'last_updated', 'status'),
|
||||
'inventory_source': ('id', 'name', 'source', 'last_updated', 'status'),
|
||||
'custom_inventory_script': DEFAULT_SUMMARY_FIELDS,
|
||||
'source_script': DEFAULT_SUMMARY_FIELDS,
|
||||
'role': ('id', 'role_field'),
|
||||
|
||||
@ -61,6 +61,8 @@ function JobDetail({ job, i18n }) {
|
||||
credentials,
|
||||
instance_group: instanceGroup,
|
||||
inventory,
|
||||
inventory_source,
|
||||
source_project,
|
||||
job_template: jobTemplate,
|
||||
workflow_job_template: workflowJobTemplate,
|
||||
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 && (
|
||||
<Detail
|
||||
label={i18n._(t`Project`)}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user