Fix cluster filter url naviation bug
What does this MR do and why?
Fix cluster filter url naviation bug
- when a user selected a cluster filter, the agent name gets appended to the URL
- when a user then tries to share this URL, the cluster agent wasn't being applied to the filter on page load
- this was because the SimpleFilter mixin only checks the filters when the 'options' property changes
- I have overridden the 'options' property in the cluster filter so that it changes when the cluster filter options are retrieved, which then rechecks the url paramaters and reapplies them
NOTE: This is a bandaid fix; the real fix is to abstract the query syncing code from the simple_filter.vue
"mixin" (it was never intended to be one, but it is now) and replace it with a new query_path_sync.vue
component as described in Abstract out Vulnerability Report filter query ... (#367557), but that is another conversation
Changelog: fixed
EE: true
Screenshots or screen recordings
Before | After |
---|---|
cluster_filter_-_b | cluster_filter_-_a |
How to set up and validate locally
-
- Ensure your GDK has a GitLab Ultimate license
- Ensure your GDK is connected to the GitLab Runner
- Follow these docs to set up the kubernetes agent
- Clone test-cis-with-agentid and run the pipeline
- Link the agent to a project
- Run the pipeline to generate vulnerabilities
- Navigate to the agent/vulnerability report
- View the vulnerabilities
- Set the cluster filter and verify the URL parameter appears in the URL
- Refresh the page and verify the URL parameter is applied to the filter
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 #337882 (closed)