Skip to content

Make use of hasLinkedAlerts in incident tabs

James Rushford requested to merge use-hasLinkedAlerts-in-incident-tabs into master

What does this MR do and why?

Describe in detail what your merge request does and why.

IncidentTabs immediately makes a call to check for any linked alerts on load. Previously this information was used to determine if the AlertsTab should be rendered, alternatively, the new behaviour checked for hasLinkedAlerts which was already being passed to the frontend to determine if AlertsTab should be rendered or not. No UX changed. Some test refactoring.

Screenshots or screen recordings

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

With Alerts No Alerts
Screenshot_2023-02-17_at_17.53.25 Screenshot_2023-02-17_at_17.53.46

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Ensure you are running enterprise edition
  2. Go to a project's settings, then Monitor
  3. Expand Alerts
  4. Add a new integration, HTTP endpoint is fine, give a mock name, in customise alert you can paste { "events": [{ "application": "Name of application" }] }
  5. Click "save and create test alert
  6. Navigate to Monitor -> Alerts
  7. Open the new test alert 7.a (If it isn't there, you can navigate back to integration settings, open the settings for the new integration, go to the tab called "send test alert" and paste this { "events": [{ "application": "Name of application" }] } and send
  8. in the Alert click "create incident on the top right of the alert page
  9. Alert Tab should new be rendered
  10. To test without alerts, create an incident from Monitor -> Incidents -> new incident. Alert tab should not be rendered when there are no alerts

MR acceptance checklist

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

issue: #367856

Edited by James Rushford

Merge request reports