Skip to content

Add pagination to standards adherence table

Jay Montal requested to merge 419961_paginate_adherence_report_list into master

What does this MR do and why?

What

Add pagination to standards adherence table

Why

Adds pagination to the compliance report standards adherence tab (table) to paginate a maximum of 20 items per GraphQL query

Screenshots or screen recordings

Before After
image 2023-09-12_18.18.42

How to set up and validate locally

Enable FFs

  1. In the rails console (rails c) enable the following features:
  2. adherence_report_ui (Feature.enable(:adherence_report_ui))
  3. compliance_adherence_report (Feature.enable(:compliance_adherence_report, group))

Setup Adherences

  1. Visit group settings and enable "Prevent approval by author" from the 'Merge Request Approval' section.
  2. This will create a couple of rows inside the project_compliance_standards_adherence table.

Visit Standard Adherence page

  1. Visit a group, under Secure (new UI) or Security & Compliance (old UI) > Compliance report

Note: Since 20 max items are displayed on the table, you need to have at least 20 standard adherences in order for pagination to appear - you can either update the GRAPHQL_PAGE_SIZE constant or create a few more projects to trigger additional adherences

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 #419961 (closed)

Edited by Jay Montal

Merge request reports