FE: Create attribute filtering
Why are we doing this work
- customers want to be able to choose the labels of the vulnerabilities they get notified for by filtering on it
Relevant links
- Designs in epic
- &6826 (comment 1422312663)
- #368074 (comment 1129501991)
- #399117 (comment 1422521410)
Implementation plan
MR 1
-
frontend create attribute filter from the generic filter - title:
Attribute: - description: Two dropdowns
- First dropdown has two options:
Is(default value) andIs not- the yaml value modified by this is: TBD
- Second four values:
Any label(default value),Fix available,Auto resolved, andFalse positive- the yaml value modified by this is: TBD
- First dropdown has two options:
- title:
-
frontend it is conditionally shown - hidden before the scanner is chosen
- when
Security Scanis chosen, it shows below the main section - when
License Scanis chosen, it is hidden
-
frontend add tool tips - see design
-
frontend ensure the description is set to the correct values when the values are changed in yaml mode -
frontend ensure the description is set to the correct values for pre-existing policies
MR 2
-
frontend ensure rule mode is disabled if incorrect values are added in yaml mode
MR 3
-
frontend update the policy list drawer to render the information correctly
Verification steps
- Ensure the GitLab Ultimate license is enabled
- Navigate to a project/group => Security & Compliance => Policies => New policy => Scan result policy
- Verify the filter is hidden
- Choose
License Scan - Verify the filter is hidden
- Choose
Security Scan - Verify the filter can be changed and the yaml is updated appropriately
- Navigate to yaml mode, make changes to values to a value that does exist, navigate to rule mode and ensure the description has been updated
- Navigate to yaml mode, make changes to the values to a value that does not exist, navigate to rule mode and ensure that rule mode is disabled
- Create the policy, edit it, verify the description is assigned the appropriate values
Edited by Martin Cavoj