VictoriaMetrics/app/vmalert
Zhu Jiekun 2ea575e776
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=` + `<a
class="nav-link" href=".">` = `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/).

(cherry picked from commit cadf1eb5ab)
2024-07-11 12:40:23 +02:00
..
config all: consistently use 'any' instead of 'interface{}' 2024-07-10 00:23:26 +02:00
datasource all: consistently use 'any' instead of 'interface{}' 2024-07-10 00:23:26 +02:00
deployment
multiarch deployment: build image for vmagent streamaggr benchmark (#6515) 2024-06-24 16:29:14 +02:00
notifier all: consistently use 'any' instead of 'interface{}' 2024-07-10 00:23:26 +02:00
remoteread
remotewrite app/vmalert: follow-up bc37b279aa 2024-06-20 15:15:58 +02:00
rule all: consistently use 'any' instead of 'interface{}' 2024-07-10 00:23:26 +02:00
static
templates all: consistently use 'any' instead of 'interface{}' 2024-07-10 00:23:26 +02:00
tpl
utils
main.go vmalert: allow omitting -replay.timeTo in replay mode, default valu… (#6575) 2024-07-05 09:49:06 +02:00
main_test.go
Makefile vmalert: allow omitting -replay.timeTo in replay mode, default valu… (#6575) 2024-07-05 09:49:06 +02:00
manager.go
manager_test.go
README.md
replay.go vmalert: allow omitting -replay.timeTo in replay mode, default valu… (#6575) 2024-07-05 09:49:06 +02:00
replay_test.go
web.go vmalert: [bug] fixed System hyperlink 404 redirect (#6620) 2024-07-11 12:40:23 +02:00
web.qtpl
web.qtpl.go
web_test.go all: consistently use 'any' instead of 'interface{}' 2024-07-10 00:23:26 +02:00
web_types.go all: consistently use 'any' instead of 'interface{}' 2024-07-10 00:23:26 +02:00
web_types_test.go

See vmalert docs here.

vmalert docs can be edited at docs/vmalert.md.