|
|
@ -373,14 +373,14 @@ func (h *Handler) rules(w http.ResponseWriter, r *http.Request) {
|
|
|
|
|
|
|
|
|
|
|
|
func (h *Handler) targets(w http.ResponseWriter, r *http.Request) {
|
|
|
|
func (h *Handler) targets(w http.ResponseWriter, r *http.Request) {
|
|
|
|
// Bucket targets by job label
|
|
|
|
// Bucket targets by job label
|
|
|
|
tps := map[string][]retrieval.Target{}
|
|
|
|
tps := map[string][]*retrieval.Target{}
|
|
|
|
for _, t := range h.targetManager.Targets() {
|
|
|
|
for _, t := range h.targetManager.Targets() {
|
|
|
|
job := string(t.Labels()[model.JobLabel])
|
|
|
|
job := string(t.Labels()[model.JobLabel])
|
|
|
|
tps[job] = append(tps[job], t)
|
|
|
|
tps[job] = append(tps[job], t)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
h.executeTemplate(w, "targets.html", struct {
|
|
|
|
h.executeTemplate(w, "targets.html", struct {
|
|
|
|
TargetPools map[string][]retrieval.Target
|
|
|
|
TargetPools map[string][]*retrieval.Target
|
|
|
|
}{
|
|
|
|
}{
|
|
|
|
TargetPools: tps,
|
|
|
|
TargetPools: tps,
|
|
|
|
})
|
|
|
|
})
|
|
|
|