Fix old template naming

This commit is contained in:
Fabian Reinartz 2015-05-19 15:38:51 +02:00
parent 198c68045d
commit ec9c51ab98
2 changed files with 5 additions and 4 deletions

View file

@ -42,8 +42,8 @@ type PrometheusStatusHandler struct {
func (h *PrometheusStatusHandler) TargetHealthToClass() map[retrieval.TargetHealth]string {
return map[retrieval.TargetHealth]string{
retrieval.HealthUnknown: "warning",
retrieval.HealthBad: "success",
retrieval.HealthGood: "danger",
retrieval.HealthGood: "success",
retrieval.HealthBad: "danger",
}
}

View file

@ -32,6 +32,7 @@
<h2>Targets</h2>
<table class="table table-condensed table-bordered table-striped table-hover">
{{$healthToClass := .TargetHealthToClass}}
{{range $job, $pool := call .TargetPools}}
<thead>
<tr><th colspan="5" class="job_header">{{$job}}</th></tr>
@ -50,8 +51,8 @@
<a href="{{.URL | globalURL}}">{{.URL}}</a>
</td>
<td>
<span class="alert alert-{{index .TargetHealthToClass .Status.State}} target_status_alert">
{{.Status.State}}
<span class="alert alert-{{index $healthToClass .Status.Health}} target_status_alert">
{{.Status.Health}}
</span>
</td>
<td>