Add a hint header for max job events for the UI

This commit is contained in:
Matthew Jones
2017-01-05 15:15:50 -05:00
parent 54980d09e3
commit 3006e357f6
2 changed files with 8 additions and 0 deletions
+4
View File
@@ -3407,6 +3407,10 @@ class BaseJobEventsList(SubListAPIView):
relationship = 'job_events'
view_name = _('Job Events List')
def finalize_response(self, request, response, *args, **kwargs):
response['X-UI-Max-Events'] = settings.RECOMMENDED_MAX_EVENTS_DISPLAY_HEADER
return super(BaseJobEventsList, self).finalize_response(request, response, *args, **kwargs)
class HostJobEventsList(BaseJobEventsList):