From cadf1eb5ab377983330ae4f1b115e1e1ab9c03b0 Mon Sep 17 00:00:00 2001 From: Zhu Jiekun Date: Thu, 11 Jul 2024 17:43:00 +0800 Subject: [PATCH] vmalert: [bug] fixed System hyperlink 404 redirect (#6620) ### Describe Your Changes As mentioned in https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6603, some hyperlinks under `vmalert` -> `System` section is not working as expected. Pages and redirection: - For page `http://127.0.0.1:8880/`: `flags` button will redirect to `http://127.0.0.1:8880/flags` - For page `http://127.0.0.1:8880/vmalert`: `http://127.0.0.1:8880/flags` - For page `http://127.0.0.1:8880/vmalert/`: `http://127.0.0.1:8880/vmalert/flags` (page not exists) - Similar redirection could be observed with `-http.pathPrefix` Two potential ways to avoid 404 redirection: 1. **avoid visiting `/vmalert/`** (I'm trying to do this). 2. provide support for `/vmalert/flags`. `/vmalert/` could be visit only when user click other navigator (e.g. Group) and click vmalert again: ![Peek 2024-07-10 10-07](https://github.com/VictoriaMetrics/VictoriaMetrics/assets/30280396/13d7b147-a1b6-4e93-9ee0-26f881a16bef) Because: `http://127.0.0.1:8880/vmalert/groups?search=` + `` = `http://127.0.0.1:8880/vmalert/` So I'm trying to change the `href="."` to `href="../vmalert"`. ### Checklist The following checks are **mandatory**: - [X] My change adheres [VictoriaMetrics contributing guidelines](https://docs.victoriametrics.com/contributing/). --- app/vmalert/web.go | 2 +- docs/CHANGELOG.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/vmalert/web.go b/app/vmalert/web.go index dd01ee953..0b392ead8 100644 --- a/app/vmalert/web.go +++ b/app/vmalert/web.go @@ -35,7 +35,7 @@ var ( {"-/reload", "reload configuration"}, } navItems = []tpl.NavItem{ - {Name: "vmalert", Url: "."}, + {Name: "vmalert", Url: "../vmalert"}, {Name: "Groups", Url: "groups"}, {Name: "Alerts", Url: "alerts"}, {Name: "Notifiers", Url: "notifiers"}, diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index acc6773c4..7dfcaadf1 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -57,6 +57,7 @@ See also [LTS releases](https://docs.victoriametrics.com/lts-releases/). * BUGFIX: [docker-compose](https://github.com/VictoriaMetrics/VictoriaMetrics/tree/master/deployment/docker#docker-compose-environment-for-victoriametrics): fix incorrect link to vmui from [VictoriaMetrics plugin in Grafana](https://github.com/VictoriaMetrics/VictoriaMetrics/tree/master/deployment/docker#grafana). * BUGFIX: [docker-compose](https://github.com/VictoriaMetrics/VictoriaMetrics/tree/master/deployment/docker#docker-compose-environment-for-victoriametrics): fix incorrect link to vmui from [VictoriaMetrics plugin in Grafana](https://github.com/VictoriaMetrics/VictoriaMetrics/tree/master/deployment/docker#grafana). * BUGFIX: [Single-node VictoriaMetrics](https://docs.victoriametrics.com/) and `vmstorage` in [VictoriaMetrics cluster](https://docs.victoriametrics.com/cluster-victoriametrics/): Fix the dateMetricIDCache consistency issue that leads to duplicate per-day index entries when new time series are inserted concurrently. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6534) for details. +* BUGFIX: [vmalert](https://docs.victoriametrics.com/vmalert/): fix incorrect redirection in WebUI of vmalert. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6603) and [this pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/6620). * BUGFIX: [vmui](https://docs.victoriametrics.com/#vmui): fix input cursor position reset in modal settings. See [this pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/6530). * BUGFIX: [vmbackupmanager](https://docs.victoriametrics.com/vmbackupmanager/): fix `vm_backup_last_run_failed` metric not being properly initialized during startup. Previously, it could imply an error even if the backup have been completed successfully. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6550) for the details. * BUGFIX: [MetricsQL](https://docs.victoriametrics.com/MetricsQL.html): properly calculate [histogram_quantile](https://docs.victoriametrics.com/MetricsQL.html#histogram_quantile) over Prometheus buckets with inconsistent values. See [this comment](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4580#issuecomment-2186659102) and [this pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/6547). Updates [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2819).