mirror of
https://github.com/ansible/awx.git
synced 2024-11-01 16:51:11 +03:00
Allow the job event list views to take a no_truncate GET param
This commit is contained in:
parent
9efa7b84df
commit
e672e68a02
@ -126,7 +126,7 @@ class FieldLookupBackend(BaseFilterBackend):
|
|||||||
'''
|
'''
|
||||||
|
|
||||||
RESERVED_NAMES = ('page', 'page_size', 'format', 'order', 'order_by',
|
RESERVED_NAMES = ('page', 'page_size', 'format', 'order', 'order_by',
|
||||||
'search', 'type', 'host_filter', 'count_disabled',)
|
'search', 'type', 'host_filter', 'count_disabled', 'no_truncate')
|
||||||
|
|
||||||
SUPPORTED_LOOKUPS = ('exact', 'iexact', 'contains', 'icontains',
|
SUPPORTED_LOOKUPS = ('exact', 'iexact', 'contains', 'icontains',
|
||||||
'startswith', 'istartswith', 'endswith', 'iendswith',
|
'startswith', 'istartswith', 'endswith', 'iendswith',
|
||||||
|
@ -3768,6 +3768,12 @@ class JobEventList(ListAPIView):
|
|||||||
serializer_class = serializers.JobEventSerializer
|
serializer_class = serializers.JobEventSerializer
|
||||||
search_fields = ('stdout',)
|
search_fields = ('stdout',)
|
||||||
|
|
||||||
|
def get_serializer_context(self):
|
||||||
|
context = super().get_serializer_context()
|
||||||
|
if self.request.query_params.get('no_truncate'):
|
||||||
|
context.update(no_truncate=True)
|
||||||
|
return context
|
||||||
|
|
||||||
|
|
||||||
class JobEventDetail(RetrieveAPIView):
|
class JobEventDetail(RetrieveAPIView):
|
||||||
|
|
||||||
@ -4007,6 +4013,12 @@ class AdHocCommandEventList(ListAPIView):
|
|||||||
serializer_class = serializers.AdHocCommandEventSerializer
|
serializer_class = serializers.AdHocCommandEventSerializer
|
||||||
search_fields = ('stdout',)
|
search_fields = ('stdout',)
|
||||||
|
|
||||||
|
def get_serializer_context(self):
|
||||||
|
context = super().get_serializer_context()
|
||||||
|
if self.request.query_params.get('no_truncate'):
|
||||||
|
context.update(no_truncate=True)
|
||||||
|
return context
|
||||||
|
|
||||||
|
|
||||||
class AdHocCommandEventDetail(RetrieveAPIView):
|
class AdHocCommandEventDetail(RetrieveAPIView):
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user