Skip to content

Add custom headers form to streaming audit events

What does this MR do and why?

This MR adds the custom headers form to the audit events streaming UI. It does not add the ability to save or delete the custom headers, which will be done in future MRs.

This MR follows the constraints from the issue:

  1. Behind the :custom_headers_streaming_audit_events_ui feature flag
  2. Form should be able to add and remove rows
    • Limited to 20 rows and shows a message when the limit is reached
    • Automatically shows a new blank row when the previous row gets filled in with a header and value
    • active checkbox is disabled for now
  3. documentation updated explaining how to use the new UI and the row limit
  4. Specs added for the new UI

Screenshots or screen recordings

Empty With values Video of use (checkbox is now marked as checked, not shown in video)
image image Screen_Recording_2022-06-21_at_15.15.19

How to set up and validate locally

  1. Visit a group's audit events page e.g. http://gdk.test:3000/groups/gitlab-org/-/audit_events and look at the Streams tab.
  2. Check that the custom headers table isn't shown and that you can add new destination URLs, edit existing URLs, and delete URLs.
  3. Enable the feature flag :custom_headers_streaming_audit_events_ui: echo "Feature.enable(:custom_headers_streaming_audit_events_ui)" | rails c.
  4. Check that the custom headers table is shown and that you can add new destination URLs, edit existing URLs, and delete URLs.
    • The custom headers data will not be saved.
  5. Check that you can fill in the header name and value inputs and a new row is automatically added when you do.
  6. Check that you get a warning if the same header name is used twice.
  7. Check that you can delete a header from the table.
  8. Fill in 20 headers and check that no more can be added and a message is shown at 20 headers.

MR acceptance checklist

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

MR reviews

Related to #361630 (closed)

Edited by Evan Read

Merge request reports

Loading