vmalert: add anchor char to Group's link (#4006)

This should help users to see that Group's name is clickable
and used for anchoring.

Signed-off-by: hagen1778 <roman@victoriametrics.com>
This commit is contained in:
Roman Khavronenko 2023-03-24 09:48:43 +01:00 committed by Aliaksandr Valialkin
parent ec6a20880c
commit a09dabc78f
No known key found for this signature in database
GPG key ID: A72BEC6CD3D0DED1
2 changed files with 2 additions and 2 deletions

View file

@ -52,7 +52,7 @@
{% for _, g := range groups %}
<div class="group-heading{% if rNotOk[g.ID] > 0 %} alert-danger{% endif %}" data-bs-target="rules-{%s g.ID %}">
<span class="anchor" id="group-{%s g.ID %}"></span>
<a href="#group-{%s g.ID %}">{%s g.Name %}{% if g.Type != "prometheus" %} ({%s g.Type %}){% endif %} (every {%f.0 g.Interval %}s)</a>
<a href="#group-{%s g.ID %}">{%s g.Name %}{% if g.Type != "prometheus" %} ({%s g.Type %}){% endif %} (every {%f.0 g.Interval %}s) #</a>
{% if rNotOk[g.ID] > 0 %}<span class="badge bg-danger" title="Number of rules with status Error">{%d rNotOk[g.ID] %}</span> {% endif %}
<span class="badge bg-success" title="Number of rules withs status Ok">{%d rOk[g.ID] %}</span>
<p class="fs-6 fw-lighter">{%s g.File %}</p>

View file

@ -227,7 +227,7 @@ func StreamListGroups(qw422016 *qt422016.Writer, r *http.Request, groups []APIGr
//line app/vmalert/web.qtpl:55
qw422016.N().FPrec(g.Interval, 0)
//line app/vmalert/web.qtpl:55
qw422016.N().S(`s)</a>
qw422016.N().S(`s) #</a>
`)
//line app/vmalert/web.qtpl:56
if rNotOk[g.ID] > 0 {