Add routing to incident tabs
What does this MR do and why?
_Describe in detail what your merge request does and why.
Adds a client-side router to incidents, to allow linking directly to a specific tab in the url.
Requires !108671 (merged) to be merged first so that tests can make use of spec/support/shared_examples/features/incident_details_routing_shared_examples.rb
Backend Changes:
- Pass Current Incident tab to Incidents
- Pass Current URL to Incident so it can be used as base url for frontend router
Frontend Changes:
- Create Vue router in Incidents
- Update URL when switching tabs
- Render tab according to URL params on load
- In addition, this MR also makes use of
hasLinkedAlerts
within incident tabs to determine if alerts are present rather than requiring an apollo query to determine if tab should be present.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Screen_Recording_2023-01-24_at_12.29.36
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Ensure you are running enterprise edition
- Go to a project's settings, then Monitor
- Expand Alerts
- Add a new integration, HTTP endpoint is fine, give a mock name, in customise alert you can paste
{ "events": [{ "application": "Name of application" }] }
- Click "save and create test alert
- Navigate to Monitor -> Alerts
- 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 - in the Alert click "create incident on the top right of the alert page
- Within incident page, navigate to tabs and observe URL changes
- Make sure to visit the issues list and view the created incident as an issue
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.
issue: #367856
Edited by James Rushford