Skip to content
Snippets Groups Projects
Verified Commit 5672df16 authored by Michael Becker's avatar Michael Becker
Browse files

Add a `/disabled_filters` route to the dependencies controllers

Context
-------------------------

We have some filters that we disable when certain conditions
are met, for example if a group has too many vulnerabilities.

Currently, if you try filtering with a disabled filter, you
will get a "too many vulnerabilities" error response. We would
like to give a tool-tip in the UI to explain the filter is
disabled ahead of any error response. We have done that for a
few filters by injecting booleans into the page on load.

As we continue adding filters that need to be disabled in certain
circumstances, we are looking for a way frontend could reliably know
what filters are disabled for a given `vulnerable`. We achieve this
via a graphql extension.

Future work
-------------------------

rather than calculating these disabled filters every time, we could
have frontend request specific "filter hints" and only build the array
if requested

This change
-------------------------

1. Adds a `disabled_filters` array to the graphql response if the
   vulnerability resolver is invoked
    - behind a de-risk FF
2. DRYs up the code that disables the identifier search

epic: &13340
related to: #517915
resolves: #517925
MR: !180973
Changelog: changed
EE: truewe have some filters that we disable when certain conditions
are met, for example if a group has too many vulnerabilities.
parent a73bf91a
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment