Update performance modal to pass action
What does this MR do and why?
Update performance modal to pass action
- with the performance modal, the code flow did not pass up the correct action if a user tried to REMOVE a policy since the modal confirm did not pass the action
- persist the action and pass it again on modal confirm
- clear the action on modal cancel
- update tests
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.
Before Video | After Video | After Screenshot |
---|---|---|
delete_previously_small | delete_movie_small |
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
- Confirm the modal
- Verify the MR is created that deletes the policy
- 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 #482525 (closed)
Edited by Alexander Turinske