Implement job template job history statuses, configurable

This commit is contained in:
Matthew Jones 2015-02-09 14:19:18 -05:00
parent aff32faf8b
commit e9e4c6856d
2 changed files with 4 additions and 0 deletions

View File

@ -1351,6 +1351,7 @@ class JobTemplateSerializer(UnifiedJobTemplateSerializer, JobOptionsSerializer):
else:
d['can_copy'] = False
d['can_edit'] = False
d['recent_jobs'] = [{'id': x.id, 'status': x.status} for x in obj.jobs.all().order_by('-started')[:10]]
return d
class JobSerializer(UnifiedJobSerializer, JobOptionsSerializer):

View File

@ -328,6 +328,9 @@ AWX_PROOT_HIDE_PATHS = []
# Additional paths to show for jobs using proot.
AWX_PROOT_SHOW_PATHS = []
# Number of jobs to show as part of the job template history
AWX_JOB_TEMPLATE_HISTORY = 10
# Not possible to get list of regions without authenticating, so use this list
# instead (based on docs from:
# http://docs.rackspace.com/loadbalancers/api/v1.0/clb-devguide/content/Service_Access_Endpoints-d1e517.html)