mirror of
https://github.com/prometheus/prometheus.git
synced 2025-01-12 14:27:27 -08:00
Fix old template naming
This commit is contained in:
parent
198c68045d
commit
ec9c51ab98
|
@ -42,8 +42,8 @@ type PrometheusStatusHandler struct {
|
||||||
func (h *PrometheusStatusHandler) TargetHealthToClass() map[retrieval.TargetHealth]string {
|
func (h *PrometheusStatusHandler) TargetHealthToClass() map[retrieval.TargetHealth]string {
|
||||||
return map[retrieval.TargetHealth]string{
|
return map[retrieval.TargetHealth]string{
|
||||||
retrieval.HealthUnknown: "warning",
|
retrieval.HealthUnknown: "warning",
|
||||||
retrieval.HealthBad: "success",
|
retrieval.HealthGood: "success",
|
||||||
retrieval.HealthGood: "danger",
|
retrieval.HealthBad: "danger",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
|
|
||||||
<h2>Targets</h2>
|
<h2>Targets</h2>
|
||||||
<table class="table table-condensed table-bordered table-striped table-hover">
|
<table class="table table-condensed table-bordered table-striped table-hover">
|
||||||
|
{{$healthToClass := .TargetHealthToClass}}
|
||||||
{{range $job, $pool := call .TargetPools}}
|
{{range $job, $pool := call .TargetPools}}
|
||||||
<thead>
|
<thead>
|
||||||
<tr><th colspan="5" class="job_header">{{$job}}</th></tr>
|
<tr><th colspan="5" class="job_header">{{$job}}</th></tr>
|
||||||
|
@ -50,8 +51,8 @@
|
||||||
<a href="{{.URL | globalURL}}">{{.URL}}</a>
|
<a href="{{.URL | globalURL}}">{{.URL}}</a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<span class="alert alert-{{index .TargetHealthToClass .Status.State}} target_status_alert">
|
<span class="alert alert-{{index $healthToClass .Status.Health}} target_status_alert">
|
||||||
{{.Status.State}}
|
{{.Status.Health}}
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
|
Loading…
Reference in a new issue