mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-15 00:13:30 +01:00
lib/promscrape: formatting fixes for /targets
page
This commit is contained in:
parent
e17ac90f59
commit
38145cfbb8
@ -18,7 +18,7 @@ job={%q= js.job %}{% space %} ({%d js.upCount %}/{%d js.targetsTotal %} {% space
|
||||
{% space %} labels={%s= labels %}
|
||||
{% if showOriginLabels %},{% space %} originalLabels={%s= ol %}{% endif %},
|
||||
{% space %} last_scrape={%f.3 ts.lastScrapeTime.Seconds() %}s {% space %} ago,
|
||||
{% space %} scrape_duration={%f.3 float64(ts.scrapeDuration.Seconds()) %}s,
|
||||
{% space %} scrape_duration={%f.3 ts.scrapeDuration.Seconds() %}s,
|
||||
{% space %} error={%q= ts.error %}
|
||||
{% newline %}
|
||||
{% endfor %}
|
||||
@ -57,7 +57,7 @@ job={%q= js.job %}{% space %} ({%d js.upCount %}/{%d js.targetsTotal %} {% space
|
||||
{% for _,js :=range jts %}
|
||||
<div class="table-container">
|
||||
<h2 class="job_header danger">
|
||||
<a id="job-{%q= js.job %}" >{%q= js.job %} ({%d js.upCount %}/{%d js.targetsTotal %} up)</a>
|
||||
<a id="job-{%q js.job %}" >{%q js.job %} ({%d js.upCount %}/{%d js.targetsTotal %} up)</a>
|
||||
</h2>
|
||||
<table class="table-bordered table-hover border">
|
||||
<thead class="job_details border">
|
||||
@ -75,7 +75,7 @@ job={%q= js.job %}{% space %} ({%d js.upCount %}/{%d js.targetsTotal %} {% space
|
||||
{% if onlyUnhealthy && ts.up %} {% continue %} {% endif %}
|
||||
<tr class="table-row border">
|
||||
<td class="endpoint border">
|
||||
<a href="{%s= ts.endpoint %}">{%s= ts.endpoint %}</a><br>
|
||||
<a href="{%s ts.endpoint %}">{%s ts.endpoint %}</a><br>
|
||||
</td>
|
||||
<td class="state border">
|
||||
<span class="state_indicator">{% if ts.up %}UP{% else %}DOWN{% endif %}</span>
|
||||
@ -83,9 +83,9 @@ job={%q= js.job %}{% space %} ({%d js.upCount %}/{%d js.targetsTotal %} {% space
|
||||
<td class="labels border", title="Original {% space %} labels: {% space %} {%= formatLabel(ts.originalLabels) %}">
|
||||
{%= formatLabel(ts.labels) %}
|
||||
</td>
|
||||
<td class="last-scrape border">{%s ts.lastScrapeTime.String() %} {% space %} ago</td>
|
||||
<td class="scrape-duration border">{%s ts.scrapeDuration.String() %}</td>
|
||||
<td class="errors border"><span class="alert alert-danger state_indicator">{%s= ts.error %}</span></td>
|
||||
<td class="last-scrape border">{%f.3 ts.lastScrapeTime.Seconds() %}s {% space %} ago</td>
|
||||
<td class="scrape-duration border">{%f.3 ts.scrapeDuration.Seconds() %}s</td>
|
||||
<td class="errors border"><span class="alert alert-danger state_indicator">{%s ts.error %}</span></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
@ -112,7 +112,7 @@ func StreamTargetsResponsePlain(qw422016 *qt422016.Writer, jts []jobTargetsStatu
|
||||
//line lib/promscrape/targets_response.qtpl:21
|
||||
qw422016.N().S(`scrape_duration=`)
|
||||
//line lib/promscrape/targets_response.qtpl:21
|
||||
qw422016.N().FPrec(float64(ts.scrapeDuration.Seconds()), 3)
|
||||
qw422016.N().FPrec(ts.scrapeDuration.Seconds(), 3)
|
||||
//line lib/promscrape/targets_response.qtpl:21
|
||||
qw422016.N().S(`s,`)
|
||||
//line lib/promscrape/targets_response.qtpl:22
|
||||
@ -193,11 +193,11 @@ func StreamTargetsResponseHTML(qw422016 *qt422016.Writer, jts []jobTargetsStatus
|
||||
//line lib/promscrape/targets_response.qtpl:57
|
||||
qw422016.N().S(`<div class="table-container"><h2 class="job_header danger"><a id="job-`)
|
||||
//line lib/promscrape/targets_response.qtpl:60
|
||||
qw422016.N().Q(js.job)
|
||||
qw422016.E().Q(js.job)
|
||||
//line lib/promscrape/targets_response.qtpl:60
|
||||
qw422016.N().S(`" >`)
|
||||
//line lib/promscrape/targets_response.qtpl:60
|
||||
qw422016.N().Q(js.job)
|
||||
qw422016.E().Q(js.job)
|
||||
//line lib/promscrape/targets_response.qtpl:60
|
||||
qw422016.N().S(`(`)
|
||||
//line lib/promscrape/targets_response.qtpl:60
|
||||
@ -219,11 +219,11 @@ func StreamTargetsResponseHTML(qw422016 *qt422016.Writer, jts []jobTargetsStatus
|
||||
//line lib/promscrape/targets_response.qtpl:75
|
||||
qw422016.N().S(`<tr class="table-row border"><td class="endpoint border"><a href="`)
|
||||
//line lib/promscrape/targets_response.qtpl:78
|
||||
qw422016.N().S(ts.endpoint)
|
||||
qw422016.E().S(ts.endpoint)
|
||||
//line lib/promscrape/targets_response.qtpl:78
|
||||
qw422016.N().S(`">`)
|
||||
//line lib/promscrape/targets_response.qtpl:78
|
||||
qw422016.N().S(ts.endpoint)
|
||||
qw422016.E().S(ts.endpoint)
|
||||
//line lib/promscrape/targets_response.qtpl:78
|
||||
qw422016.N().S(`</a><br></td><td class="state border"><span class="state_indicator">`)
|
||||
//line lib/promscrape/targets_response.qtpl:81
|
||||
@ -253,17 +253,19 @@ func StreamTargetsResponseHTML(qw422016 *qt422016.Writer, jts []jobTargetsStatus
|
||||
//line lib/promscrape/targets_response.qtpl:84
|
||||
qw422016.N().S(`</td><td class="last-scrape border">`)
|
||||
//line lib/promscrape/targets_response.qtpl:86
|
||||
qw422016.E().S(ts.lastScrapeTime.String())
|
||||
qw422016.N().FPrec(ts.lastScrapeTime.Seconds(), 3)
|
||||
//line lib/promscrape/targets_response.qtpl:86
|
||||
qw422016.N().S(`s`)
|
||||
//line lib/promscrape/targets_response.qtpl:86
|
||||
qw422016.N().S(` `)
|
||||
//line lib/promscrape/targets_response.qtpl:86
|
||||
qw422016.N().S(`ago</td><td class="scrape-duration border">`)
|
||||
//line lib/promscrape/targets_response.qtpl:87
|
||||
qw422016.E().S(ts.scrapeDuration.String())
|
||||
qw422016.N().FPrec(ts.scrapeDuration.Seconds(), 3)
|
||||
//line lib/promscrape/targets_response.qtpl:87
|
||||
qw422016.N().S(`</td><td class="errors border"><span class="alert alert-danger state_indicator">`)
|
||||
qw422016.N().S(`s</td><td class="errors border"><span class="alert alert-danger state_indicator">`)
|
||||
//line lib/promscrape/targets_response.qtpl:88
|
||||
qw422016.N().S(ts.error)
|
||||
qw422016.E().S(ts.error)
|
||||
//line lib/promscrape/targets_response.qtpl:88
|
||||
qw422016.N().S(`</span></td></tr>`)
|
||||
//line lib/promscrape/targets_response.qtpl:90
|
||||
|
Loading…
Reference in New Issue
Block a user