mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-24 21:24:05 -08:00
Improve display of target labels on status page.
Instead of a "{...}"-style list, show key/value pairs as Bootstrap labels.
This commit is contained in:
parent
51653e7890
commit
adf6850853
|
@ -17,3 +17,7 @@ th.job_header {
|
||||||
.literal_output td {
|
.literal_output td {
|
||||||
font-family: monospace;
|
font-family: monospace;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.cursor-pointer {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
|
@ -56,9 +56,16 @@
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="#" data-toggle="tooltip" title="" data-original-title="Before Relabel: {{.MetaLabels}}">
|
<span class="cursor-pointer" data-toggle="tooltip" title="" data-original-title="Before relabeling: {{.MetaLabels}}">
|
||||||
{{or (stripLabels .BaseLabels "job" "instance") "{}"}}
|
{{$baseLabels := stripLabels .BaseLabels "job" "instance"}}
|
||||||
</a>
|
{{if $baseLabels}}
|
||||||
|
{{range $label, $value := $baseLabels}}
|
||||||
|
<span class="label label-primary">{{$label}}="{{$value}}"</span>
|
||||||
|
{{end}}
|
||||||
|
{{else}}
|
||||||
|
<span class="label label-default">none</span>
|
||||||
|
{{end}}
|
||||||
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{{if .Status.LastScrape.IsZero}}Never{{else}}{{since .Status.LastScrape}} ago{{end}}
|
{{if .Status.LastScrape.IsZero}}Never{{else}}{{since .Status.LastScrape}} ago{{end}}
|
||||||
|
|
Loading…
Reference in a new issue