// 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" "github.com/VictoriaMetrics/VictoriaMetrics/app/vmalert/utils" ) //line app/vmalert/tpl/header.qtpl:9 import ( qtio422016 "io" qt422016 "github.com/valyala/quicktemplate" ) //line app/vmalert/tpl/header.qtpl:9 var ( _ = qtio422016.Copy _ = qt422016.AcquireByteBuffer ) //line app/vmalert/tpl/header.qtpl:9 func StreamHeader(qw422016 *qt422016.Writer, r *http.Request, navItems []NavItem, title string, userErr error) { //line app/vmalert/tpl/header.qtpl:9 qw422016.N().S(` `) //line app/vmalert/tpl/header.qtpl:10 prefix := utils.Prefix(r.URL.Path) //line app/vmalert/tpl/header.qtpl:10 qw422016.N().S(` vmalert`) //line app/vmalert/tpl/header.qtpl:14 if title != "" { //line app/vmalert/tpl/header.qtpl:14 qw422016.N().S(` - `) //line app/vmalert/tpl/header.qtpl:14 qw422016.E().S(title) //line app/vmalert/tpl/header.qtpl:14 } //line app/vmalert/tpl/header.qtpl:14 qw422016.N().S(` `) //line app/vmalert/tpl/header.qtpl:73 streamprintNavItems(qw422016, r, title, navItems, userErr) //line app/vmalert/tpl/header.qtpl:73 qw422016.N().S(`
`) //line app/vmalert/tpl/header.qtpl:75 streamerrorBody(qw422016, userErr) //line app/vmalert/tpl/header.qtpl:75 qw422016.N().S(` `) //line app/vmalert/tpl/header.qtpl:76 } //line app/vmalert/tpl/header.qtpl:76 func WriteHeader(qq422016 qtio422016.Writer, r *http.Request, navItems []NavItem, title string, userErr error) { //line app/vmalert/tpl/header.qtpl:76 qw422016 := qt422016.AcquireWriter(qq422016) //line app/vmalert/tpl/header.qtpl:76 StreamHeader(qw422016, r, navItems, title, userErr) //line app/vmalert/tpl/header.qtpl:76 qt422016.ReleaseWriter(qw422016) //line app/vmalert/tpl/header.qtpl:76 } //line app/vmalert/tpl/header.qtpl:76 func Header(r *http.Request, navItems []NavItem, title string, userErr error) string { //line app/vmalert/tpl/header.qtpl:76 qb422016 := qt422016.AcquireByteBuffer() //line app/vmalert/tpl/header.qtpl:76 WriteHeader(qb422016, r, navItems, title, userErr) //line app/vmalert/tpl/header.qtpl:76 qs422016 := string(qb422016.B) //line app/vmalert/tpl/header.qtpl:76 qt422016.ReleaseByteBuffer(qb422016) //line app/vmalert/tpl/header.qtpl:76 return qs422016 //line app/vmalert/tpl/header.qtpl:76 } //line app/vmalert/tpl/header.qtpl:80 type NavItem struct { Name string Url string } //line app/vmalert/tpl/header.qtpl:86 func streamprintNavItems(qw422016 *qt422016.Writer, r *http.Request, current string, items []NavItem, userErr error) { //line app/vmalert/tpl/header.qtpl:86 qw422016.N().S(` `) //line app/vmalert/tpl/header.qtpl:88 prefix := utils.Prefix(r.URL.Path) //line app/vmalert/tpl/header.qtpl:89 qw422016.N().S(` `) //line app/vmalert/tpl/header.qtpl:109 } //line app/vmalert/tpl/header.qtpl:109 func writeprintNavItems(qq422016 qtio422016.Writer, r *http.Request, current string, items []NavItem, userErr error) { //line app/vmalert/tpl/header.qtpl:109 qw422016 := qt422016.AcquireWriter(qq422016) //line app/vmalert/tpl/header.qtpl:109 streamprintNavItems(qw422016, r, current, items, userErr) //line app/vmalert/tpl/header.qtpl:109 qt422016.ReleaseWriter(qw422016) //line app/vmalert/tpl/header.qtpl:109 } //line app/vmalert/tpl/header.qtpl:109 func printNavItems(r *http.Request, current string, items []NavItem, userErr error) string { //line app/vmalert/tpl/header.qtpl:109 qb422016 := qt422016.AcquireByteBuffer() //line app/vmalert/tpl/header.qtpl:109 writeprintNavItems(qb422016, r, current, items, userErr) //line app/vmalert/tpl/header.qtpl:109 qs422016 := string(qb422016.B) //line app/vmalert/tpl/header.qtpl:109 qt422016.ReleaseByteBuffer(qb422016) //line app/vmalert/tpl/header.qtpl:109 return qs422016 //line app/vmalert/tpl/header.qtpl:109 } //line app/vmalert/tpl/header.qtpl:111 func streamerrorIcon(qw422016 *qt422016.Writer, err error) { //line app/vmalert/tpl/header.qtpl:111 qw422016.N().S(` `) //line app/vmalert/tpl/header.qtpl:112 if err != nil { //line app/vmalert/tpl/header.qtpl:112 qw422016.N().S(`
`) //line app/vmalert/tpl/header.qtpl:122 } //line app/vmalert/tpl/header.qtpl:122 qw422016.N().S(` `) //line app/vmalert/tpl/header.qtpl:123 } //line app/vmalert/tpl/header.qtpl:123 func writeerrorIcon(qq422016 qtio422016.Writer, err error) { //line app/vmalert/tpl/header.qtpl:123 qw422016 := qt422016.AcquireWriter(qq422016) //line app/vmalert/tpl/header.qtpl:123 streamerrorIcon(qw422016, err) //line app/vmalert/tpl/header.qtpl:123 qt422016.ReleaseWriter(qw422016) //line app/vmalert/tpl/header.qtpl:123 } //line app/vmalert/tpl/header.qtpl:123 func errorIcon(err error) string { //line app/vmalert/tpl/header.qtpl:123 qb422016 := qt422016.AcquireByteBuffer() //line app/vmalert/tpl/header.qtpl:123 writeerrorIcon(qb422016, err) //line app/vmalert/tpl/header.qtpl:123 qs422016 := string(qb422016.B) //line app/vmalert/tpl/header.qtpl:123 qt422016.ReleaseByteBuffer(qb422016) //line app/vmalert/tpl/header.qtpl:123 return qs422016 //line app/vmalert/tpl/header.qtpl:123 } //line app/vmalert/tpl/header.qtpl:125 func streamerrorBody(qw422016 *qt422016.Writer, err error) { //line app/vmalert/tpl/header.qtpl:125 qw422016.N().S(` `) //line app/vmalert/tpl/header.qtpl:126 if err != nil { //line app/vmalert/tpl/header.qtpl:126 qw422016.N().S(`
`) //line app/vmalert/tpl/header.qtpl:129 qw422016.E().S(err.Error()) //line app/vmalert/tpl/header.qtpl:129 qw422016.N().S(`
`) //line app/vmalert/tpl/header.qtpl:132 } //line app/vmalert/tpl/header.qtpl:132 qw422016.N().S(` `) //line app/vmalert/tpl/header.qtpl:133 } //line app/vmalert/tpl/header.qtpl:133 func writeerrorBody(qq422016 qtio422016.Writer, err error) { //line app/vmalert/tpl/header.qtpl:133 qw422016 := qt422016.AcquireWriter(qq422016) //line app/vmalert/tpl/header.qtpl:133 streamerrorBody(qw422016, err) //line app/vmalert/tpl/header.qtpl:133 qt422016.ReleaseWriter(qw422016) //line app/vmalert/tpl/header.qtpl:133 } //line app/vmalert/tpl/header.qtpl:133 func errorBody(err error) string { //line app/vmalert/tpl/header.qtpl:133 qb422016 := qt422016.AcquireByteBuffer() //line app/vmalert/tpl/header.qtpl:133 writeerrorBody(qb422016, err) //line app/vmalert/tpl/header.qtpl:133 qs422016 := string(qb422016.B) //line app/vmalert/tpl/header.qtpl:133 qt422016.ReleaseByteBuffer(qb422016) //line app/vmalert/tpl/header.qtpl:133 return qs422016 //line app/vmalert/tpl/header.qtpl:133 }