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:
- Behind the
:custom_headers_streaming_audit_events_ui
feature flag - 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
andvalue
-
active
checkbox is disabled for now
- documentation updated explaining how to use the new UI and the row limit
- 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) |
---|---|---|
Screen_Recording_2022-06-21_at_15.15.19 |
How to set up and validate locally
- Visit a group's audit events page e.g.
http://gdk.test:3000/groups/gitlab-org/-/audit_events
and look at the Streams tab. - Check that the custom headers table isn't shown and that you can add new destination URLs, edit existing URLs, and delete URLs.
- Enable the feature flag
:custom_headers_streaming_audit_events_ui
:echo "Feature.enable(:custom_headers_streaming_audit_events_ui)" | rails c
. - 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.
- Check that you can fill in the header name and value inputs and a new row is automatically added when you do.
- Check that you get a warning if the same header name is used twice.
- Check that you can delete a header from the table.
- 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.
-
I have evaluated the MR acceptance checklist for this MR.
MR reviews
-
backend review -
backend maintainer -
UX review -
documentation review -
frontend review -
frontend maintainer
Related to #361630 (closed)
Edited by Evan Read