Refactor logic for performance modal to be reused
What does this MR do and why?
Refactor logic for performance modal to be reused
- abstract out logic to utils methods
Changelog: changed
EE: true
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Policy list | Policy editor |
---|---|
**** |
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Upload a GitLab Ultimate license
- Navigate to group => Secure => Policies
- Clone this project and link it to your group
- Apply the below patch
diff --git a/ee/app/assets/javascripts/security_orchestration/components/utils.js b/ee/app/assets/javascripts/security_orchestration/components/utils.js
index 3971416b8e23..083a8623329d 100644
--- a/ee/app/assets/javascripts/security_orchestration/components/utils.js
+++ b/ee/app/assets/javascripts/security_orchestration/components/utils.js
@@ -201,7 +201,7 @@ export const hasScheduledRule = (policy) => {
};
export const checkForPerformanceRisk = ({ policy, namespaceType, projectsCount }) => {
- const PROJECTS_COUNT_PERFORMANCE_LIMIT = 1000;
+ const PROJECTS_COUNT_PERFORMANCE_LIMIT = -1000;
return (
hasScheduledRule(policy) &&
- Select a scan execution policy with a schedule pipeline and delete it
- Verify the performance check appears
- Select a scan execution policy with a schedule pipeline and edit it
- Delete it from the policy editor
- Verify the performance check appears
- Select other policies that do not meet the above criteria and ensure the performance check does not appear
Related to #474839 (closed)
Edited by Alexander Turinske