Add sorting to compliance report violations table
What does this MR do and why?
Adds sorting to compliance report violations table as described in #299369 (closed):
- Enables sorting on the
GlTable
. - Default sorts by
SEVERITY_DESC
. - Sorts the apollo violations query.
- Syncs the sort param with the URL.
- Updates the fields to match the API sort enum !78681 (diffs).
Notes:
- This change is hidden behind a development feature flag.
- Sorting is not available on smaller viewports when
GlTable
is collapsed, this will be added in a follow-up. - The results won't update because we're using a static mock resolver while the backend is in development.
Screenshots or screen recordings
Screen_Recording_2022-01-26_at_14.55.32
The only UI change is the sort icon on the table columns.
How to set up and validate locally
- You need a GitLab Ultimate license.
- Enable the new feature flag in your terminal:
echo "Feature.enable(:compliance_violations_report)" | rails c
- View the compliance report and use the filter and sort features:
[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.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #299369 (closed)
Edited by Jiaan Louw