Skip to content

Improve audit event stream form disabling

What does this MR do and why?

Relates to #414985 (closed)

This MR improves the UX for disabling the submission of the http and google cloud logging form:

  • when nothing is edited, the save button is disabled
  • when an empty header (http destination) is added, the save button is disabled

It also improves the UX when saving. Before it would collapse the form. Now it keeps it expanded and shows the success alert within the form (instead of on top).

Screenshots or screen recordings

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

Before After
http-destination-save-before http-destination-save-after
save-destination-before save-destination-after
http-default-before http-default-after
gcp-default-before gcp-default-after
http-empty-header-before http-empty-header-after

improved-disabled-state

How to set up and validate locally

  1. go to a group audit events streams, like http://gdk.test:3000/groups/gitlab-org/-/audit_events?tab=streams
  2. validate that for creating a new destination:
    1. (both http and google cloud logging) after clicking "add" the success alert still shows up at the top of the page (above the x destination count header)
    2. for the http destination: adding an empty header (so no name and value), the form is disabled
  3. validate that for editing a destination:
    1. (both http and google cloud logging) after clicking "save", the form does not collapse and the success message is shown within the form
    2. (both http and google cloud logging) When expanding a destination (to start editing), the save button is disabled (because nothing is edited)
    3. (both http and google cloud logging) if you edit values in the input, but then convert to their original values, the save button is disabled again.
    4. for http form: adding a blank header (no name and no value) disables save button
    5. having 2 (or more) headers with the same name also still disables the save button

MR acceptance checklist

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

Edited by Lorenz van Herwaarden

Merge request reports