// 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 package tpl //line app/vmalert/tpl/header.qtpl:1 import ( "net/http" "net/url" "path" "strings" "github.com/VictoriaMetrics/VictoriaMetrics/app/vmalert/utils" ) //line app/vmalert/tpl/header.qtpl:10 import ( qtio422016 "io" qt422016 "github.com/valyala/quicktemplate" ) //line app/vmalert/tpl/header.qtpl:10 var ( _ = qtio422016.Copy _ = qt422016.AcquireByteBuffer ) //line app/vmalert/tpl/header.qtpl:10 func StreamHeader(qw422016 *qt422016.Writer, r *http.Request, navItems []NavItem, title string) { //line app/vmalert/tpl/header.qtpl:10 qw422016.N().S(` `) //line app/vmalert/tpl/header.qtpl:11 prefix := utils.Prefix(r.URL.Path) //line app/vmalert/tpl/header.qtpl:11 qw422016.N().S(` vmalert`) //line app/vmalert/tpl/header.qtpl:15 if title != "" { //line app/vmalert/tpl/header.qtpl:15 qw422016.N().S(` - `) //line app/vmalert/tpl/header.qtpl:15 qw422016.E().S(title) //line app/vmalert/tpl/header.qtpl:15 } //line app/vmalert/tpl/header.qtpl:15 qw422016.N().S(` `) //line app/vmalert/tpl/header.qtpl:65 streamprintNavItems(qw422016, r, title, navItems) //line app/vmalert/tpl/header.qtpl:65 qw422016.N().S(`
`) //line app/vmalert/tpl/header.qtpl:67 } //line app/vmalert/tpl/header.qtpl:67 func WriteHeader(qq422016 qtio422016.Writer, r *http.Request, navItems []NavItem, title string) { //line app/vmalert/tpl/header.qtpl:67 qw422016 := qt422016.AcquireWriter(qq422016) //line app/vmalert/tpl/header.qtpl:67 StreamHeader(qw422016, r, navItems, title) //line app/vmalert/tpl/header.qtpl:67 qt422016.ReleaseWriter(qw422016) //line app/vmalert/tpl/header.qtpl:67 } //line app/vmalert/tpl/header.qtpl:67 func Header(r *http.Request, navItems []NavItem, title string) string { //line app/vmalert/tpl/header.qtpl:67 qb422016 := qt422016.AcquireByteBuffer() //line app/vmalert/tpl/header.qtpl:67 WriteHeader(qb422016, r, navItems, title) //line app/vmalert/tpl/header.qtpl:67 qs422016 := string(qb422016.B) //line app/vmalert/tpl/header.qtpl:67 qt422016.ReleaseByteBuffer(qb422016) //line app/vmalert/tpl/header.qtpl:67 return qs422016 //line app/vmalert/tpl/header.qtpl:67 } //line app/vmalert/tpl/header.qtpl:71 type NavItem struct { Name string Url string } //line app/vmalert/tpl/header.qtpl:77 func streamprintNavItems(qw422016 *qt422016.Writer, r *http.Request, current string, items []NavItem) { //line app/vmalert/tpl/header.qtpl:77 qw422016.N().S(` `) //line app/vmalert/tpl/header.qtpl:79 prefix := "/vmalert/" if strings.HasPrefix(r.URL.Path, prefix) { prefix = "" } //line app/vmalert/tpl/header.qtpl:83 qw422016.N().S(` `) //line app/vmalert/tpl/header.qtpl:102 } //line app/vmalert/tpl/header.qtpl:102 func writeprintNavItems(qq422016 qtio422016.Writer, r *http.Request, current string, items []NavItem) { //line app/vmalert/tpl/header.qtpl:102 qw422016 := qt422016.AcquireWriter(qq422016) //line app/vmalert/tpl/header.qtpl:102 streamprintNavItems(qw422016, r, current, items) //line app/vmalert/tpl/header.qtpl:102 qt422016.ReleaseWriter(qw422016) //line app/vmalert/tpl/header.qtpl:102 } //line app/vmalert/tpl/header.qtpl:102 func printNavItems(r *http.Request, current string, items []NavItem) string { //line app/vmalert/tpl/header.qtpl:102 qb422016 := qt422016.AcquireByteBuffer() //line app/vmalert/tpl/header.qtpl:102 writeprintNavItems(qb422016, r, current, items) //line app/vmalert/tpl/header.qtpl:102 qs422016 := string(qb422016.B) //line app/vmalert/tpl/header.qtpl:102 qt422016.ReleaseByteBuffer(qb422016) //line app/vmalert/tpl/header.qtpl:102 return qs422016 //line app/vmalert/tpl/header.qtpl:102 }