mirror of
https://github.com/ansible/awx.git
synced 2026-02-19 20:20:06 -03:30
add limit pagination to jobs/<id>/job_events/
* trigger via jobs/<id>/job_events/?limit=10 * Can and should be used in conjunction with an indexed set of fields to generate efficient pagination queries. i.e. jobs/<id>/job_events?limit=10&start_line__gte=10 * If limit is not specified in the query params then the default pagination will be used.
This commit is contained in:
@@ -172,6 +172,7 @@ from awx.api.views.root import ( # noqa
|
||||
ApiV2AttachView,
|
||||
)
|
||||
from awx.api.views.webhooks import WebhookKeyView, GithubWebhookReceiver, GitlabWebhookReceiver # noqa
|
||||
from awx.api.pagination import JobEventPagination
|
||||
|
||||
|
||||
logger = logging.getLogger('awx.api.views')
|
||||
@@ -3832,6 +3833,7 @@ class GroupJobEventsList(BaseJobEventsList):
|
||||
class JobJobEventsList(BaseJobEventsList):
|
||||
|
||||
parent_model = models.Job
|
||||
pagination_class = JobEventPagination
|
||||
|
||||
def get_queryset(self):
|
||||
job = self.get_parent_object()
|
||||
|
||||
Reference in New Issue
Block a user