Use `without_count` for audit event records paginated with `paginate_without_counts`
What does this MR do?
Fix 1 (backend change only, no visible UI change):
While working on the comment !20912 (comment 254868656), I noticed that in Admin Audit Events, even while using paginate_without_counts
for pagination, the records itself do not have without_count
called on them, and this
leads to a count query being executed anyway.
So, it is essential that we call without_count
on the ActiveRecord collection, when paginating using paginate_without_counts
Documentation: https://github.com/kaminari/kaminari#paginating-without-issuing-select-count-query
This is how pagination without page numbers looks like (current behaviour in Admin Audit Logs UI)
Fix 2:
Update: This change is dropped from this MR as per discussion with UX. Commit has been rebased to only include changes in Fix 1.
I also noticed that in Project
and Group
Audit Logs UI, we paginate with page numbers - which is different from what we follow in Admin Audit Logs - where we paginate without page numbers.
Hence, to bring feature parity between the two, I have changed pagination in Project
and Group
Audit Logs UI to use pagination without page numbers.
Before:
Pagination has page numbers (this is different from the behaviour in Admin Audit Events UI)
After:
Pagination does not have page numbers (this is in-line with current behaviour in Admin Audit Events UI)
Screenshots
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team