mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 01:57:35 -03:30
add job type to Host summary_fields.recent_jobs
see: https://github.com/ansible/awx/issues/5236
This commit is contained in:
parent
83458711cd
commit
f51774c06e
@ -1697,6 +1697,7 @@ class HostSerializer(BaseSerializerWithVariables):
|
||||
d.setdefault('recent_jobs', [{
|
||||
'id': j.job.id,
|
||||
'name': j.job.job_template.name if j.job.job_template is not None else "",
|
||||
'type': j.job.get_real_instance_class()._meta.verbose_name.replace(' ', '_'),
|
||||
'status': j.job.status,
|
||||
'finished': j.job.finished,
|
||||
} for j in obj.job_host_summaries.select_related('job__job_template').order_by('-created')[:5]])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user