diff --git a/web/static/css/prometheus.css b/web/static/css/prometheus.css index 086bd7f9e..d801925ac 100644 --- a/web/static/css/prometheus.css +++ b/web/static/css/prometheus.css @@ -10,7 +10,7 @@ th.job_header { padding-bottom: 10px; } -.error_text { +.target_status_alert { padding: 0 4px 0 4px; } diff --git a/web/status.go b/web/status.go index 27f718ac5..a0175fa89 100644 --- a/web/status.go +++ b/web/status.go @@ -35,6 +35,14 @@ type PrometheusStatusHandler struct { Birth time.Time } +func (h *PrometheusStatusHandler) TargetStateToClass() map[retrieval.TargetState]string { + return map[retrieval.TargetState]string{ + retrieval.Unknown: "warning", + retrieval.Healthy: "success", + retrieval.Unhealthy: "danger", + } +} + func (h *PrometheusStatusHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { executeTemplate(w, "status", h) } diff --git a/web/templates/status.html b/web/templates/status.html index 9fd4ed936..cf3586d7d 100644 --- a/web/templates/status.html +++ b/web/templates/status.html @@ -31,8 +31,9 @@
{{range .RuleManager.Rules}}{{.HTMLSnippet}}
{{end}}
{{$job}} | ||||
---|---|---|---|---|
- {{.State}} + + {{.State}} + | {{.BaseLabels}} @@ -60,14 +63,14 @@ | {{if .LastError}} - {{.LastError}} + {{.LastError}} {{end}} |