Path on alert tabs needs updating
Summary
The path shown in the browser in alert tabs doesn't accurately reflect the tabs selected. This is especially apparent on the Activity Feed tab, which says the following in the browser:
gitlab.com/gitlab-examples/ops/incident-setup/everyone/tanuki-inc/-/alert_management/556/details/metrics
Steps to reproduce
Set up alerts, if you haven't already:
- Navigate to Settings > Monitor
- Expand the Alert section, and click the button to "Enable a new integration"
- Select "HTTP endpoint" in the integration type dropdown. Add an integration name, turn the toggle to "active", and click to "Save the integration"
- Once the integration is added, click on the settings icon button in the integration table
- Click on the "Send test alert" tab
- Enter the sample payload shown below, and click send.
- Navigate to Monitor > Alerts, where you will see the new alert appear.
{ "title": "Gitaly latency is too high", "description": "https://gitlab.com/gitlab-com/runbooks/-/blob/master/docs/gitaly/gitaly-latency.md", "service": "service not affected", "monitoring_tool": "GitLab scripts", "severity": "high", "host": "fe-2" }
Then, view the alert, and click on the activity feed tab.
Example Project
What is the current bug behavior?
If you click on the Activity feed
tab of alerts, the full URL says .../details/metrics
, which presumably should actually be the url for the metrics tab, rather than the activity feed tab.
In addition, if you are using a relative url, the 'relative' portion of the url gets duplicated as soon as you navigate to the alert details page, perhaps due to vue router config not setting a base url correctly.
Example:
- My alert management page is at
http://gdk.test:3001/gitlab/root/gdk-timeline-test/-/alert_management
locally.- My relative url is
/gitlab
, so gitlab is athttp://gdk.test:3001/gitlab
for me.
- My relative url is
- Clicking on an alert takes me to
http://gdk.test:3001/gitlab/gitlab/root/gdk-timeline-test/-/alert_management/3/details/overview
What is the expected correct behavior?
The path should more accurately describe the tab the user is on. If someone is on the activity feed, for example, the path shouldn't say metrics, it should say activity, or something similar. Also, the relative portion of the url shouldn't be repeated.
Note: if the relative url portion of the work requires a separate fix, we can break it into a separate issue
Relevant logs and/or screenshots
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)