Sync filters with url parameters for policy list
Why are we doing this work
Security Policy list has two filters: policy type
and source
It could be beneficial for UX
to sync selected filters with url
parameters, so when user select filters it would be synced with routing history
And when user refreshes the page, selected filters stay selected
Relevant links
Non-functional requirements
-
Documentation: -
Feature flag: -
Performance: -
Testing:
Implementation plan
- Add utility url functions to
ee/security_orchestration/components/policies/list_component.vue
- Url should be synced when either
source_filter.vue
ortype_filter.vue
emits event - Use updateHistory and setUrlParams combination same as in
ee/security_orchestration/components/policy_editor/app.vue
- Add tests
Verification steps
- Go to Secure -> Policies
- Make sure you have different polices created, different by type and source
- Select filter, make sure it is reflected in url
- Refresh the page, make sure filters stay selected
- Go back and forth from page, make sure url with selected filters stays in browsing history