lib/promscrape: formatting fixes for /tarets page

This commit is contained in:
Aliaksandr Valialkin 2020-12-15 11:58:53 +02:00
parent 020917949b
commit 5af2a9ca0e
2 changed files with 10 additions and 9 deletions

View file

@ -29,6 +29,8 @@ job={%q= js.job %}{% space %} ({%d js.upCount %}/{%d js.targetsTotal %} {% space
{% func TargetsResponseHTML(jts []jobTargetsStatuses, redirectPath string, onlyUnhealthy bool) %}
<!DOCTYPE html>
<html lang="en">
<head>
<style>
.border{
border-collapse: collapse;
@ -38,12 +40,10 @@ job={%q= js.job %}{% space %} ({%d js.upCount %}/{%d js.targetsTotal %} {% space
background-color: #f5f5f5;
}
</style>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>VictoriaMetrics Database</title>
</head>
<body>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Scrape targets</title>
</head>
<body>
<h1>Targets</h1>
<div id="showTargets" class="btn-group btn-group-toggle" data-toggle="buttons">
<label class="btn">
@ -92,13 +92,14 @@ job={%q= js.job %}{% space %} ({%d js.upCount %}/{%d js.targetsTotal %} {% space
</table>
</div>
{% endfor %}
</body>
</body>
</html>
{% endfunc %}
{% func formatLabel(labels []prompbmarshal.Label) %}
{% for _, label := range labels %}
{% space %} {%s label.Name %}={%q label.Value %} {% space %}
{% space %} {%s label.Name %}={%q label.Value %} {% space %}
{% endfor %}
{% endfunc %}
{% endstripspace %}

View file

@ -163,7 +163,7 @@ func TargetsResponsePlain(jts []jobTargetsStatuses, showOriginLabels bool) strin
//line lib/promscrape/targets_response.qtpl:30
func StreamTargetsResponseHTML(qw422016 *qt422016.Writer, jts []jobTargetsStatuses, redirectPath string, onlyUnhealthy bool) {
//line lib/promscrape/targets_response.qtpl:30
qw422016.N().S(`<!DOCTYPE html><style>.border{border-collapse: collapse;border: 1px solid black;}.table-row:hover{background-color: #f5f5f5;}</style><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>VictoriaMetrics Database</title></head><body><h1>Targets</h1><div id="showTargets" class="btn-group btn-group-toggle" data-toggle="buttons"><label class="btn"><input type="radio" name="targets" id="all-targets" autocomplete="off" onclick="location.href='`)
qw422016.N().S(`<!DOCTYPE html><html lang="en"><head><style>.border{border-collapse: collapse;border: 1px solid black;}.table-row:hover{background-color: #f5f5f5;}</style><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>Scrape targets</title></head><body><h1>Targets</h1><div id="showTargets" class="btn-group btn-group-toggle" data-toggle="buttons"><label class="btn"><input type="radio" name="targets" id="all-targets" autocomplete="off" onclick="location.href='`)
//line lib/promscrape/targets_response.qtpl:50
qw422016.N().S(redirectPath)
//line lib/promscrape/targets_response.qtpl:50