Skip to content

Add pagination to the compliance violations report

What does this MR do and why?

Adds sorting to compliance report violations table as described in #342899 (closed):

  • Adds the GlKeysetPagination component.
  • Adds pagination to the GraphQL query.
  • Vertically centres the table loading icon.
  • Updates report spec.

Notes:

  • This change is hidden behind a development feature flag.
  • The results won't update because we're using a static mock resolver while the backend is in development.

Screenshots or screen recordings

Default

Before After
image image

Loading

Before After
Screenshot_2022-02-07_at_11.13.38 Screenshot_2022-02-07_at_11.14.09

How to set up and validate locally

  1. You need a GitLab Ultimate license.
  2. Enable the new feature flag in your terminal: echo "Feature.enable(:compliance_violations_report)" | rails c
  3. View the compliance report and use the pagination feature: [GDK_HOST]/groups/gitlab-org/-/security/compliance_dashboard

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #342899 (closed)

Edited by Jiaan Louw

Merge request reports