// Code generated by qtc from "targets_response.qtpl". DO NOT EDIT.
// See https://github.com/valyala/quicktemplate for details.
//line lib/promscrape/targets_response.qtpl:1
package promscrape
//line lib/promscrape/targets_response.qtpl:1
import "github.com/VictoriaMetrics/VictoriaMetrics/lib/prompbmarshal"
//line lib/promscrape/targets_response.qtpl:6
import (
qtio422016 "io"
qt422016 "github.com/valyala/quicktemplate"
)
//line lib/promscrape/targets_response.qtpl:6
var (
_ = qtio422016.Copy
_ = qt422016.AcquireByteBuffer
)
//line lib/promscrape/targets_response.qtpl:6
func StreamTargetsResponsePlain(qw422016 *qt422016.Writer, jts []jobTargetsStatuses, emptyJobs []string, showOriginLabels bool) {
//line lib/promscrape/targets_response.qtpl:8
for _, js := range jts {
//line lib/promscrape/targets_response.qtpl:8
qw422016.N().S(`job=`)
//line lib/promscrape/targets_response.qtpl:9
qw422016.N().Q(js.job)
//line lib/promscrape/targets_response.qtpl:9
qw422016.N().S(`(`)
//line lib/promscrape/targets_response.qtpl:9
qw422016.N().D(js.upCount)
//line lib/promscrape/targets_response.qtpl:9
qw422016.N().S(`/`)
//line lib/promscrape/targets_response.qtpl:9
qw422016.N().D(js.targetsTotal)
//line lib/promscrape/targets_response.qtpl:9
qw422016.N().S(` `)
//line lib/promscrape/targets_response.qtpl:9
qw422016.N().S(`up)`)
//line lib/promscrape/targets_response.qtpl:10
qw422016.N().S(`
`)
//line lib/promscrape/targets_response.qtpl:11
for _, ts := range js.targetsStatus {
//line lib/promscrape/targets_response.qtpl:13
labels := promLabelsString(ts.labels)
ol := promLabelsString(ts.originalLabels)
//line lib/promscrape/targets_response.qtpl:16
qw422016.N().S("\t")
//line lib/promscrape/targets_response.qtpl:16
qw422016.N().S(`state=`)
//line lib/promscrape/targets_response.qtpl:16
if ts.up {
//line lib/promscrape/targets_response.qtpl:16
qw422016.N().S(`up`)
//line lib/promscrape/targets_response.qtpl:16
} else {
//line lib/promscrape/targets_response.qtpl:16
qw422016.N().S(`down`)
//line lib/promscrape/targets_response.qtpl:16
}
//line lib/promscrape/targets_response.qtpl:16
qw422016.N().S(`,`)
//line lib/promscrape/targets_response.qtpl:16
qw422016.N().S(` `)
//line lib/promscrape/targets_response.qtpl:16
qw422016.N().S(`endpoint=`)
//line lib/promscrape/targets_response.qtpl:17
qw422016.N().S(ts.endpoint)
//line lib/promscrape/targets_response.qtpl:17
qw422016.N().S(`,`)
//line lib/promscrape/targets_response.qtpl:17
qw422016.N().S(` `)
//line lib/promscrape/targets_response.qtpl:17
qw422016.N().S(`labels=`)
//line lib/promscrape/targets_response.qtpl:18
qw422016.N().S(labels)
//line lib/promscrape/targets_response.qtpl:19
if showOriginLabels {
//line lib/promscrape/targets_response.qtpl:19
qw422016.N().S(`, originalLabels=`)
//line lib/promscrape/targets_response.qtpl:19
qw422016.N().S(ol)
//line lib/promscrape/targets_response.qtpl:19
}
//line lib/promscrape/targets_response.qtpl:19
qw422016.N().S(`,`)
//line lib/promscrape/targets_response.qtpl:19
qw422016.N().S(` `)
//line lib/promscrape/targets_response.qtpl:19
qw422016.N().S(`last_scrape=`)
//line lib/promscrape/targets_response.qtpl:20
qw422016.N().FPrec(ts.lastScrapeTime.Seconds(), 3)
//line lib/promscrape/targets_response.qtpl:20
qw422016.N().S(`s ago,`)
//line lib/promscrape/targets_response.qtpl:20
qw422016.N().S(` `)
//line lib/promscrape/targets_response.qtpl:20
qw422016.N().S(`scrape_duration=`)
//line lib/promscrape/targets_response.qtpl:21
qw422016.N().FPrec(ts.scrapeDuration.Seconds(), 3)
//line lib/promscrape/targets_response.qtpl:21
qw422016.N().S(`s,`)
//line lib/promscrape/targets_response.qtpl:21
qw422016.N().S(` `)
//line lib/promscrape/targets_response.qtpl:21
qw422016.N().S(`samples_scraped=`)
//line lib/promscrape/targets_response.qtpl:22
qw422016.N().D(ts.samplesScraped)
//line lib/promscrape/targets_response.qtpl:22
qw422016.N().S(`,`)
//line lib/promscrape/targets_response.qtpl:22
qw422016.N().S(` `)
//line lib/promscrape/targets_response.qtpl:22
qw422016.N().S(`error=`)
//line lib/promscrape/targets_response.qtpl:23
qw422016.N().Q(ts.errMsg)
//line lib/promscrape/targets_response.qtpl:24
qw422016.N().S(`
`)
//line lib/promscrape/targets_response.qtpl:25
}
//line lib/promscrape/targets_response.qtpl:26
}
//line lib/promscrape/targets_response.qtpl:28
for _, jobName := range emptyJobs {
//line lib/promscrape/targets_response.qtpl:28
qw422016.N().S(`job=`)
//line lib/promscrape/targets_response.qtpl:29
qw422016.N().Q(jobName)
//line lib/promscrape/targets_response.qtpl:29
qw422016.N().S(`(0/0 up)`)
//line lib/promscrape/targets_response.qtpl:30
qw422016.N().S(`
`)
//line lib/promscrape/targets_response.qtpl:31
}
//line lib/promscrape/targets_response.qtpl:33
}
//line lib/promscrape/targets_response.qtpl:33
func WriteTargetsResponsePlain(qq422016 qtio422016.Writer, jts []jobTargetsStatuses, emptyJobs []string, showOriginLabels bool) {
//line lib/promscrape/targets_response.qtpl:33
qw422016 := qt422016.AcquireWriter(qq422016)
//line lib/promscrape/targets_response.qtpl:33
StreamTargetsResponsePlain(qw422016, jts, emptyJobs, showOriginLabels)
//line lib/promscrape/targets_response.qtpl:33
qt422016.ReleaseWriter(qw422016)
//line lib/promscrape/targets_response.qtpl:33
}
//line lib/promscrape/targets_response.qtpl:33
func TargetsResponsePlain(jts []jobTargetsStatuses, emptyJobs []string, showOriginLabels bool) string {
//line lib/promscrape/targets_response.qtpl:33
qb422016 := qt422016.AcquireByteBuffer()
//line lib/promscrape/targets_response.qtpl:33
WriteTargetsResponsePlain(qb422016, jts, emptyJobs, showOriginLabels)
//line lib/promscrape/targets_response.qtpl:33
qs422016 := string(qb422016.B)
//line lib/promscrape/targets_response.qtpl:33
qt422016.ReleaseByteBuffer(qb422016)
//line lib/promscrape/targets_response.qtpl:33
return qs422016
//line lib/promscrape/targets_response.qtpl:33
}
//line lib/promscrape/targets_response.qtpl:35
func StreamTargetsResponseHTML(qw422016 *qt422016.Writer, jts []jobTargetsStatuses, emptyJobs []string, onlyUnhealthy bool) {
//line lib/promscrape/targets_response.qtpl:35
qw422016.N().S(`
Scrape targetsScrape targets
`)
//line lib/promscrape/targets_response.qtpl:54
for i, js := range jts {
//line lib/promscrape/targets_response.qtpl:55
if onlyUnhealthy && js.upCount == js.targetsTotal {
//line lib/promscrape/targets_response.qtpl:55
continue
//line lib/promscrape/targets_response.qtpl:55
}
//line lib/promscrape/targets_response.qtpl:55
qw422016.N().S(``)
//line lib/promscrape/targets_response.qtpl:58
qw422016.E().S(js.job)
//line lib/promscrape/targets_response.qtpl:58
qw422016.N().S(` `)
//line lib/promscrape/targets_response.qtpl:58
qw422016.N().S(`(`)
//line lib/promscrape/targets_response.qtpl:58
qw422016.N().D(js.upCount)
//line lib/promscrape/targets_response.qtpl:58
qw422016.N().S(`/`)
//line lib/promscrape/targets_response.qtpl:58
qw422016.N().D(js.targetsTotal)
//line lib/promscrape/targets_response.qtpl:58
qw422016.N().S(` `)
//line lib/promscrape/targets_response.qtpl:58
qw422016.N().S(`up)
Endpoint | State | Labels | Last Scrape | Scrape Duration | Samples Scraped | Error |
`)
//line lib/promscrape/targets_response.qtpl:76
for j, ts := range js.targetsStatus {
//line lib/promscrape/targets_response.qtpl:77
if onlyUnhealthy && ts.up {
//line lib/promscrape/targets_response.qtpl:77
continue
//line lib/promscrape/targets_response.qtpl:77
}
//line lib/promscrape/targets_response.qtpl:77
qw422016.N().S(``)
//line lib/promscrape/targets_response.qtpl:79
qw422016.E().S(ts.endpoint)
//line lib/promscrape/targets_response.qtpl:79
qw422016.N().S(` (fetch response) | `)
//line lib/promscrape/targets_response.qtpl:82
if ts.up {
//line lib/promscrape/targets_response.qtpl:82
qw422016.N().S(`UP`)
//line lib/promscrape/targets_response.qtpl:82
} else {
//line lib/promscrape/targets_response.qtpl:82
qw422016.N().S(`DOWN`)
//line lib/promscrape/targets_response.qtpl:82
}
//line lib/promscrape/targets_response.qtpl:82
qw422016.N().S(` | `)
//line lib/promscrape/targets_response.qtpl:84
qw422016.N().S(` `)
//line lib/promscrape/targets_response.qtpl:85
streamformatLabel(qw422016, ts.labels)
//line lib/promscrape/targets_response.qtpl:85
qw422016.N().S(` `)
//line lib/promscrape/targets_response.qtpl:87
qw422016.N().S(` `)
//line lib/promscrape/targets_response.qtpl:88
streamformatLabel(qw422016, ts.originalLabels)
//line lib/promscrape/targets_response.qtpl:88
qw422016.N().S(` | `)
//line lib/promscrape/targets_response.qtpl:91
qw422016.N().FPrec(ts.lastScrapeTime.Seconds(), 3)
//line lib/promscrape/targets_response.qtpl:91
qw422016.N().S(`s ago | `)
//line lib/promscrape/targets_response.qtpl:92
qw422016.N().FPrec(ts.scrapeDuration.Seconds(), 3)
//line lib/promscrape/targets_response.qtpl:92
qw422016.N().S(`s | `)
//line lib/promscrape/targets_response.qtpl:93
qw422016.N().D(ts.samplesScraped)
//line lib/promscrape/targets_response.qtpl:93
qw422016.N().S(` | `)
//line lib/promscrape/targets_response.qtpl:94
qw422016.E().S(ts.errMsg)
//line lib/promscrape/targets_response.qtpl:94
qw422016.N().S(` |
`)
//line lib/promscrape/targets_response.qtpl:96
}
//line lib/promscrape/targets_response.qtpl:96
qw422016.N().S(`
`)
//line lib/promscrape/targets_response.qtpl:101
}
//line lib/promscrape/targets_response.qtpl:103
for _, jobName := range emptyJobs {
//line lib/promscrape/targets_response.qtpl:103
qw422016.N().S(`Endpoint | State | Labels | Last Scrape | Scrape Duration | Samples Scraped | Error |
---|
`)
//line lib/promscrape/targets_response.qtpl:122
}
//line lib/promscrape/targets_response.qtpl:122
qw422016.N().S(``)
//line lib/promscrape/targets_response.qtpl:125
}
//line lib/promscrape/targets_response.qtpl:125
func WriteTargetsResponseHTML(qq422016 qtio422016.Writer, jts []jobTargetsStatuses, emptyJobs []string, onlyUnhealthy bool) {
//line lib/promscrape/targets_response.qtpl:125
qw422016 := qt422016.AcquireWriter(qq422016)
//line lib/promscrape/targets_response.qtpl:125
StreamTargetsResponseHTML(qw422016, jts, emptyJobs, onlyUnhealthy)
//line lib/promscrape/targets_response.qtpl:125
qt422016.ReleaseWriter(qw422016)
//line lib/promscrape/targets_response.qtpl:125
}
//line lib/promscrape/targets_response.qtpl:125
func TargetsResponseHTML(jts []jobTargetsStatuses, emptyJobs []string, onlyUnhealthy bool) string {
//line lib/promscrape/targets_response.qtpl:125
qb422016 := qt422016.AcquireByteBuffer()
//line lib/promscrape/targets_response.qtpl:125
WriteTargetsResponseHTML(qb422016, jts, emptyJobs, onlyUnhealthy)
//line lib/promscrape/targets_response.qtpl:125
qs422016 := string(qb422016.B)
//line lib/promscrape/targets_response.qtpl:125
qt422016.ReleaseByteBuffer(qb422016)
//line lib/promscrape/targets_response.qtpl:125
return qs422016
//line lib/promscrape/targets_response.qtpl:125
}
//line lib/promscrape/targets_response.qtpl:127
func streamformatLabel(qw422016 *qt422016.Writer, labels []prompbmarshal.Label) {
//line lib/promscrape/targets_response.qtpl:127
qw422016.N().S(`{`)
//line lib/promscrape/targets_response.qtpl:129
for i, label := range labels {
//line lib/promscrape/targets_response.qtpl:130
qw422016.E().S(label.Name)
//line lib/promscrape/targets_response.qtpl:130
qw422016.N().S(`=`)
//line lib/promscrape/targets_response.qtpl:130
qw422016.E().Q(label.Value)
//line lib/promscrape/targets_response.qtpl:131
if i+1 < len(labels) {
//line lib/promscrape/targets_response.qtpl:131
qw422016.N().S(`,`)
//line lib/promscrape/targets_response.qtpl:131
qw422016.N().S(` `)
//line lib/promscrape/targets_response.qtpl:131
}
//line lib/promscrape/targets_response.qtpl:132
}
//line lib/promscrape/targets_response.qtpl:132
qw422016.N().S(`}`)
//line lib/promscrape/targets_response.qtpl:134
}
//line lib/promscrape/targets_response.qtpl:134
func writeformatLabel(qq422016 qtio422016.Writer, labels []prompbmarshal.Label) {
//line lib/promscrape/targets_response.qtpl:134
qw422016 := qt422016.AcquireWriter(qq422016)
//line lib/promscrape/targets_response.qtpl:134
streamformatLabel(qw422016, labels)
//line lib/promscrape/targets_response.qtpl:134
qt422016.ReleaseWriter(qw422016)
//line lib/promscrape/targets_response.qtpl:134
}
//line lib/promscrape/targets_response.qtpl:134
func formatLabel(labels []prompbmarshal.Label) string {
//line lib/promscrape/targets_response.qtpl:134
qb422016 := qt422016.AcquireByteBuffer()
//line lib/promscrape/targets_response.qtpl:134
writeformatLabel(qb422016, labels)
//line lib/promscrape/targets_response.qtpl:134
qs422016 := string(qb422016.B)
//line lib/promscrape/targets_response.qtpl:134
qt422016.ReleaseByteBuffer(qb422016)
//line lib/promscrape/targets_response.qtpl:134
return qs422016
//line lib/promscrape/targets_response.qtpl:134
}