Skip to content

Add pagination for toggle list

What does this MR do and why?

This MR adds pagination for toggle list

Project toggle list can be 100+ projects This MR handles case where group has 100+ project for project scope

On the video, it is tested with 3 items page, but normally it is 100 items pages, it is unlikely to have 100+ projects in a policy scope for the group.

But this MR offers first iteration on how to handle this age case, with loading more items instead of toggling the list.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Description UI
More pages on backend 3 item page.mov
Regular UI no pages.mov

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Enable Feature Flag

    Feature.enable(:security_policies_policy_scope)  
  2. Go to a Group -> Secure -> Policies -> New policy -> New scan result/execution policy -> check Policy scope section is there.

  3. Create 3 different policies with policy scope different options (excluding, including projects, excluding without exceptions would query all projects in group)

  4. Go back to policy list and select newly created policies one by one, make sure policy scope section exist in the drawer

  5. You can manually set page size here ee/security_orchestration/graphql/queries/get_group_projects.query.graphql instead of 100, make 3 (in case you don't have enough projects in a group.

Related to #435844 (closed)

Merge request reports