mirror of
https://github.com/ansible/awx.git
synced 2024-11-02 01:21:21 +03:00
add CTiT setting for max UI job events
This commit is contained in:
parent
f93506fe2c
commit
dee4b72303
@ -3989,7 +3989,7 @@ class BaseJobEventsList(SubListAPIView):
|
||||
search_fields = ('stdout',)
|
||||
|
||||
def finalize_response(self, request, response, *args, **kwargs):
|
||||
response['X-UI-Max-Events'] = settings.RECOMMENDED_MAX_EVENTS_DISPLAY_HEADER
|
||||
response['X-UI-Max-Events'] = settings.MAX_UI_JOB_EVENTS
|
||||
return super(BaseJobEventsList, self).finalize_response(request, response, *args, **kwargs)
|
||||
|
||||
|
||||
|
@ -166,7 +166,7 @@ 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 = 4000
|
||||
MAX_UI_JOB_EVENTS = 4000
|
||||
|
||||
# The maximum size of the ansible callback event's res data structure
|
||||
# beyond this limit and the value will be removed
|
||||
|
@ -52,3 +52,14 @@ register(
|
||||
category_slug='ui',
|
||||
feature_required='rebranding',
|
||||
)
|
||||
|
||||
register(
|
||||
'MAX_UI_JOB_EVENTS',
|
||||
field_class=fields.IntegerField,
|
||||
min_value=100,
|
||||
label=_('Max Job Events Retreived by UI'),
|
||||
help_text=_('Maximum number of job events for the UI to retreive within a '
|
||||
'single request.'),
|
||||
category=_('UI'),
|
||||
category_slug='ui',
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user