FE: Add `Type` filter for Policy table
Why are we doing this work
- The policy table will have many different types of policies
- Users will want to be able to filter by policy type in the policy table
Relevant links
Design: #267346[3a.dastpolicies.png]
Non-functional requirements
- [-] Documentation
- [-] Document how to filter by policy type?
-
Testing -
Filter component renders supported options. -
Policy list filters items properly. -
Does not trigger unnecessary GraphQL queries.
-
Implementation plan
-
frontend Allow for users to filter policies by the Type
column in the Policy table in https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/app/assets/javascripts/threat_monitoring/components/network_policy_list.vue-
Move environment_picker.vue
to afilters/
subdirectory. -
Create a PolicyTypeFilter
component. Consider leveragingee/app/assets/javascripts/security_configuration/components/dropdown_input.vue
.-
It relies on a list of supported policy types (defined as constants client-side) to render options.
-
-
The policy list syncs a local state property via a v-model
. -
Policies are filtered client-side based on the filter's value. -
GraphQL queries should be skipped when the filter's value would prevent their result from being displayed.
-
Edited by Paul Gascou-Vaillancourt