mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-01 14:47:38 +00:00
bb26aa9b1f
New UI pages: / - welcome page with API handlers list; /groups - list of all rules per group; /alerts - list of all active alerts; /groupID/alertID/status - status of the active alert;
96 lines
2.6 KiB
Go
96 lines
2.6 KiB
Go
// 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
|
|
package tpl
|
|
|
|
//line app/vmalert/tpl/nav.qtpl:1
|
|
import (
|
|
qtio422016 "io"
|
|
|
|
qt422016 "github.com/valyala/quicktemplate"
|
|
)
|
|
|
|
//line app/vmalert/tpl/nav.qtpl:1
|
|
var (
|
|
_ = qtio422016.Copy
|
|
_ = qt422016.AcquireByteBuffer
|
|
)
|
|
|
|
//line app/vmalert/tpl/nav.qtpl:2
|
|
type NavItem struct {
|
|
Name string
|
|
Url string
|
|
}
|
|
|
|
//line app/vmalert/tpl/nav.qtpl:8
|
|
func StreamPrintNavItems(qw422016 *qt422016.Writer, current string, items []NavItem) {
|
|
//line app/vmalert/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
|
|
for _, item := range items {
|
|
//line app/vmalert/tpl/nav.qtpl:13
|
|
qw422016.N().S(`
|
|
<li class="nav-item">
|
|
<a class="nav-link`)
|
|
//line app/vmalert/tpl/nav.qtpl:15
|
|
if current == item.Name {
|
|
//line app/vmalert/tpl/nav.qtpl:15
|
|
qw422016.N().S(` active`)
|
|
//line app/vmalert/tpl/nav.qtpl:15
|
|
}
|
|
//line app/vmalert/tpl/nav.qtpl:15
|
|
qw422016.N().S(`" href="`)
|
|
//line app/vmalert/tpl/nav.qtpl:15
|
|
qw422016.E().S(item.Url)
|
|
//line app/vmalert/tpl/nav.qtpl:15
|
|
qw422016.N().S(`">
|
|
`)
|
|
//line app/vmalert/tpl/nav.qtpl:16
|
|
qw422016.E().S(item.Name)
|
|
//line app/vmalert/tpl/nav.qtpl:16
|
|
qw422016.N().S(`
|
|
</a>
|
|
</li>
|
|
`)
|
|
//line app/vmalert/tpl/nav.qtpl:19
|
|
}
|
|
//line app/vmalert/tpl/nav.qtpl:19
|
|
qw422016.N().S(`
|
|
</ul>
|
|
</div>
|
|
</nav>
|
|
`)
|
|
//line app/vmalert/tpl/nav.qtpl:23
|
|
}
|
|
|
|
//line app/vmalert/tpl/nav.qtpl:23
|
|
func WritePrintNavItems(qq422016 qtio422016.Writer, current string, items []NavItem) {
|
|
//line app/vmalert/tpl/nav.qtpl:23
|
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
|
//line app/vmalert/tpl/nav.qtpl:23
|
|
StreamPrintNavItems(qw422016, current, items)
|
|
//line app/vmalert/tpl/nav.qtpl:23
|
|
qt422016.ReleaseWriter(qw422016)
|
|
//line app/vmalert/tpl/nav.qtpl:23
|
|
}
|
|
|
|
//line app/vmalert/tpl/nav.qtpl:23
|
|
func PrintNavItems(current string, items []NavItem) string {
|
|
//line app/vmalert/tpl/nav.qtpl:23
|
|
qb422016 := qt422016.AcquireByteBuffer()
|
|
//line app/vmalert/tpl/nav.qtpl:23
|
|
WritePrintNavItems(qb422016, current, items)
|
|
//line app/vmalert/tpl/nav.qtpl:23
|
|
qs422016 := string(qb422016.B)
|
|
//line app/vmalert/tpl/nav.qtpl:23
|
|
qt422016.ReleaseByteBuffer(qb422016)
|
|
//line app/vmalert/tpl/nav.qtpl:23
|
|
return qs422016
|
|
//line app/vmalert/tpl/nav.qtpl:23
|
|
}
|