diff --git a/app/vmalert/notifier/alertmanager_request.qtpl.go b/app/vmalert/notifier/alertmanager_request.qtpl.go index 8a6ce45e24..f3f7b193a6 100644 --- a/app/vmalert/notifier/alertmanager_request.qtpl.go +++ b/app/vmalert/notifier/alertmanager_request.qtpl.go @@ -1,135 +1,135 @@ // Code generated by qtc from "alertmanager_request.qtpl". DO NOT EDIT. // See https://github.com/valyala/quicktemplate for details. -//line app/vmalert/notifier/alertmanager_request.qtpl:1 +//line notifier/alertmanager_request.qtpl:1 package notifier -//line app/vmalert/notifier/alertmanager_request.qtpl:1 +//line notifier/alertmanager_request.qtpl:1 import ( "time" "github.com/VictoriaMetrics/VictoriaMetrics/lib/promrelabel" ) -//line app/vmalert/notifier/alertmanager_request.qtpl:8 +//line notifier/alertmanager_request.qtpl:8 import ( qtio422016 "io" qt422016 "github.com/valyala/quicktemplate" ) -//line app/vmalert/notifier/alertmanager_request.qtpl:8 +//line notifier/alertmanager_request.qtpl:8 var ( _ = qtio422016.Copy _ = qt422016.AcquireByteBuffer ) -//line app/vmalert/notifier/alertmanager_request.qtpl:8 +//line notifier/alertmanager_request.qtpl:8 func streamamRequest(qw422016 *qt422016.Writer, alerts []Alert, generatorURL func(Alert) string, relabelCfg *promrelabel.ParsedConfigs) { -//line app/vmalert/notifier/alertmanager_request.qtpl:8 +//line notifier/alertmanager_request.qtpl:8 qw422016.N().S(`[`) -//line app/vmalert/notifier/alertmanager_request.qtpl:10 +//line notifier/alertmanager_request.qtpl:10 for i, alert := range alerts { -//line app/vmalert/notifier/alertmanager_request.qtpl:10 +//line notifier/alertmanager_request.qtpl:10 qw422016.N().S(`{"startsAt":`) -//line app/vmalert/notifier/alertmanager_request.qtpl:12 +//line notifier/alertmanager_request.qtpl:12 qw422016.N().Q(alert.Start.Format(time.RFC3339Nano)) -//line app/vmalert/notifier/alertmanager_request.qtpl:12 +//line notifier/alertmanager_request.qtpl:12 qw422016.N().S(`,"generatorURL":`) -//line app/vmalert/notifier/alertmanager_request.qtpl:13 +//line notifier/alertmanager_request.qtpl:13 qw422016.N().Q(generatorURL(alert)) -//line app/vmalert/notifier/alertmanager_request.qtpl:13 +//line notifier/alertmanager_request.qtpl:13 qw422016.N().S(`,`) -//line app/vmalert/notifier/alertmanager_request.qtpl:14 +//line notifier/alertmanager_request.qtpl:14 if !alert.End.IsZero() { -//line app/vmalert/notifier/alertmanager_request.qtpl:14 +//line notifier/alertmanager_request.qtpl:14 qw422016.N().S(`"endsAt":`) -//line app/vmalert/notifier/alertmanager_request.qtpl:15 +//line notifier/alertmanager_request.qtpl:15 qw422016.N().Q(alert.End.Format(time.RFC3339Nano)) -//line app/vmalert/notifier/alertmanager_request.qtpl:15 +//line notifier/alertmanager_request.qtpl:15 qw422016.N().S(`,`) -//line app/vmalert/notifier/alertmanager_request.qtpl:16 +//line notifier/alertmanager_request.qtpl:16 } -//line app/vmalert/notifier/alertmanager_request.qtpl:16 +//line notifier/alertmanager_request.qtpl:16 qw422016.N().S(`"labels": {"alertname":`) -//line app/vmalert/notifier/alertmanager_request.qtpl:18 +//line notifier/alertmanager_request.qtpl:18 qw422016.N().Q(alert.Name) -//line app/vmalert/notifier/alertmanager_request.qtpl:19 +//line notifier/alertmanager_request.qtpl:19 lbls := alert.toPromLabels(relabelCfg) -//line app/vmalert/notifier/alertmanager_request.qtpl:20 +//line notifier/alertmanager_request.qtpl:20 for _, l := range lbls { -//line app/vmalert/notifier/alertmanager_request.qtpl:20 +//line notifier/alertmanager_request.qtpl:20 qw422016.N().S(`,`) -//line app/vmalert/notifier/alertmanager_request.qtpl:21 +//line notifier/alertmanager_request.qtpl:21 qw422016.N().Q(l.Name) -//line app/vmalert/notifier/alertmanager_request.qtpl:21 +//line notifier/alertmanager_request.qtpl:21 qw422016.N().S(`:`) -//line app/vmalert/notifier/alertmanager_request.qtpl:21 +//line notifier/alertmanager_request.qtpl:21 qw422016.N().Q(l.Value) -//line app/vmalert/notifier/alertmanager_request.qtpl:22 +//line notifier/alertmanager_request.qtpl:22 } -//line app/vmalert/notifier/alertmanager_request.qtpl:22 +//line notifier/alertmanager_request.qtpl:22 qw422016.N().S(`},"annotations": {`) -//line app/vmalert/notifier/alertmanager_request.qtpl:25 +//line notifier/alertmanager_request.qtpl:25 c := len(alert.Annotations) -//line app/vmalert/notifier/alertmanager_request.qtpl:26 +//line notifier/alertmanager_request.qtpl:26 for k, v := range alert.Annotations { -//line app/vmalert/notifier/alertmanager_request.qtpl:27 +//line notifier/alertmanager_request.qtpl:27 c = c - 1 -//line app/vmalert/notifier/alertmanager_request.qtpl:28 +//line notifier/alertmanager_request.qtpl:28 qw422016.N().Q(k) -//line app/vmalert/notifier/alertmanager_request.qtpl:28 +//line notifier/alertmanager_request.qtpl:28 qw422016.N().S(`:`) -//line app/vmalert/notifier/alertmanager_request.qtpl:28 +//line notifier/alertmanager_request.qtpl:28 qw422016.N().Q(v) -//line app/vmalert/notifier/alertmanager_request.qtpl:28 +//line notifier/alertmanager_request.qtpl:28 if c > 0 { -//line app/vmalert/notifier/alertmanager_request.qtpl:28 +//line notifier/alertmanager_request.qtpl:28 qw422016.N().S(`,`) -//line app/vmalert/notifier/alertmanager_request.qtpl:28 +//line notifier/alertmanager_request.qtpl:28 } -//line app/vmalert/notifier/alertmanager_request.qtpl:29 +//line notifier/alertmanager_request.qtpl:29 } -//line app/vmalert/notifier/alertmanager_request.qtpl:29 +//line notifier/alertmanager_request.qtpl:29 qw422016.N().S(`}}`) -//line app/vmalert/notifier/alertmanager_request.qtpl:32 +//line notifier/alertmanager_request.qtpl:32 if i != len(alerts)-1 { -//line app/vmalert/notifier/alertmanager_request.qtpl:32 +//line notifier/alertmanager_request.qtpl:32 qw422016.N().S(`,`) -//line app/vmalert/notifier/alertmanager_request.qtpl:32 +//line notifier/alertmanager_request.qtpl:32 } -//line app/vmalert/notifier/alertmanager_request.qtpl:33 +//line notifier/alertmanager_request.qtpl:33 } -//line app/vmalert/notifier/alertmanager_request.qtpl:33 +//line notifier/alertmanager_request.qtpl:33 qw422016.N().S(`]`) -//line app/vmalert/notifier/alertmanager_request.qtpl:35 +//line notifier/alertmanager_request.qtpl:35 } -//line app/vmalert/notifier/alertmanager_request.qtpl:35 +//line notifier/alertmanager_request.qtpl:35 func writeamRequest(qq422016 qtio422016.Writer, alerts []Alert, generatorURL func(Alert) string, relabelCfg *promrelabel.ParsedConfigs) { -//line app/vmalert/notifier/alertmanager_request.qtpl:35 +//line notifier/alertmanager_request.qtpl:35 qw422016 := qt422016.AcquireWriter(qq422016) -//line app/vmalert/notifier/alertmanager_request.qtpl:35 +//line notifier/alertmanager_request.qtpl:35 streamamRequest(qw422016, alerts, generatorURL, relabelCfg) -//line app/vmalert/notifier/alertmanager_request.qtpl:35 +//line notifier/alertmanager_request.qtpl:35 qt422016.ReleaseWriter(qw422016) -//line app/vmalert/notifier/alertmanager_request.qtpl:35 +//line notifier/alertmanager_request.qtpl:35 } -//line app/vmalert/notifier/alertmanager_request.qtpl:35 +//line notifier/alertmanager_request.qtpl:35 func amRequest(alerts []Alert, generatorURL func(Alert) string, relabelCfg *promrelabel.ParsedConfigs) string { -//line app/vmalert/notifier/alertmanager_request.qtpl:35 +//line notifier/alertmanager_request.qtpl:35 qb422016 := qt422016.AcquireByteBuffer() -//line app/vmalert/notifier/alertmanager_request.qtpl:35 +//line notifier/alertmanager_request.qtpl:35 writeamRequest(qb422016, alerts, generatorURL, relabelCfg) -//line app/vmalert/notifier/alertmanager_request.qtpl:35 +//line notifier/alertmanager_request.qtpl:35 qs422016 := string(qb422016.B) -//line app/vmalert/notifier/alertmanager_request.qtpl:35 +//line notifier/alertmanager_request.qtpl:35 qt422016.ReleaseByteBuffer(qb422016) -//line app/vmalert/notifier/alertmanager_request.qtpl:35 +//line notifier/alertmanager_request.qtpl:35 return qs422016 -//line app/vmalert/notifier/alertmanager_request.qtpl:35 +//line notifier/alertmanager_request.qtpl:35 } diff --git a/app/vmalert/tpl/footer.qtpl.go b/app/vmalert/tpl/footer.qtpl.go index fd5a0a1ce7..7100c36bc7 100644 --- a/app/vmalert/tpl/footer.qtpl.go +++ b/app/vmalert/tpl/footer.qtpl.go @@ -1,25 +1,25 @@ // Code generated by qtc from "footer.qtpl". DO NOT EDIT. // See https://github.com/valyala/quicktemplate for details. -//line app/vmalert/tpl/footer.qtpl:1 +//line tpl/footer.qtpl:1 package tpl -//line app/vmalert/tpl/footer.qtpl:1 +//line tpl/footer.qtpl:1 import ( qtio422016 "io" qt422016 "github.com/valyala/quicktemplate" ) -//line app/vmalert/tpl/footer.qtpl:1 +//line tpl/footer.qtpl:1 var ( _ = qtio422016.Copy _ = qt422016.AcquireByteBuffer ) -//line app/vmalert/tpl/footer.qtpl:1 +//line tpl/footer.qtpl:1 func StreamFooter(qw422016 *qt422016.Writer) { -//line app/vmalert/tpl/footer.qtpl:1 +//line tpl/footer.qtpl:1 qw422016.N().S(` </main> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script> @@ -56,31 +56,31 @@ func StreamFooter(qw422016 *qt422016.Writer) { </body> </html> `) -//line app/vmalert/tpl/footer.qtpl:36 +//line tpl/footer.qtpl:36 } -//line app/vmalert/tpl/footer.qtpl:36 +//line tpl/footer.qtpl:36 func WriteFooter(qq422016 qtio422016.Writer) { -//line app/vmalert/tpl/footer.qtpl:36 +//line tpl/footer.qtpl:36 qw422016 := qt422016.AcquireWriter(qq422016) -//line app/vmalert/tpl/footer.qtpl:36 +//line tpl/footer.qtpl:36 StreamFooter(qw422016) -//line app/vmalert/tpl/footer.qtpl:36 +//line tpl/footer.qtpl:36 qt422016.ReleaseWriter(qw422016) -//line app/vmalert/tpl/footer.qtpl:36 +//line tpl/footer.qtpl:36 } -//line app/vmalert/tpl/footer.qtpl:36 +//line tpl/footer.qtpl:36 func Footer() string { -//line app/vmalert/tpl/footer.qtpl:36 +//line tpl/footer.qtpl:36 qb422016 := qt422016.AcquireByteBuffer() -//line app/vmalert/tpl/footer.qtpl:36 +//line tpl/footer.qtpl:36 WriteFooter(qb422016) -//line app/vmalert/tpl/footer.qtpl:36 +//line tpl/footer.qtpl:36 qs422016 := string(qb422016.B) -//line app/vmalert/tpl/footer.qtpl:36 +//line tpl/footer.qtpl:36 qt422016.ReleaseByteBuffer(qb422016) -//line app/vmalert/tpl/footer.qtpl:36 +//line tpl/footer.qtpl:36 return qs422016 -//line app/vmalert/tpl/footer.qtpl:36 +//line tpl/footer.qtpl:36 } diff --git a/app/vmalert/tpl/header.qtpl b/app/vmalert/tpl/header.qtpl index 00410519c4..5f755c32ed 100644 --- a/app/vmalert/tpl/header.qtpl +++ b/app/vmalert/tpl/header.qtpl @@ -27,8 +27,27 @@ .group-heading:hover { background-color: #f8f9fa!important; } + .table { + table-layout: fixed; + } .table .error-cell{ word-break: break-word; + font-size: 14px; + } + pre { + overflow: scroll; + min-height: 30px; + max-width: 100%; + } + pre::-webkit-scrollbar { + -webkit-appearance: none; + width: 0px; + height: 5px; + } + pre::-webkit-scrollbar-thumb { + border-radius: 5px; + background-color: rgba(0,0,0,.5); + -webkit-box-shadow: 0 0 1px rgba(255,255,255,.5); } </style> </head> diff --git a/app/vmalert/tpl/header.qtpl.go b/app/vmalert/tpl/header.qtpl.go index a91b9cb5cf..386cefac0e 100644 --- a/app/vmalert/tpl/header.qtpl.go +++ b/app/vmalert/tpl/header.qtpl.go @@ -1,39 +1,39 @@ // Code generated by qtc from "header.qtpl". DO NOT EDIT. // See https://github.com/valyala/quicktemplate for details. -//line app/vmalert/tpl/header.qtpl:1 +//line tpl/header.qtpl:1 package tpl -//line app/vmalert/tpl/header.qtpl:1 +//line tpl/header.qtpl:1 import ( qtio422016 "io" qt422016 "github.com/valyala/quicktemplate" ) -//line app/vmalert/tpl/header.qtpl:1 +//line tpl/header.qtpl:1 var ( _ = qtio422016.Copy _ = qt422016.AcquireByteBuffer ) -//line app/vmalert/tpl/header.qtpl:1 +//line tpl/header.qtpl:1 func StreamHeader(qw422016 *qt422016.Writer, title string, pages []NavItem) { -//line app/vmalert/tpl/header.qtpl:1 +//line tpl/header.qtpl:1 qw422016.N().S(` <!DOCTYPE html> <html lang="en"> <head> <title>vmalert`) -//line app/vmalert/tpl/header.qtpl:5 +//line tpl/header.qtpl:5 if title != "" { -//line app/vmalert/tpl/header.qtpl:5 +//line tpl/header.qtpl:5 qw422016.N().S(` - `) -//line app/vmalert/tpl/header.qtpl:5 +//line tpl/header.qtpl:5 qw422016.E().S(title) -//line app/vmalert/tpl/header.qtpl:5 +//line tpl/header.qtpl:5 } -//line app/vmalert/tpl/header.qtpl:5 +//line tpl/header.qtpl:5 qw422016.N().S(`</title> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous"> <style> @@ -59,44 +59,63 @@ func StreamHeader(qw422016 *qt422016.Writer, title string, pages []NavItem) { .group-heading:hover { background-color: #f8f9fa!important; } + .table { + table-layout: fixed; + } .table .error-cell{ word-break: break-word; + font-size: 14px; + } + pre { + overflow: scroll; + min-height: 30px; + max-width: 100%; + } + pre::-webkit-scrollbar { + -webkit-appearance: none; + width: 0px; + height: 5px; + } + pre::-webkit-scrollbar-thumb { + border-radius: 5px; + background-color: rgba(0,0,0,.5); + -webkit-box-shadow: 0 0 1px rgba(255,255,255,.5); } </style> </head> <body> `) -//line app/vmalert/tpl/header.qtpl:36 +//line tpl/header.qtpl:55 StreamPrintNavItems(qw422016, title, pages) -//line app/vmalert/tpl/header.qtpl:36 +//line tpl/header.qtpl:55 qw422016.N().S(` <main class="px-2"> `) -//line app/vmalert/tpl/header.qtpl:38 +//line tpl/header.qtpl:57 } -//line app/vmalert/tpl/header.qtpl:38 +//line tpl/header.qtpl:57 func WriteHeader(qq422016 qtio422016.Writer, title string, pages []NavItem) { -//line app/vmalert/tpl/header.qtpl:38 +//line tpl/header.qtpl:57 qw422016 := qt422016.AcquireWriter(qq422016) -//line app/vmalert/tpl/header.qtpl:38 +//line tpl/header.qtpl:57 StreamHeader(qw422016, title, pages) -//line app/vmalert/tpl/header.qtpl:38 +//line tpl/header.qtpl:57 qt422016.ReleaseWriter(qw422016) -//line app/vmalert/tpl/header.qtpl:38 +//line tpl/header.qtpl:57 } -//line app/vmalert/tpl/header.qtpl:38 +//line tpl/header.qtpl:57 func Header(title string, pages []NavItem) string { -//line app/vmalert/tpl/header.qtpl:38 +//line tpl/header.qtpl:57 qb422016 := qt422016.AcquireByteBuffer() -//line app/vmalert/tpl/header.qtpl:38 +//line tpl/header.qtpl:57 WriteHeader(qb422016, title, pages) -//line app/vmalert/tpl/header.qtpl:38 +//line tpl/header.qtpl:57 qs422016 := string(qb422016.B) -//line app/vmalert/tpl/header.qtpl:38 +//line tpl/header.qtpl:57 qt422016.ReleaseByteBuffer(qb422016) -//line app/vmalert/tpl/header.qtpl:38 +//line tpl/header.qtpl:57 return qs422016 -//line app/vmalert/tpl/header.qtpl:38 +//line tpl/header.qtpl:57 } diff --git a/app/vmalert/tpl/nav.qtpl.go b/app/vmalert/tpl/nav.qtpl.go index 85b56266f7..d4e7f56a0a 100644 --- a/app/vmalert/tpl/nav.qtpl.go +++ b/app/vmalert/tpl/nav.qtpl.go @@ -1,96 +1,96 @@ // Code generated by qtc from "nav.qtpl". DO NOT EDIT. // See https://github.com/valyala/quicktemplate for details. -//line app/vmalert/tpl/nav.qtpl:1 +//line tpl/nav.qtpl:1 package tpl -//line app/vmalert/tpl/nav.qtpl:1 +//line tpl/nav.qtpl:1 import ( qtio422016 "io" qt422016 "github.com/valyala/quicktemplate" ) -//line app/vmalert/tpl/nav.qtpl:1 +//line tpl/nav.qtpl:1 var ( _ = qtio422016.Copy _ = qt422016.AcquireByteBuffer ) -//line app/vmalert/tpl/nav.qtpl:2 +//line tpl/nav.qtpl:2 type NavItem struct { Name string Url string } -//line app/vmalert/tpl/nav.qtpl:8 +//line tpl/nav.qtpl:8 func StreamPrintNavItems(qw422016 *qt422016.Writer, current string, items []NavItem) { -//line app/vmalert/tpl/nav.qtpl:8 +//line tpl/nav.qtpl:8 qw422016.N().S(` <nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark"> <div class="container-fluid"> <div class="collapse navbar-collapse" id="navbarCollapse"> <ul class="navbar-nav me-auto mb-2 mb-md-0"> `) -//line app/vmalert/tpl/nav.qtpl:13 +//line tpl/nav.qtpl:13 for _, item := range items { -//line app/vmalert/tpl/nav.qtpl:13 +//line tpl/nav.qtpl:13 qw422016.N().S(` <li class="nav-item"> <a class="nav-link`) -//line app/vmalert/tpl/nav.qtpl:15 +//line tpl/nav.qtpl:15 if current == item.Name { -//line app/vmalert/tpl/nav.qtpl:15 +//line tpl/nav.qtpl:15 qw422016.N().S(` active`) -//line app/vmalert/tpl/nav.qtpl:15 +//line tpl/nav.qtpl:15 } -//line app/vmalert/tpl/nav.qtpl:15 +//line tpl/nav.qtpl:15 qw422016.N().S(`" href="`) -//line app/vmalert/tpl/nav.qtpl:15 +//line tpl/nav.qtpl:15 qw422016.E().S(item.Url) -//line app/vmalert/tpl/nav.qtpl:15 +//line tpl/nav.qtpl:15 qw422016.N().S(`"> `) -//line app/vmalert/tpl/nav.qtpl:16 +//line tpl/nav.qtpl:16 qw422016.E().S(item.Name) -//line app/vmalert/tpl/nav.qtpl:16 +//line tpl/nav.qtpl:16 qw422016.N().S(` </a> </li> `) -//line app/vmalert/tpl/nav.qtpl:19 +//line tpl/nav.qtpl:19 } -//line app/vmalert/tpl/nav.qtpl:19 +//line tpl/nav.qtpl:19 qw422016.N().S(` </ul> </div> </nav> `) -//line app/vmalert/tpl/nav.qtpl:23 +//line tpl/nav.qtpl:23 } -//line app/vmalert/tpl/nav.qtpl:23 +//line tpl/nav.qtpl:23 func WritePrintNavItems(qq422016 qtio422016.Writer, current string, items []NavItem) { -//line app/vmalert/tpl/nav.qtpl:23 +//line tpl/nav.qtpl:23 qw422016 := qt422016.AcquireWriter(qq422016) -//line app/vmalert/tpl/nav.qtpl:23 +//line tpl/nav.qtpl:23 StreamPrintNavItems(qw422016, current, items) -//line app/vmalert/tpl/nav.qtpl:23 +//line tpl/nav.qtpl:23 qt422016.ReleaseWriter(qw422016) -//line app/vmalert/tpl/nav.qtpl:23 +//line tpl/nav.qtpl:23 } -//line app/vmalert/tpl/nav.qtpl:23 +//line tpl/nav.qtpl:23 func PrintNavItems(current string, items []NavItem) string { -//line app/vmalert/tpl/nav.qtpl:23 +//line tpl/nav.qtpl:23 qb422016 := qt422016.AcquireByteBuffer() -//line app/vmalert/tpl/nav.qtpl:23 +//line tpl/nav.qtpl:23 WritePrintNavItems(qb422016, current, items) -//line app/vmalert/tpl/nav.qtpl:23 +//line tpl/nav.qtpl:23 qs422016 := string(qb422016.B) -//line app/vmalert/tpl/nav.qtpl:23 +//line tpl/nav.qtpl:23 qt422016.ReleaseByteBuffer(qb422016) -//line app/vmalert/tpl/nav.qtpl:23 +//line tpl/nav.qtpl:23 return qs422016 -//line app/vmalert/tpl/nav.qtpl:23 +//line tpl/nav.qtpl:23 } diff --git a/app/vmalert/web.qtpl b/app/vmalert/web.qtpl index 4e9d56039f..d90280cff2 100644 --- a/app/vmalert/web.qtpl +++ b/app/vmalert/web.qtpl @@ -61,31 +61,44 @@ <table class="table table-striped table-hover table-sm"> <thead> <tr> - <th scope="col">Rule</th> - <th scope="col" title="Shows if rule's execution ended with error">Error</th> - <th scope="col" title="How many samples were produced by the rule">Samples</th> - <th scope="col" title="How many seconds ago rule was executed">Updated</th> + <th scope="col" style="width: 60%">Rule</th> + <th scope="col" style="width: 20%" class="text-center" title="How many samples were produced by the rule">Samples</th> + <th scope="col" style="width: 20%" class="text-center" title="How many seconds ago rule was executed">Updated</th> </tr> </thead> <tbody> {% for _, r := range g.Rules %} <tr{% if r.LastError != "" %} class="alert-danger"{% endif %}> <td> - {% if r.Type == "alerting" %} - <b>alert:</b> (for: {%v r.Duration %}) - {% else %} - <b>record:</b> {%s r.Name %} - {% endif %} - <br> - <code><pre class="text-wrap">{%s r.Query %}</pre></code><br> - {% if len(r.Labels) > 0 %} <b>Labels:</b>{% endif %} - {% for k, v := range r.Labels %} - <span class="ms-1 badge bg-primary">{%s k %}={%s v %}</span> - {% endfor %} + <div class="row"> + <div class="col-12 mb-2"> + {% if r.Type == "alerting" %} + <b>alert:</b> {%s r.Name %} (for: {%v r.Duration %} seconds) + {% else %} + <b>record:</b> {%s r.Name %} + {% endif %} + </div> + <div class="col-12"> + <code><pre>{%s r.Query %}</pre></code> + </div> + <div class="col-12 mb-2"> + {% if len(r.Labels) > 0 %} <b>Labels:</b>{% endif %} + {% for k, v := range r.Labels %} + <span class="ms-1 badge bg-primary">{%s k %}={%s v %}</span> + {% endfor %} + </div> + {% if r.LastError != "" %} + <div class="col-12"> + <b>Error:</b> + <div class="error-cell"> + {%s r.LastError %} + </div> + </div> + {% endif %} + </div> </td> - <td><div class="error-cell">{%s r.LastError %}</div></td> - <td>{%d r.LastSamples %}</td> - <td>{%f.3 time.Since(r.LastEvaluation).Seconds() %}s ago</td> + <td class="text-center">{%d r.LastSamples %}</td> + <td class="text-center">{%f.3 time.Since(r.LastEvaluation).Seconds() %}s ago</td> </tr> {% endfor %} </tbody> diff --git a/app/vmalert/web.qtpl.go b/app/vmalert/web.qtpl.go index fde6567ea2..c0720c1bba 100644 --- a/app/vmalert/web.qtpl.go +++ b/app/vmalert/web.qtpl.go @@ -1,10 +1,10 @@ // Code generated by qtc from "web.qtpl". DO NOT EDIT. // See https://github.com/valyala/quicktemplate for details. -//line app/vmalert/web.qtpl:1 +//line web.qtpl:1 package main -//line app/vmalert/web.qtpl:3 +//line web.qtpl:3 import ( "path" "sort" @@ -14,111 +14,111 @@ import ( "github.com/VictoriaMetrics/VictoriaMetrics/app/vmalert/tpl" ) -//line app/vmalert/web.qtpl:13 +//line web.qtpl:13 import ( qtio422016 "io" qt422016 "github.com/valyala/quicktemplate" ) -//line app/vmalert/web.qtpl:13 +//line web.qtpl:13 var ( _ = qtio422016.Copy _ = qt422016.AcquireByteBuffer ) -//line app/vmalert/web.qtpl:13 +//line web.qtpl:13 func StreamWelcome(qw422016 *qt422016.Writer) { -//line app/vmalert/web.qtpl:13 +//line web.qtpl:13 qw422016.N().S(` `) -//line app/vmalert/web.qtpl:14 +//line web.qtpl:14 tpl.StreamHeader(qw422016, "vmalert", navItems) -//line app/vmalert/web.qtpl:14 +//line web.qtpl:14 qw422016.N().S(` <p> API:<br> `) -//line app/vmalert/web.qtpl:17 +//line web.qtpl:17 for _, p := range apiLinks { -//line app/vmalert/web.qtpl:17 +//line web.qtpl:17 qw422016.N().S(` `) -//line app/vmalert/web.qtpl:19 +//line web.qtpl:19 p, doc := p[0], p[1] -//line app/vmalert/web.qtpl:20 +//line web.qtpl:20 qw422016.N().S(` <a href="`) -//line app/vmalert/web.qtpl:21 +//line web.qtpl:21 qw422016.E().S(p) -//line app/vmalert/web.qtpl:21 +//line web.qtpl:21 qw422016.N().S(`">`) -//line app/vmalert/web.qtpl:21 +//line web.qtpl:21 qw422016.E().S(p) -//line app/vmalert/web.qtpl:21 +//line web.qtpl:21 qw422016.N().S(`</a> - `) -//line app/vmalert/web.qtpl:21 +//line web.qtpl:21 qw422016.E().S(doc) -//line app/vmalert/web.qtpl:21 +//line web.qtpl:21 qw422016.N().S(`<br/> `) -//line app/vmalert/web.qtpl:22 +//line web.qtpl:22 } -//line app/vmalert/web.qtpl:22 +//line web.qtpl:22 qw422016.N().S(` </p> `) -//line app/vmalert/web.qtpl:24 +//line web.qtpl:24 tpl.StreamFooter(qw422016) -//line app/vmalert/web.qtpl:24 +//line web.qtpl:24 qw422016.N().S(` `) -//line app/vmalert/web.qtpl:25 +//line web.qtpl:25 } -//line app/vmalert/web.qtpl:25 +//line web.qtpl:25 func WriteWelcome(qq422016 qtio422016.Writer) { -//line app/vmalert/web.qtpl:25 +//line web.qtpl:25 qw422016 := qt422016.AcquireWriter(qq422016) -//line app/vmalert/web.qtpl:25 +//line web.qtpl:25 StreamWelcome(qw422016) -//line app/vmalert/web.qtpl:25 +//line web.qtpl:25 qt422016.ReleaseWriter(qw422016) -//line app/vmalert/web.qtpl:25 +//line web.qtpl:25 } -//line app/vmalert/web.qtpl:25 +//line web.qtpl:25 func Welcome() string { -//line app/vmalert/web.qtpl:25 +//line web.qtpl:25 qb422016 := qt422016.AcquireByteBuffer() -//line app/vmalert/web.qtpl:25 +//line web.qtpl:25 WriteWelcome(qb422016) -//line app/vmalert/web.qtpl:25 +//line web.qtpl:25 qs422016 := string(qb422016.B) -//line app/vmalert/web.qtpl:25 +//line web.qtpl:25 qt422016.ReleaseByteBuffer(qb422016) -//line app/vmalert/web.qtpl:25 +//line web.qtpl:25 return qs422016 -//line app/vmalert/web.qtpl:25 +//line web.qtpl:25 } -//line app/vmalert/web.qtpl:27 +//line web.qtpl:27 func StreamListGroups(qw422016 *qt422016.Writer, groups []APIGroup) { -//line app/vmalert/web.qtpl:27 +//line web.qtpl:27 qw422016.N().S(` `) -//line app/vmalert/web.qtpl:28 +//line web.qtpl:28 tpl.StreamHeader(qw422016, "Groups", navItems) -//line app/vmalert/web.qtpl:28 +//line web.qtpl:28 qw422016.N().S(` `) -//line app/vmalert/web.qtpl:29 +//line web.qtpl:29 if len(groups) > 0 { -//line app/vmalert/web.qtpl:29 +//line web.qtpl:29 qw422016.N().S(` `) -//line app/vmalert/web.qtpl:31 +//line web.qtpl:31 rOk := make(map[string]int) rNotOk := make(map[string]int) for _, g := range groups { @@ -131,347 +131,372 @@ func StreamListGroups(qw422016 *qt422016.Writer, groups []APIGroup) { } } -//line app/vmalert/web.qtpl:42 +//line web.qtpl:42 qw422016.N().S(` <a class="btn btn-primary" role="button" onclick="collapseAll()">Collapse All</a> <a class="btn btn-primary" role="button" onclick="expandAll()">Expand All</a> `) -//line app/vmalert/web.qtpl:45 +//line web.qtpl:45 for _, g := range groups { -//line app/vmalert/web.qtpl:45 +//line web.qtpl:45 qw422016.N().S(` <div class="group-heading`) -//line app/vmalert/web.qtpl:46 +//line web.qtpl:46 if rNotOk[g.Name] > 0 { -//line app/vmalert/web.qtpl:46 +//line web.qtpl:46 qw422016.N().S(` alert-danger`) -//line app/vmalert/web.qtpl:46 +//line web.qtpl:46 } -//line app/vmalert/web.qtpl:46 +//line web.qtpl:46 qw422016.N().S(`" data-bs-target="rules-`) -//line app/vmalert/web.qtpl:46 +//line web.qtpl:46 qw422016.E().S(g.ID) -//line app/vmalert/web.qtpl:46 +//line web.qtpl:46 qw422016.N().S(`"> <span class="anchor" id="group-`) -//line app/vmalert/web.qtpl:47 +//line web.qtpl:47 qw422016.E().S(g.ID) -//line app/vmalert/web.qtpl:47 +//line web.qtpl:47 qw422016.N().S(`"></span> <a href="#group-`) -//line app/vmalert/web.qtpl:48 +//line web.qtpl:48 qw422016.E().S(g.ID) -//line app/vmalert/web.qtpl:48 +//line web.qtpl:48 qw422016.N().S(`">`) -//line app/vmalert/web.qtpl:48 +//line web.qtpl:48 qw422016.E().S(g.Name) -//line app/vmalert/web.qtpl:48 +//line web.qtpl:48 if g.Type != "prometheus" { -//line app/vmalert/web.qtpl:48 +//line web.qtpl:48 qw422016.N().S(` (`) -//line app/vmalert/web.qtpl:48 +//line web.qtpl:48 qw422016.E().S(g.Type) -//line app/vmalert/web.qtpl:48 +//line web.qtpl:48 qw422016.N().S(`)`) -//line app/vmalert/web.qtpl:48 +//line web.qtpl:48 } -//line app/vmalert/web.qtpl:48 +//line web.qtpl:48 qw422016.N().S(` (every `) -//line app/vmalert/web.qtpl:48 +//line web.qtpl:48 qw422016.N().FPrec(g.Interval, 0) -//line app/vmalert/web.qtpl:48 +//line web.qtpl:48 qw422016.N().S(`s)</a> `) -//line app/vmalert/web.qtpl:49 +//line web.qtpl:49 if rNotOk[g.Name] > 0 { -//line app/vmalert/web.qtpl:49 +//line web.qtpl:49 qw422016.N().S(`<span class="badge bg-danger" title="Number of rules with status Error">`) -//line app/vmalert/web.qtpl:49 +//line web.qtpl:49 qw422016.N().D(rNotOk[g.Name]) -//line app/vmalert/web.qtpl:49 +//line web.qtpl:49 qw422016.N().S(`</span> `) -//line app/vmalert/web.qtpl:49 +//line web.qtpl:49 } -//line app/vmalert/web.qtpl:49 +//line web.qtpl:49 qw422016.N().S(` <span class="badge bg-success" title="Number of rules withs status Ok">`) -//line app/vmalert/web.qtpl:50 +//line web.qtpl:50 qw422016.N().D(rOk[g.Name]) -//line app/vmalert/web.qtpl:50 +//line web.qtpl:50 qw422016.N().S(`</span> <p class="fs-6 fw-lighter">`) -//line app/vmalert/web.qtpl:51 +//line web.qtpl:51 qw422016.E().S(g.File) -//line app/vmalert/web.qtpl:51 +//line web.qtpl:51 qw422016.N().S(`</p> `) -//line app/vmalert/web.qtpl:52 +//line web.qtpl:52 if len(g.Params) > 0 { -//line app/vmalert/web.qtpl:52 +//line web.qtpl:52 qw422016.N().S(` <div class="fs-6 fw-lighter">Extra params `) -//line app/vmalert/web.qtpl:54 +//line web.qtpl:54 for _, param := range g.Params { -//line app/vmalert/web.qtpl:54 +//line web.qtpl:54 qw422016.N().S(` <span class="float-left badge bg-primary">`) -//line app/vmalert/web.qtpl:55 +//line web.qtpl:55 qw422016.E().S(param) -//line app/vmalert/web.qtpl:55 +//line web.qtpl:55 qw422016.N().S(`</span> `) -//line app/vmalert/web.qtpl:56 +//line web.qtpl:56 } -//line app/vmalert/web.qtpl:56 +//line web.qtpl:56 qw422016.N().S(` </div> `) -//line app/vmalert/web.qtpl:58 +//line web.qtpl:58 } -//line app/vmalert/web.qtpl:58 +//line web.qtpl:58 qw422016.N().S(` </div> <div class="collapse" id="rules-`) -//line app/vmalert/web.qtpl:60 +//line web.qtpl:60 qw422016.E().S(g.ID) -//line app/vmalert/web.qtpl:60 +//line web.qtpl:60 qw422016.N().S(`"> <table class="table table-striped table-hover table-sm"> <thead> <tr> - <th scope="col">Rule</th> - <th scope="col" title="Shows if rule's execution ended with error">Error</th> - <th scope="col" title="How many samples were produced by the rule">Samples</th> - <th scope="col" title="How many seconds ago rule was executed">Updated</th> + <th scope="col" style="width: 60%">Rule</th> + <th scope="col" style="width: 20%" class="text-center" title="How many samples were produced by the rule">Samples</th> + <th scope="col" style="width: 20%" class="text-center" title="How many seconds ago rule was executed">Updated</th> </tr> </thead> <tbody> `) -//line app/vmalert/web.qtpl:71 +//line web.qtpl:70 for _, r := range g.Rules { -//line app/vmalert/web.qtpl:71 +//line web.qtpl:70 qw422016.N().S(` <tr`) -//line app/vmalert/web.qtpl:72 +//line web.qtpl:71 if r.LastError != "" { -//line app/vmalert/web.qtpl:72 +//line web.qtpl:71 qw422016.N().S(` class="alert-danger"`) -//line app/vmalert/web.qtpl:72 +//line web.qtpl:71 } -//line app/vmalert/web.qtpl:72 +//line web.qtpl:71 qw422016.N().S(`> <td> - `) -//line app/vmalert/web.qtpl:74 + <div class="row"> + <div class="col-12 mb-2"> + `) +//line web.qtpl:75 if r.Type == "alerting" { -//line app/vmalert/web.qtpl:74 +//line web.qtpl:75 qw422016.N().S(` - <b>alert:</b> (for: `) -//line app/vmalert/web.qtpl:75 - qw422016.E().V(r.Duration) -//line app/vmalert/web.qtpl:75 - qw422016.N().S(`) - `) -//line app/vmalert/web.qtpl:76 - } else { -//line app/vmalert/web.qtpl:76 - qw422016.N().S(` - <b>record:</b> `) -//line app/vmalert/web.qtpl:77 + <b>alert:</b> `) +//line web.qtpl:76 qw422016.E().S(r.Name) -//line app/vmalert/web.qtpl:77 +//line web.qtpl:76 + qw422016.N().S(` (for: `) +//line web.qtpl:76 + qw422016.E().V(r.Duration) +//line web.qtpl:76 + qw422016.N().S(` seconds) + `) +//line web.qtpl:77 + } else { +//line web.qtpl:77 qw422016.N().S(` - `) -//line app/vmalert/web.qtpl:78 + <b>record:</b> `) +//line web.qtpl:78 + qw422016.E().S(r.Name) +//line web.qtpl:78 + qw422016.N().S(` + `) +//line web.qtpl:79 } -//line app/vmalert/web.qtpl:78 +//line web.qtpl:79 qw422016.N().S(` - <br> - <code><pre class="text-wrap">`) -//line app/vmalert/web.qtpl:80 + </div> + <div class="col-12"> + <code><pre>`) +//line web.qtpl:82 qw422016.E().S(r.Query) -//line app/vmalert/web.qtpl:80 - qw422016.N().S(`</pre></code><br> - `) -//line app/vmalert/web.qtpl:81 +//line web.qtpl:82 + qw422016.N().S(`</pre></code> + </div> + <div class="col-12 mb-2"> + `) +//line web.qtpl:85 if len(r.Labels) > 0 { -//line app/vmalert/web.qtpl:81 +//line web.qtpl:85 qw422016.N().S(` <b>Labels:</b>`) -//line app/vmalert/web.qtpl:81 +//line web.qtpl:85 } -//line app/vmalert/web.qtpl:81 +//line web.qtpl:85 qw422016.N().S(` - `) -//line app/vmalert/web.qtpl:82 + `) +//line web.qtpl:86 for k, v := range r.Labels { -//line app/vmalert/web.qtpl:82 +//line web.qtpl:86 qw422016.N().S(` - <span class="ms-1 badge bg-primary">`) -//line app/vmalert/web.qtpl:83 + <span class="ms-1 badge bg-primary">`) +//line web.qtpl:87 qw422016.E().S(k) -//line app/vmalert/web.qtpl:83 +//line web.qtpl:87 qw422016.N().S(`=`) -//line app/vmalert/web.qtpl:83 +//line web.qtpl:87 qw422016.E().S(v) -//line app/vmalert/web.qtpl:83 +//line web.qtpl:87 qw422016.N().S(`</span> - `) -//line app/vmalert/web.qtpl:84 + `) +//line web.qtpl:88 } -//line app/vmalert/web.qtpl:84 +//line web.qtpl:88 qw422016.N().S(` + </div> + `) +//line web.qtpl:90 + if r.LastError != "" { +//line web.qtpl:90 + qw422016.N().S(` + <div class="col-12"> + <b>Error:</b> + <div class="error-cell"> + `) +//line web.qtpl:94 + qw422016.E().S(r.LastError) +//line web.qtpl:94 + qw422016.N().S(` + </div> + </div> + `) +//line web.qtpl:97 + } +//line web.qtpl:97 + qw422016.N().S(` + </div> </td> - <td><div class="error-cell">`) -//line app/vmalert/web.qtpl:86 - qw422016.E().S(r.LastError) -//line app/vmalert/web.qtpl:86 - qw422016.N().S(`</div></td> - <td>`) -//line app/vmalert/web.qtpl:87 + <td class="text-center">`) +//line web.qtpl:100 qw422016.N().D(r.LastSamples) -//line app/vmalert/web.qtpl:87 +//line web.qtpl:100 qw422016.N().S(`</td> - <td>`) -//line app/vmalert/web.qtpl:88 + <td class="text-center">`) +//line web.qtpl:101 qw422016.N().FPrec(time.Since(r.LastEvaluation).Seconds(), 3) -//line app/vmalert/web.qtpl:88 +//line web.qtpl:101 qw422016.N().S(`s ago</td> </tr> `) -//line app/vmalert/web.qtpl:90 +//line web.qtpl:103 } -//line app/vmalert/web.qtpl:90 +//line web.qtpl:103 qw422016.N().S(` </tbody> </table> </div> `) -//line app/vmalert/web.qtpl:94 +//line web.qtpl:107 } -//line app/vmalert/web.qtpl:94 +//line web.qtpl:107 qw422016.N().S(` `) -//line app/vmalert/web.qtpl:96 +//line web.qtpl:109 } else { -//line app/vmalert/web.qtpl:96 +//line web.qtpl:109 qw422016.N().S(` <div> <p>No items...</p> </div> `) -//line app/vmalert/web.qtpl:100 +//line web.qtpl:113 } -//line app/vmalert/web.qtpl:100 +//line web.qtpl:113 qw422016.N().S(` `) -//line app/vmalert/web.qtpl:102 +//line web.qtpl:115 tpl.StreamFooter(qw422016) -//line app/vmalert/web.qtpl:102 +//line web.qtpl:115 qw422016.N().S(` `) -//line app/vmalert/web.qtpl:104 +//line web.qtpl:117 } -//line app/vmalert/web.qtpl:104 +//line web.qtpl:117 func WriteListGroups(qq422016 qtio422016.Writer, groups []APIGroup) { -//line app/vmalert/web.qtpl:104 +//line web.qtpl:117 qw422016 := qt422016.AcquireWriter(qq422016) -//line app/vmalert/web.qtpl:104 +//line web.qtpl:117 StreamListGroups(qw422016, groups) -//line app/vmalert/web.qtpl:104 +//line web.qtpl:117 qt422016.ReleaseWriter(qw422016) -//line app/vmalert/web.qtpl:104 +//line web.qtpl:117 } -//line app/vmalert/web.qtpl:104 +//line web.qtpl:117 func ListGroups(groups []APIGroup) string { -//line app/vmalert/web.qtpl:104 +//line web.qtpl:117 qb422016 := qt422016.AcquireByteBuffer() -//line app/vmalert/web.qtpl:104 +//line web.qtpl:117 WriteListGroups(qb422016, groups) -//line app/vmalert/web.qtpl:104 +//line web.qtpl:117 qs422016 := string(qb422016.B) -//line app/vmalert/web.qtpl:104 +//line web.qtpl:117 qt422016.ReleaseByteBuffer(qb422016) -//line app/vmalert/web.qtpl:104 +//line web.qtpl:117 return qs422016 -//line app/vmalert/web.qtpl:104 +//line web.qtpl:117 } -//line app/vmalert/web.qtpl:107 +//line web.qtpl:120 func StreamListAlerts(qw422016 *qt422016.Writer, pathPrefix string, groupAlerts []GroupAlerts) { -//line app/vmalert/web.qtpl:107 +//line web.qtpl:120 qw422016.N().S(` `) -//line app/vmalert/web.qtpl:108 +//line web.qtpl:121 tpl.StreamHeader(qw422016, "Alerts", navItems) -//line app/vmalert/web.qtpl:108 +//line web.qtpl:121 qw422016.N().S(` `) -//line app/vmalert/web.qtpl:109 +//line web.qtpl:122 if len(groupAlerts) > 0 { -//line app/vmalert/web.qtpl:109 +//line web.qtpl:122 qw422016.N().S(` <a class="btn btn-primary" role="button" onclick="collapseAll()">Collapse All</a> <a class="btn btn-primary" role="button" onclick="expandAll()">Expand All</a> `) -//line app/vmalert/web.qtpl:112 +//line web.qtpl:125 for _, ga := range groupAlerts { -//line app/vmalert/web.qtpl:112 +//line web.qtpl:125 qw422016.N().S(` `) -//line app/vmalert/web.qtpl:113 +//line web.qtpl:126 g := ga.Group -//line app/vmalert/web.qtpl:113 +//line web.qtpl:126 qw422016.N().S(` <div class="group-heading alert-danger" data-bs-target="rules-`) -//line app/vmalert/web.qtpl:114 +//line web.qtpl:127 qw422016.E().S(g.ID) -//line app/vmalert/web.qtpl:114 +//line web.qtpl:127 qw422016.N().S(`"> <span class="anchor" id="group-`) -//line app/vmalert/web.qtpl:115 +//line web.qtpl:128 qw422016.E().S(g.ID) -//line app/vmalert/web.qtpl:115 +//line web.qtpl:128 qw422016.N().S(`"></span> <a href="#group-`) -//line app/vmalert/web.qtpl:116 +//line web.qtpl:129 qw422016.E().S(g.ID) -//line app/vmalert/web.qtpl:116 +//line web.qtpl:129 qw422016.N().S(`">`) -//line app/vmalert/web.qtpl:116 +//line web.qtpl:129 qw422016.E().S(g.Name) -//line app/vmalert/web.qtpl:116 +//line web.qtpl:129 if g.Type != "prometheus" { -//line app/vmalert/web.qtpl:116 +//line web.qtpl:129 qw422016.N().S(` (`) -//line app/vmalert/web.qtpl:116 +//line web.qtpl:129 qw422016.E().S(g.Type) -//line app/vmalert/web.qtpl:116 +//line web.qtpl:129 qw422016.N().S(`)`) -//line app/vmalert/web.qtpl:116 +//line web.qtpl:129 } -//line app/vmalert/web.qtpl:116 +//line web.qtpl:129 qw422016.N().S(`</a> <span class="badge bg-danger" title="Number of active alerts">`) -//line app/vmalert/web.qtpl:117 +//line web.qtpl:130 qw422016.N().D(len(ga.Alerts)) -//line app/vmalert/web.qtpl:117 +//line web.qtpl:130 qw422016.N().S(`</span> <br> <p class="fs-6 fw-lighter">`) -//line app/vmalert/web.qtpl:119 +//line web.qtpl:132 qw422016.E().S(g.File) -//line app/vmalert/web.qtpl:119 +//line web.qtpl:132 qw422016.N().S(`</p> </div> `) -//line app/vmalert/web.qtpl:122 +//line web.qtpl:135 var keys []string alertsByRule := make(map[string][]*APIAlert) for _, alert := range ga.Alerts { @@ -482,20 +507,20 @@ func StreamListAlerts(qw422016 *qt422016.Writer, pathPrefix string, groupAlerts } sort.Strings(keys) -//line app/vmalert/web.qtpl:131 +//line web.qtpl:144 qw422016.N().S(` <div class="collapse" id="rules-`) -//line app/vmalert/web.qtpl:132 +//line web.qtpl:145 qw422016.E().S(g.ID) -//line app/vmalert/web.qtpl:132 +//line web.qtpl:145 qw422016.N().S(`"> `) -//line app/vmalert/web.qtpl:133 +//line web.qtpl:146 for _, ruleID := range keys { -//line app/vmalert/web.qtpl:133 +//line web.qtpl:146 qw422016.N().S(` `) -//line app/vmalert/web.qtpl:135 +//line web.qtpl:148 defaultAR := alertsByRule[ruleID][0] var labelKeys []string for k := range defaultAR.Labels { @@ -503,28 +528,28 @@ func StreamListAlerts(qw422016 *qt422016.Writer, pathPrefix string, groupAlerts } sort.Strings(labelKeys) -//line app/vmalert/web.qtpl:141 +//line web.qtpl:154 qw422016.N().S(` <br> <b>alert:</b> `) -//line app/vmalert/web.qtpl:143 +//line web.qtpl:156 qw422016.E().S(defaultAR.Name) -//line app/vmalert/web.qtpl:143 +//line web.qtpl:156 qw422016.N().S(` (`) -//line app/vmalert/web.qtpl:143 +//line web.qtpl:156 qw422016.N().D(len(alertsByRule[ruleID])) -//line app/vmalert/web.qtpl:143 +//line web.qtpl:156 qw422016.N().S(`) | <span><a target="_blank" href="`) -//line app/vmalert/web.qtpl:144 +//line web.qtpl:157 qw422016.E().S(defaultAR.SourceLink) -//line app/vmalert/web.qtpl:144 +//line web.qtpl:157 qw422016.N().S(`">Source</a></span> <br> <b>expr:</b><code><pre>`) -//line app/vmalert/web.qtpl:146 +//line web.qtpl:159 qw422016.E().S(defaultAR.Expression) -//line app/vmalert/web.qtpl:146 +//line web.qtpl:159 qw422016.N().S(`</pre></code> <table class="table table-striped table-hover table-sm"> <thead> @@ -538,204 +563,204 @@ func StreamListAlerts(qw422016 *qt422016.Writer, pathPrefix string, groupAlerts </thead> <tbody> `) -//line app/vmalert/web.qtpl:158 +//line web.qtpl:171 for _, ar := range alertsByRule[ruleID] { -//line app/vmalert/web.qtpl:158 +//line web.qtpl:171 qw422016.N().S(` <tr> <td> `) -//line app/vmalert/web.qtpl:161 +//line web.qtpl:174 for _, k := range labelKeys { -//line app/vmalert/web.qtpl:161 +//line web.qtpl:174 qw422016.N().S(` <span class="ms-1 badge bg-primary">`) -//line app/vmalert/web.qtpl:162 +//line web.qtpl:175 qw422016.E().S(k) -//line app/vmalert/web.qtpl:162 +//line web.qtpl:175 qw422016.N().S(`=`) -//line app/vmalert/web.qtpl:162 +//line web.qtpl:175 qw422016.E().S(ar.Labels[k]) -//line app/vmalert/web.qtpl:162 +//line web.qtpl:175 qw422016.N().S(`</span> `) -//line app/vmalert/web.qtpl:163 +//line web.qtpl:176 } -//line app/vmalert/web.qtpl:163 +//line web.qtpl:176 qw422016.N().S(` </td> <td>`) -//line app/vmalert/web.qtpl:165 +//line web.qtpl:178 streambadgeState(qw422016, ar.State) -//line app/vmalert/web.qtpl:165 +//line web.qtpl:178 qw422016.N().S(`</td> <td> `) -//line app/vmalert/web.qtpl:167 +//line web.qtpl:180 qw422016.E().S(ar.ActiveAt.Format("2006-01-02T15:04:05Z07:00")) -//line app/vmalert/web.qtpl:167 +//line web.qtpl:180 qw422016.N().S(` `) -//line app/vmalert/web.qtpl:168 +//line web.qtpl:181 if ar.Restored { -//line app/vmalert/web.qtpl:168 +//line web.qtpl:181 streambadgeRestored(qw422016) -//line app/vmalert/web.qtpl:168 +//line web.qtpl:181 } -//line app/vmalert/web.qtpl:168 +//line web.qtpl:181 qw422016.N().S(` </td> <td>`) -//line app/vmalert/web.qtpl:170 +//line web.qtpl:183 qw422016.E().S(ar.Value) -//line app/vmalert/web.qtpl:170 +//line web.qtpl:183 qw422016.N().S(`</td> <td> <a href="`) -//line app/vmalert/web.qtpl:172 +//line web.qtpl:185 qw422016.E().S(path.Join(pathPrefix, g.ID, ar.ID, "status")) -//line app/vmalert/web.qtpl:172 +//line web.qtpl:185 qw422016.N().S(`">Details</a> </td> </tr> `) -//line app/vmalert/web.qtpl:175 +//line web.qtpl:188 } -//line app/vmalert/web.qtpl:175 +//line web.qtpl:188 qw422016.N().S(` </tbody> </table> `) -//line app/vmalert/web.qtpl:178 +//line web.qtpl:191 } -//line app/vmalert/web.qtpl:178 +//line web.qtpl:191 qw422016.N().S(` </div> <br> `) -//line app/vmalert/web.qtpl:181 +//line web.qtpl:194 } -//line app/vmalert/web.qtpl:181 +//line web.qtpl:194 qw422016.N().S(` `) -//line app/vmalert/web.qtpl:183 +//line web.qtpl:196 } else { -//line app/vmalert/web.qtpl:183 +//line web.qtpl:196 qw422016.N().S(` <div> <p>No items...</p> </div> `) -//line app/vmalert/web.qtpl:187 +//line web.qtpl:200 } -//line app/vmalert/web.qtpl:187 +//line web.qtpl:200 qw422016.N().S(` `) -//line app/vmalert/web.qtpl:189 +//line web.qtpl:202 tpl.StreamFooter(qw422016) -//line app/vmalert/web.qtpl:189 +//line web.qtpl:202 qw422016.N().S(` `) -//line app/vmalert/web.qtpl:191 +//line web.qtpl:204 } -//line app/vmalert/web.qtpl:191 +//line web.qtpl:204 func WriteListAlerts(qq422016 qtio422016.Writer, pathPrefix string, groupAlerts []GroupAlerts) { -//line app/vmalert/web.qtpl:191 +//line web.qtpl:204 qw422016 := qt422016.AcquireWriter(qq422016) -//line app/vmalert/web.qtpl:191 +//line web.qtpl:204 StreamListAlerts(qw422016, pathPrefix, groupAlerts) -//line app/vmalert/web.qtpl:191 +//line web.qtpl:204 qt422016.ReleaseWriter(qw422016) -//line app/vmalert/web.qtpl:191 +//line web.qtpl:204 } -//line app/vmalert/web.qtpl:191 +//line web.qtpl:204 func ListAlerts(pathPrefix string, groupAlerts []GroupAlerts) string { -//line app/vmalert/web.qtpl:191 +//line web.qtpl:204 qb422016 := qt422016.AcquireByteBuffer() -//line app/vmalert/web.qtpl:191 +//line web.qtpl:204 WriteListAlerts(qb422016, pathPrefix, groupAlerts) -//line app/vmalert/web.qtpl:191 +//line web.qtpl:204 qs422016 := string(qb422016.B) -//line app/vmalert/web.qtpl:191 +//line web.qtpl:204 qt422016.ReleaseByteBuffer(qb422016) -//line app/vmalert/web.qtpl:191 +//line web.qtpl:204 return qs422016 -//line app/vmalert/web.qtpl:191 +//line web.qtpl:204 } -//line app/vmalert/web.qtpl:193 +//line web.qtpl:206 func StreamListTargets(qw422016 *qt422016.Writer, targets map[notifier.TargetType][]notifier.Target) { -//line app/vmalert/web.qtpl:193 +//line web.qtpl:206 qw422016.N().S(` `) -//line app/vmalert/web.qtpl:194 +//line web.qtpl:207 tpl.StreamHeader(qw422016, "Notifiers", navItems) -//line app/vmalert/web.qtpl:194 +//line web.qtpl:207 qw422016.N().S(` `) -//line app/vmalert/web.qtpl:195 +//line web.qtpl:208 if len(targets) > 0 { -//line app/vmalert/web.qtpl:195 +//line web.qtpl:208 qw422016.N().S(` <a class="btn btn-primary" role="button" onclick="collapseAll()">Collapse All</a> <a class="btn btn-primary" role="button" onclick="expandAll()">Expand All</a> `) -//line app/vmalert/web.qtpl:200 +//line web.qtpl:213 var keys []string for key := range targets { keys = append(keys, string(key)) } sort.Strings(keys) -//line app/vmalert/web.qtpl:205 +//line web.qtpl:218 qw422016.N().S(` `) -//line app/vmalert/web.qtpl:207 +//line web.qtpl:220 for i := range keys { -//line app/vmalert/web.qtpl:207 +//line web.qtpl:220 qw422016.N().S(` `) -//line app/vmalert/web.qtpl:208 +//line web.qtpl:221 typeK, ns := keys[i], targets[notifier.TargetType(keys[i])] count := len(ns) -//line app/vmalert/web.qtpl:210 +//line web.qtpl:223 qw422016.N().S(` <div class="group-heading data-bs-target="rules-`) -//line app/vmalert/web.qtpl:211 +//line web.qtpl:224 qw422016.E().S(typeK) -//line app/vmalert/web.qtpl:211 +//line web.qtpl:224 qw422016.N().S(`"> <span class="anchor" id="notifiers-`) -//line app/vmalert/web.qtpl:212 +//line web.qtpl:225 qw422016.E().S(typeK) -//line app/vmalert/web.qtpl:212 +//line web.qtpl:225 qw422016.N().S(`"></span> <a href="#notifiers-`) -//line app/vmalert/web.qtpl:213 +//line web.qtpl:226 qw422016.E().S(typeK) -//line app/vmalert/web.qtpl:213 +//line web.qtpl:226 qw422016.N().S(`">`) -//line app/vmalert/web.qtpl:213 +//line web.qtpl:226 qw422016.E().S(typeK) -//line app/vmalert/web.qtpl:213 +//line web.qtpl:226 qw422016.N().S(` (`) -//line app/vmalert/web.qtpl:213 +//line web.qtpl:226 qw422016.N().D(count) -//line app/vmalert/web.qtpl:213 +//line web.qtpl:226 qw422016.N().S(`)</a> </div> <div class="collapse show" id="notifiers-`) -//line app/vmalert/web.qtpl:215 +//line web.qtpl:228 qw422016.E().S(typeK) -//line app/vmalert/web.qtpl:215 +//line web.qtpl:228 qw422016.N().S(`"> <table class="table table-striped table-hover table-sm"> <thead> @@ -746,113 +771,113 @@ func StreamListTargets(qw422016 *qt422016.Writer, targets map[notifier.TargetTyp </thead> <tbody> `) -//line app/vmalert/web.qtpl:224 +//line web.qtpl:237 for _, n := range ns { -//line app/vmalert/web.qtpl:224 +//line web.qtpl:237 qw422016.N().S(` <tr> <td> `) -//line app/vmalert/web.qtpl:227 +//line web.qtpl:240 for _, l := range n.Labels { -//line app/vmalert/web.qtpl:227 +//line web.qtpl:240 qw422016.N().S(` <span class="ms-1 badge bg-primary">`) -//line app/vmalert/web.qtpl:228 +//line web.qtpl:241 qw422016.E().S(l.Name) -//line app/vmalert/web.qtpl:228 +//line web.qtpl:241 qw422016.N().S(`=`) -//line app/vmalert/web.qtpl:228 +//line web.qtpl:241 qw422016.E().S(l.Value) -//line app/vmalert/web.qtpl:228 +//line web.qtpl:241 qw422016.N().S(`</span> `) -//line app/vmalert/web.qtpl:229 +//line web.qtpl:242 } -//line app/vmalert/web.qtpl:229 +//line web.qtpl:242 qw422016.N().S(` </td> <td>`) -//line app/vmalert/web.qtpl:231 +//line web.qtpl:244 qw422016.E().S(n.Notifier.Addr()) -//line app/vmalert/web.qtpl:231 +//line web.qtpl:244 qw422016.N().S(`</td> </tr> `) -//line app/vmalert/web.qtpl:233 +//line web.qtpl:246 } -//line app/vmalert/web.qtpl:233 +//line web.qtpl:246 qw422016.N().S(` </tbody> </table> </div> `) -//line app/vmalert/web.qtpl:237 +//line web.qtpl:250 } -//line app/vmalert/web.qtpl:237 +//line web.qtpl:250 qw422016.N().S(` `) -//line app/vmalert/web.qtpl:239 +//line web.qtpl:252 } else { -//line app/vmalert/web.qtpl:239 +//line web.qtpl:252 qw422016.N().S(` <div> <p>No items...</p> </div> `) -//line app/vmalert/web.qtpl:243 +//line web.qtpl:256 } -//line app/vmalert/web.qtpl:243 +//line web.qtpl:256 qw422016.N().S(` `) -//line app/vmalert/web.qtpl:245 +//line web.qtpl:258 tpl.StreamFooter(qw422016) -//line app/vmalert/web.qtpl:245 +//line web.qtpl:258 qw422016.N().S(` `) -//line app/vmalert/web.qtpl:247 +//line web.qtpl:260 } -//line app/vmalert/web.qtpl:247 +//line web.qtpl:260 func WriteListTargets(qq422016 qtio422016.Writer, targets map[notifier.TargetType][]notifier.Target) { -//line app/vmalert/web.qtpl:247 +//line web.qtpl:260 qw422016 := qt422016.AcquireWriter(qq422016) -//line app/vmalert/web.qtpl:247 +//line web.qtpl:260 StreamListTargets(qw422016, targets) -//line app/vmalert/web.qtpl:247 +//line web.qtpl:260 qt422016.ReleaseWriter(qw422016) -//line app/vmalert/web.qtpl:247 +//line web.qtpl:260 } -//line app/vmalert/web.qtpl:247 +//line web.qtpl:260 func ListTargets(targets map[notifier.TargetType][]notifier.Target) string { -//line app/vmalert/web.qtpl:247 +//line web.qtpl:260 qb422016 := qt422016.AcquireByteBuffer() -//line app/vmalert/web.qtpl:247 +//line web.qtpl:260 WriteListTargets(qb422016, targets) -//line app/vmalert/web.qtpl:247 +//line web.qtpl:260 qs422016 := string(qb422016.B) -//line app/vmalert/web.qtpl:247 +//line web.qtpl:260 qt422016.ReleaseByteBuffer(qb422016) -//line app/vmalert/web.qtpl:247 +//line web.qtpl:260 return qs422016 -//line app/vmalert/web.qtpl:247 +//line web.qtpl:260 } -//line app/vmalert/web.qtpl:249 +//line web.qtpl:262 func StreamAlert(qw422016 *qt422016.Writer, pathPrefix string, alert *APIAlert) { -//line app/vmalert/web.qtpl:249 +//line web.qtpl:262 qw422016.N().S(` `) -//line app/vmalert/web.qtpl:250 +//line web.qtpl:263 tpl.StreamHeader(qw422016, "", navItems) -//line app/vmalert/web.qtpl:250 +//line web.qtpl:263 qw422016.N().S(` `) -//line app/vmalert/web.qtpl:252 +//line web.qtpl:265 var labelKeys []string for k := range alert.Labels { labelKeys = append(labelKeys, k) @@ -865,28 +890,28 @@ func StreamAlert(qw422016 *qt422016.Writer, pathPrefix string, alert *APIAlert) } sort.Strings(annotationKeys) -//line app/vmalert/web.qtpl:263 +//line web.qtpl:276 qw422016.N().S(` <div class="display-6 pb-3 mb-3">`) -//line app/vmalert/web.qtpl:264 +//line web.qtpl:277 qw422016.E().S(alert.Name) -//line app/vmalert/web.qtpl:264 +//line web.qtpl:277 qw422016.N().S(`<span class="ms-2 badge `) -//line app/vmalert/web.qtpl:264 +//line web.qtpl:277 if alert.State == "firing" { -//line app/vmalert/web.qtpl:264 +//line web.qtpl:277 qw422016.N().S(`bg-danger`) -//line app/vmalert/web.qtpl:264 +//line web.qtpl:277 } else { -//line app/vmalert/web.qtpl:264 +//line web.qtpl:277 qw422016.N().S(` bg-warning text-dark`) -//line app/vmalert/web.qtpl:264 +//line web.qtpl:277 } -//line app/vmalert/web.qtpl:264 +//line web.qtpl:277 qw422016.N().S(`">`) -//line app/vmalert/web.qtpl:264 +//line web.qtpl:277 qw422016.E().S(alert.State) -//line app/vmalert/web.qtpl:264 +//line web.qtpl:277 qw422016.N().S(`</span></div> <div class="container border-bottom p-2"> <div class="row"> @@ -895,9 +920,9 @@ func StreamAlert(qw422016 *qt422016.Writer, pathPrefix string, alert *APIAlert) </div> <div class="col"> `) -//line app/vmalert/web.qtpl:271 +//line web.qtpl:284 qw422016.E().S(alert.ActiveAt.Format("2006-01-02T15:04:05Z07:00")) -//line app/vmalert/web.qtpl:271 +//line web.qtpl:284 qw422016.N().S(` </div> </div> @@ -909,9 +934,9 @@ func StreamAlert(qw422016 *qt422016.Writer, pathPrefix string, alert *APIAlert) </div> <div class="col"> <code><pre>`) -//line app/vmalert/web.qtpl:281 +//line web.qtpl:294 qw422016.E().S(alert.Expression) -//line app/vmalert/web.qtpl:281 +//line web.qtpl:294 qw422016.N().S(`</pre></code> </div> </div> @@ -923,23 +948,23 @@ func StreamAlert(qw422016 *qt422016.Writer, pathPrefix string, alert *APIAlert) </div> <div class="col"> `) -//line app/vmalert/web.qtpl:291 +//line web.qtpl:304 for _, k := range labelKeys { -//line app/vmalert/web.qtpl:291 +//line web.qtpl:304 qw422016.N().S(` <span class="m-1 badge bg-primary">`) -//line app/vmalert/web.qtpl:292 +//line web.qtpl:305 qw422016.E().S(k) -//line app/vmalert/web.qtpl:292 +//line web.qtpl:305 qw422016.N().S(`=`) -//line app/vmalert/web.qtpl:292 +//line web.qtpl:305 qw422016.E().S(alert.Labels[k]) -//line app/vmalert/web.qtpl:292 +//line web.qtpl:305 qw422016.N().S(`</span> `) -//line app/vmalert/web.qtpl:293 +//line web.qtpl:306 } -//line app/vmalert/web.qtpl:293 +//line web.qtpl:306 qw422016.N().S(` </div> </div> @@ -951,24 +976,24 @@ func StreamAlert(qw422016 *qt422016.Writer, pathPrefix string, alert *APIAlert) </div> <div class="col"> `) -//line app/vmalert/web.qtpl:303 +//line web.qtpl:316 for _, k := range annotationKeys { -//line app/vmalert/web.qtpl:303 +//line web.qtpl:316 qw422016.N().S(` <b>`) -//line app/vmalert/web.qtpl:304 +//line web.qtpl:317 qw422016.E().S(k) -//line app/vmalert/web.qtpl:304 +//line web.qtpl:317 qw422016.N().S(`:</b><br> <p>`) -//line app/vmalert/web.qtpl:305 +//line web.qtpl:318 qw422016.E().S(alert.Annotations[k]) -//line app/vmalert/web.qtpl:305 +//line web.qtpl:318 qw422016.N().S(`</p> `) -//line app/vmalert/web.qtpl:306 +//line web.qtpl:319 } -//line app/vmalert/web.qtpl:306 +//line web.qtpl:319 qw422016.N().S(` </div> </div> @@ -980,17 +1005,17 @@ func StreamAlert(qw422016 *qt422016.Writer, pathPrefix string, alert *APIAlert) </div> <div class="col"> <a target="_blank" href="`) -//line app/vmalert/web.qtpl:316 +//line web.qtpl:329 qw422016.E().S(path.Join(pathPrefix, "groups")) -//line app/vmalert/web.qtpl:316 +//line web.qtpl:329 qw422016.N().S(`#group-`) -//line app/vmalert/web.qtpl:316 +//line web.qtpl:329 qw422016.E().S(alert.GroupID) -//line app/vmalert/web.qtpl:316 +//line web.qtpl:329 qw422016.N().S(`">`) -//line app/vmalert/web.qtpl:316 +//line web.qtpl:329 qw422016.E().S(alert.GroupID) -//line app/vmalert/web.qtpl:316 +//line web.qtpl:329 qw422016.N().S(`</a> </div> </div> @@ -1002,132 +1027,132 @@ func StreamAlert(qw422016 *qt422016.Writer, pathPrefix string, alert *APIAlert) </div> <div class="col"> <a target="_blank" href="`) -//line app/vmalert/web.qtpl:326 +//line web.qtpl:339 qw422016.E().S(alert.SourceLink) -//line app/vmalert/web.qtpl:326 +//line web.qtpl:339 qw422016.N().S(`">Link</a> </div> </div> </div> `) -//line app/vmalert/web.qtpl:330 +//line web.qtpl:343 tpl.StreamFooter(qw422016) -//line app/vmalert/web.qtpl:330 +//line web.qtpl:343 qw422016.N().S(` `) -//line app/vmalert/web.qtpl:332 +//line web.qtpl:345 } -//line app/vmalert/web.qtpl:332 +//line web.qtpl:345 func WriteAlert(qq422016 qtio422016.Writer, pathPrefix string, alert *APIAlert) { -//line app/vmalert/web.qtpl:332 +//line web.qtpl:345 qw422016 := qt422016.AcquireWriter(qq422016) -//line app/vmalert/web.qtpl:332 +//line web.qtpl:345 StreamAlert(qw422016, pathPrefix, alert) -//line app/vmalert/web.qtpl:332 +//line web.qtpl:345 qt422016.ReleaseWriter(qw422016) -//line app/vmalert/web.qtpl:332 +//line web.qtpl:345 } -//line app/vmalert/web.qtpl:332 +//line web.qtpl:345 func Alert(pathPrefix string, alert *APIAlert) string { -//line app/vmalert/web.qtpl:332 +//line web.qtpl:345 qb422016 := qt422016.AcquireByteBuffer() -//line app/vmalert/web.qtpl:332 +//line web.qtpl:345 WriteAlert(qb422016, pathPrefix, alert) -//line app/vmalert/web.qtpl:332 +//line web.qtpl:345 qs422016 := string(qb422016.B) -//line app/vmalert/web.qtpl:332 +//line web.qtpl:345 qt422016.ReleaseByteBuffer(qb422016) -//line app/vmalert/web.qtpl:332 +//line web.qtpl:345 return qs422016 -//line app/vmalert/web.qtpl:332 +//line web.qtpl:345 } -//line app/vmalert/web.qtpl:334 +//line web.qtpl:347 func streambadgeState(qw422016 *qt422016.Writer, state string) { -//line app/vmalert/web.qtpl:334 +//line web.qtpl:347 qw422016.N().S(` `) -//line app/vmalert/web.qtpl:336 +//line web.qtpl:349 badgeClass := "bg-warning text-dark" if state == "firing" { badgeClass = "bg-danger" } -//line app/vmalert/web.qtpl:340 +//line web.qtpl:353 qw422016.N().S(` <span class="badge `) -//line app/vmalert/web.qtpl:341 +//line web.qtpl:354 qw422016.E().S(badgeClass) -//line app/vmalert/web.qtpl:341 +//line web.qtpl:354 qw422016.N().S(`">`) -//line app/vmalert/web.qtpl:341 +//line web.qtpl:354 qw422016.E().S(state) -//line app/vmalert/web.qtpl:341 +//line web.qtpl:354 qw422016.N().S(`</span> `) -//line app/vmalert/web.qtpl:342 +//line web.qtpl:355 } -//line app/vmalert/web.qtpl:342 +//line web.qtpl:355 func writebadgeState(qq422016 qtio422016.Writer, state string) { -//line app/vmalert/web.qtpl:342 +//line web.qtpl:355 qw422016 := qt422016.AcquireWriter(qq422016) -//line app/vmalert/web.qtpl:342 +//line web.qtpl:355 streambadgeState(qw422016, state) -//line app/vmalert/web.qtpl:342 +//line web.qtpl:355 qt422016.ReleaseWriter(qw422016) -//line app/vmalert/web.qtpl:342 +//line web.qtpl:355 } -//line app/vmalert/web.qtpl:342 +//line web.qtpl:355 func badgeState(state string) string { -//line app/vmalert/web.qtpl:342 +//line web.qtpl:355 qb422016 := qt422016.AcquireByteBuffer() -//line app/vmalert/web.qtpl:342 +//line web.qtpl:355 writebadgeState(qb422016, state) -//line app/vmalert/web.qtpl:342 +//line web.qtpl:355 qs422016 := string(qb422016.B) -//line app/vmalert/web.qtpl:342 +//line web.qtpl:355 qt422016.ReleaseByteBuffer(qb422016) -//line app/vmalert/web.qtpl:342 +//line web.qtpl:355 return qs422016 -//line app/vmalert/web.qtpl:342 +//line web.qtpl:355 } -//line app/vmalert/web.qtpl:344 +//line web.qtpl:357 func streambadgeRestored(qw422016 *qt422016.Writer) { -//line app/vmalert/web.qtpl:344 +//line web.qtpl:357 qw422016.N().S(` <span class="badge bg-warning text-dark" title="Alert state was restored after the service restart from remote storage">restored</span> `) -//line app/vmalert/web.qtpl:346 +//line web.qtpl:359 } -//line app/vmalert/web.qtpl:346 +//line web.qtpl:359 func writebadgeRestored(qq422016 qtio422016.Writer) { -//line app/vmalert/web.qtpl:346 +//line web.qtpl:359 qw422016 := qt422016.AcquireWriter(qq422016) -//line app/vmalert/web.qtpl:346 +//line web.qtpl:359 streambadgeRestored(qw422016) -//line app/vmalert/web.qtpl:346 +//line web.qtpl:359 qt422016.ReleaseWriter(qw422016) -//line app/vmalert/web.qtpl:346 +//line web.qtpl:359 } -//line app/vmalert/web.qtpl:346 +//line web.qtpl:359 func badgeRestored() string { -//line app/vmalert/web.qtpl:346 +//line web.qtpl:359 qb422016 := qt422016.AcquireByteBuffer() -//line app/vmalert/web.qtpl:346 +//line web.qtpl:359 writebadgeRestored(qb422016) -//line app/vmalert/web.qtpl:346 +//line web.qtpl:359 qs422016 := string(qb422016.B) -//line app/vmalert/web.qtpl:346 +//line web.qtpl:359 qt422016.ReleaseByteBuffer(qb422016) -//line app/vmalert/web.qtpl:346 +//line web.qtpl:359 return qs422016 -//line app/vmalert/web.qtpl:346 +//line web.qtpl:359 } diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index d94ab07d6b..a4b93c0575 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -46,6 +46,7 @@ The following tip changes can be tested by building VictoriaMetrics components f * BUGFIX: [vmagent](https://docs.victoriametrics.com/vmagent.html): properly show `scrape_timeout` and `scrape_interval` options at `http://vmagent:8429/config` page. Previously these options weren't displayed even if they were set in `-promscrape.config`. * BUGFIX: [vmagent](https://docs.victoriametrics.com/vmagent.html): handle non-standard http redirect status codes, which may be returned by scrape targets, in the same way as Prometheus does. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2482). * BUGFIX: [vmalert](https://docs.victoriametrics.com/vmalert.html): skip template execution during rules' validation. This should prevent from `error evaluating annotation template` errors when some template functions expect non-empty args. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2514). +* BUGFIX: [vmalert](https://docs.victoriametrics.com/vmalert.html): fixed truncating alerts expression in table, updated table cell layout. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2484). * BUGFIX: [MetricsQL](https://docs.victoriametrics.com/MetricsQL.html): properly handle joins on time series filtered by values. For example, `kube_pod_container_resource_requests{resource="cpu"} * on (namespace,pod) group_left() (kube_pod_status_phase{phase=~"Pending|Running"}==1)`. This query could result in `duplicate time series on the right side` error even if `==1` filter leaves only a single time series per `(namespace,pod)` labels. Now such query is properly executed. * BUGFIX: [MetricsQL](https://docs.victoriametrics.com/MetricsQL.html): properly handle `scalar default vector`, `scalar if vector` and `scalar ifnot vector` queries. Previously such queries could return unexpected results from the `vector` part. * BUGFIX: [Official Grafana dashboards for VictoriaMetrics](https://grafana.com/orgs/victoriametrics): take into account `indexdb` when calculating disk space usage. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2368).