Skip to content

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 createAlert on loading and deleting failures.
  • Replaces it with GlAlert on 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 image image
Destination fails to save image image
Destination fails to delete image image
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

  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 URL has the tab param and when refreshing it goes straight back to the Streams tab.
  3. Using your browser's dev tools, block all requests to our /api/graphql endpoint and refresh the page. Check that the fails to load alert is shown.
  4. Unblock the /api/graphql endpoint.
  5. 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.
  6. Using your browser's dev tools, block all requests to our /api/graphql endpoint and add a new destination URL. Check that the failure to save message is shown.
  7. Try deleting the destination URL. Check that the failure to delete message is shown.
  8. Unblock the /api/graphql endpoint.
  9. 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.

Edited by Robert Hunt

Merge request reports

Loading