mirror of
https://github.com/ansible/awx.git
synced 2026-05-23 08:37:48 -02:30
Add a hint header for max job events for the UI
This commit is contained in:
@@ -3407,6 +3407,10 @@ class BaseJobEventsList(SubListAPIView):
|
|||||||
relationship = 'job_events'
|
relationship = 'job_events'
|
||||||
view_name = _('Job Events List')
|
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):
|
class HostJobEventsList(BaseJobEventsList):
|
||||||
|
|
||||||
|
|||||||
@@ -152,6 +152,10 @@ REMOTE_HOST_HEADERS = ['REMOTE_ADDR', 'REMOTE_HOST']
|
|||||||
# Note: This setting may be overridden by database settings.
|
# Note: This setting may be overridden by database settings.
|
||||||
STDOUT_MAX_BYTES_DISPLAY = 1048576
|
STDOUT_MAX_BYTES_DISPLAY = 1048576
|
||||||
|
|
||||||
|
# Returned in the header on event api lists as a recommendation to the UI
|
||||||
|
# on how many events to display before truncating/hiding
|
||||||
|
RECOMMENDED_MAX_EVENTS_DISPLAY_HEADER = 10000
|
||||||
|
|
||||||
# The maximum size of the ansible callback event's res data structure
|
# The maximum size of the ansible callback event's res data structure
|
||||||
# beyond this limit and the value will be removed
|
# beyond this limit and the value will be removed
|
||||||
MAX_EVENT_RES_DATA = 700000
|
MAX_EVENT_RES_DATA = 700000
|
||||||
|
|||||||
Reference in New Issue
Block a user