[Frontend] Add Cluster filter to the filtered search component
Summary
Create a component for the Filtered Search Component that replicates the logic in Cluster Filter. We can re-use the same logic, but the presentational layer needs to be adapted.
Verification steps
- Go to https://gitlab.com/gitlab-org/govern/threat-insights-demos/verification-projects/verify-epic-3429/-/security/vulnerability_report/?tab=OPERATIONAL
- Click on the filtered search bar, verify one of the available tokens is Cluster.
- We'll need to provide some mock data, because we don't have any cluster agents set.
- Use tweak chrome extension
- Click hamburger menu in extension and select import and use this config: tweak-config-prod.json
- Enable by clicking play button. Refresh page.
- Click on it and verify that All clusters and 3 other agents are shown as options
- Clicking "agent-007" should send the variable
"clusterAgentIds": ["gid://gitlab/Clusters::Agent/2"]
in theprojectVulnerabilities
graphql query. - Click "All clusters" should send the variable
"clusterAgentIds": []
Edited by Lorenz van Herwaarden