Skip to content

Sync compliance report parameters with URL

Elwyn Benson requested to merge 393571-sync-parameters-with-url into master

What does this MR do and why?

Implement review suggestion from previous MR to sync report parameters (e.g. pagination state) to the URL such that the URL is the single source of truth for the state of the report.

Adds vue-router to the top level to control the tabs that switch between violations / frameworks reports. Use query params fomr the $route, instead of maintaining urlParams in state manually. Sync pagination parameters to the URL params.

Screenshots or screen recordings

compliance-reports_url-params-sync

How to set up and validate locally

  1. Be on GitLab Ultimate
  2. Browse to a Group (you must be Owner) -> Security & Compliance -> Compliance Report -> Frameworks tab
  3. Switching tabs should update URL (/violations, /frameworks)
  4. Changing page / page size should update the query params
  5. Existing violations URL (/, without /violations) correctly redirects to new /violations path, and carries over any query params that may be set
  6. When feature flag is disabled, tabs do not show but existing violations report continues to work. New report cannot be accessed by direct URL
Feature.enable(:compliance_frameworks_report)
Feature.disable(:compliance_frameworks_report)

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

Edited by Elwyn Benson

Merge request reports