Hide limit alert message for auto-dismiss actions

What does this MR do and why?

This change modifies a security policy editor component to conditionally show a warning alert. Previously, the alert was always displayed, but now it only appears when the policy action type is set to "auto-resolve". The code adds a new computed property that checks if the current policy's first action is of the auto-resolve type, and uses this check to control when the alert is shown. A test was also added to verify that the limit warning is not displayed for auto-dismiss actions, ensuring the alert behavior works correctly for different action types.

References

Screenshots or screen recordings

Description UI
Alert message alert.mov

How to set up and validate locally

  1. Enable feature flag

    Feature.enable(:auto_dismiss_vulnerability_policies)
  2. Go to Secure -> Policies

  3. New vulnerability policy

  4. Switch between action types, make sure limit alert is only visible for auto-resolve actions

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #577877 (closed)

Edited by Artur Fedorov

Merge request reports

Loading