Skip to content

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 delete

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Upload a GitLab Ultimate license
  2. Navigate to group => Secure => Policies
  3. Clone this project and link it to your group
  4. 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) &&
  1. Select a scan execution policy with a schedule pipeline and delete it
  2. Confirm the modal
  3. Verify the MR is created that deletes the policy
  4. Select a scan execution policy with a schedule pipeline and edit it
  5. Delete it from the policy editor
  6. Verify the performance check appears
  7. 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

Merge request reports

Loading