Improve vulnerability filter component logic
What does this MR do?
On the security dashboard, there are filters that will filter the list of vulnerabilities:
These filters have a parent first_class_vulnerability_filters.vue
component that has a list of filters:
Previously, this parent component did all the heavy lifting, and each filter only emitted an event when an option in it was clicked:
This meant that each filter needed to follow the same format and behavior:
However, now we need to add new filters that have different behavior:
Scanner filter | Activity filter |
---|---|
To make it easier to create filters with different behavior from the standard filter, this MR moves most of the logic from teh parent component into the filter itself:
This lets us create new filters with custom behavior, because each filter's behavior is now self-contained rather than relying on a parent component to handle it. An example of a custom filter can be seen in this MR: !46540 (merged)
Does this MR meet the acceptance criteria?
Conformity
- [-] Changelog entry
- [-] Documentation (if required)
-
Code review guidelines -
Merge request performance guidelines -
Style guides - [-] Database guides
-
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers - [-] Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Relates to #229661 (closed)