Merge pull request #509 from AlanCoding/max_ui_events

[3.2.2] add CTiT setting for max UI job events
This commit is contained in:
Alan Rominger
2017-10-09 13:30:50 -04:00
committed by Matthew Jones
3 changed files with 13 additions and 2 deletions

View File

@@ -3992,7 +3992,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)

View File

@@ -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

View File

@@ -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',
)