Skip to content

Update policy editor alert to be consistent

Alexander Turinske requested to merge 362752-update-policy-editor-alert into master

What does this MR do and why?

Describe in detail what your merge request does and why.

Update policy editor alert to be consistent

  • update errors on the frontend to match the errors that come from the backend
  • previously the error from the backend had a title, but errors like not having a policy name and non-existent policy did not have a title
  • ensure policy editor alert always has a title
  • ensure policy alert disappears on a new error

Changelog: changed

EE: true

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Error from the backend (not affected by this MR)
image
Scenario Before After
Empty policy name empty_policy_name_-_b empty_policy_name_-_a
non-existent policy branch non-existent_branch_-_b non-existent_branch_-_a

How to set up and validate locally

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

  1. Upload a GitLab Ultimate licence
  2. Navigate to http://gdk.test:3443/flightjs/Flight/-/security/policies/new?type=scan_execution_policy
  3. Click Configure with merge request and verify the error
  4. Add a name and type in a non-existent branch and click 'Configure with merge request' and verify the error

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #362752 (closed)

Edited by Alexander Turinske

Merge request reports