FE: Create age filtering
Why are we doing this work
- customers want to be able to choose the age of vulnerabilities they get notified by filtering for status
Relevant links
- Designs in epic
Implementation plan
MR 1
-
frontend create age filter with generic filter - title:
Age is: - description: Dropdown, Input, Dropdown
- First dropdown has three options:
Any(default value),More than, andLess than- the yaml value modified by this is: TBD
- Second two values conditionally render if
More/Less thanis chosen- Number input
- the yaml value modified by this is: TBD
- Second dropdown has
Day,Week,Month, andYear- the yaml value modified by this is: TBD
- Number input
- First dropdown has three 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 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
MR 4
-
frontend prevent age filter to be used with only newvulnerabilities. It only makes sense for policies based on previously detected vulnerabilities.
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