mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 01:57:35 -03:30
Merge pull request #8992 from saito-hideki/awx/issue/8839
Add inventory source and project links to details view of Jobs list Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
commit
3903e88a47
@ -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'),
|
||||
|
||||
@ -64,6 +64,8 @@ function JobDetail({ job, i18n }) {
|
||||
credentials,
|
||||
instance_group: instanceGroup,
|
||||
inventory,
|
||||
inventory_source,
|
||||
source_project,
|
||||
job_template: jobTemplate,
|
||||
workflow_job_template: workflowJobTemplate,
|
||||
labels,
|
||||
@ -206,6 +208,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