Disable add action button when limit is reached

What does this MR do and why?

Disable add action button when limit is reached

Scan execution policy has a limit for actions.

We need to disable add button when limit is reached

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.

Description UI

Limit to actions

Button is disabled

limit.mov

How to set up and validate locally

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

  1. Enable feature flags:

    Feature.enable(:scan_execution_policy_action_limit)
    Feature.enable(:scan_execution_policy_action_limit_group)
  2. Go to Group/Project

  3. Secure -> Policies

  4. New Scan execution policy

  5. Add 10 actions, make sure add button is disabled

  6. Go to yaml mode, copy paste over 20 actions

  7. Go back to rule mode

  8. Make sure only 10 items are displayed

Related to #500072 (closed)

Merge request reports

Loading