lib/promscrape: add missing whitespace between duration and ago word at /targets page

This commit is contained in:
Aliaksandr Valialkin 2020-12-14 14:19:58 +02:00
parent a2eb451de4
commit b904ae3722
2 changed files with 10 additions and 4 deletions

View file

@ -17,7 +17,7 @@ job={%q= js.job %}{% space %} ({%d js.upCount %}/{%d js.targetsTotal %} {% space
{% space %} endpoint={%s= ts.endpoint %}, {% space %} endpoint={%s= ts.endpoint %},
{% space %} labels={%s= labels %} {% space %} labels={%s= labels %}
{% if showOriginLabels %},{% space %} originalLabels={%s= ol %}{% endif %}, {% if showOriginLabels %},{% space %} originalLabels={%s= ol %}{% endif %},
{% space %} last_scrape={%f.3 ts.lastScrapeTime.Seconds() %}s ago, {% 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 float64(ts.scrapeDuration.Seconds()) %}s,
{% space %} error={%q= ts.error %} {% space %} error={%q= ts.error %}
{% newline %} {% newline %}
@ -83,7 +83,7 @@ job={%q= js.job %}{% space %} ({%d js.upCount %}/{%d js.targetsTotal %} {% space
<td class="labels border", title="Original {% space %} labels: {% space %} {%= formatLabel(ts.originalLabels) %}"> <td class="labels border", title="Original {% space %} labels: {% space %} {%= formatLabel(ts.originalLabels) %}">
{%= formatLabel(ts.labels) %} {%= formatLabel(ts.labels) %}
</td> </td>
<td class="last-scrape border">{%s ts.lastScrapeTime.String() %} ago</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="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="errors border"><span class="alert alert-danger state_indicator">{%s= ts.error %}</span></td>
</tr> </tr>
@ -101,4 +101,4 @@ job={%q= js.job %}{% space %} ({%d js.upCount %}/{%d js.targetsTotal %} {% space
{% space %} {%s label.Name %}={%q label.Value %} {% space %} {% space %} {%s label.Name %}={%q label.Value %} {% space %}
{% endfor %} {% endfor %}
{% endfunc %} {% endfunc %}
{% endstripspace %} {% endstripspace %}

View file

@ -102,7 +102,11 @@ func StreamTargetsResponsePlain(qw422016 *qt422016.Writer, jts []jobTargetsStatu
//line lib/promscrape/targets_response.qtpl:20 //line lib/promscrape/targets_response.qtpl:20
qw422016.N().FPrec(ts.lastScrapeTime.Seconds(), 3) qw422016.N().FPrec(ts.lastScrapeTime.Seconds(), 3)
//line lib/promscrape/targets_response.qtpl:20 //line lib/promscrape/targets_response.qtpl:20
qw422016.N().S(`s ago,`) qw422016.N().S(`s`)
//line lib/promscrape/targets_response.qtpl:20
qw422016.N().S(` `)
//line lib/promscrape/targets_response.qtpl:20
qw422016.N().S(`ago,`)
//line lib/promscrape/targets_response.qtpl:21 //line lib/promscrape/targets_response.qtpl:21
qw422016.N().S(` `) qw422016.N().S(` `)
//line lib/promscrape/targets_response.qtpl:21 //line lib/promscrape/targets_response.qtpl:21
@ -250,6 +254,8 @@ func StreamTargetsResponseHTML(qw422016 *qt422016.Writer, jts []jobTargetsStatus
qw422016.N().S(`</td><td class="last-scrape border">`) qw422016.N().S(`</td><td class="last-scrape border">`)
//line lib/promscrape/targets_response.qtpl:86 //line lib/promscrape/targets_response.qtpl:86
qw422016.E().S(ts.lastScrapeTime.String()) qw422016.E().S(ts.lastScrapeTime.String())
//line lib/promscrape/targets_response.qtpl:86
qw422016.N().S(` `)
//line lib/promscrape/targets_response.qtpl:86 //line lib/promscrape/targets_response.qtpl:86
qw422016.N().S(`ago</td><td class="scrape-duration border">`) qw422016.N().S(`ago</td><td class="scrape-duration border">`)
//line lib/promscrape/targets_response.qtpl:87 //line lib/promscrape/targets_response.qtpl:87