Replace deprecated createFlash, add loading icon and add tabs query param to group audit events
What does this MR do and why?
This MR tidies up the following:
- Removes deprecated
createFlash. - Replaces it with
createAlerton loading and deleting failures. - Replaces it with
GlAlerton saving failures. - Adds loading icon for when the destinations are being retrieved or updated.
- Adds query params navigation to the tabs so users can go directly to a specific tab or refresh the page and be redirected back to the tab they were on.
Screenshots or screen recordings
| Scenario | Before | After |
|---|---|---|
| Destinations fails to load | ![]() |
![]() |
| Destination fails to save | ![]() |
![]() |
| Destination fails to delete | ![]() |
![]() |
| Loading processes | Screen_Recording_2022-06-22_at_16.22.40 | Screen_Recording_2022-06-22_at_16.23.35 |
How to set up and validate locally
- Visit a group's audit events page e.g.
http://gdk.test:3000/groups/gitlab-org/-/audit_eventsand look at the Streams tab. - Check that the URL has the tab param and when refreshing it goes straight back to the Streams tab.
- Using your browser's dev tools, block all requests to our
/api/graphqlendpoint and refresh the page. Check that the fails to load alert is shown. - Unblock the
/api/graphqlendpoint. - Add a new destination URL and save it. Then add a new one with the exact same URL. Check that the duplicate error message is shown.
- Using your browser's dev tools, block all requests to our
/api/graphqlendpoint and add a new destination URL. Check that the failure to save message is shown. - Try deleting the destination URL. Check that the failure to delete message is shown.
- Unblock the
/api/graphqlendpoint. - Try deleting the destination URL and see that is deleted successfully.
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.
Edited by Robert Hunt





