We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1def96f + e4c9ccc commit 9395248Copy full SHA for 9395248
pkg/ring/http.go
@@ -40,8 +40,12 @@ const tpl = `
40
</tr>
41
</thead>
42
<tbody>
43
- {{ range .Ingesters }}
+ {{ range $i, $ing := .Ingesters }}
44
+ {{ if mod $i 2 }}
45
<tr>
46
+ {{ else }}
47
+ <tr bgcolor="#BEBEBE">
48
+ {{ end }}
49
<td>{{ .ID }}</td>
50
<td>{{ .State }}</td>
51
<td>{{ .Address }}</td>
@@ -61,7 +65,9 @@ const tpl = `
61
65
var tmpl *template.Template
62
66
63
67
func init() {
64
- tmpl = template.Must(template.New("webpage").Parse(tpl))
68
+ t := template.New("webpage")
69
+ t.Funcs(template.FuncMap{"mod": func(i, j int) bool { return i%j == 0 }})
70
+ tmpl = template.Must(t.Parse(tpl))
71
}
72
73
func (r *Ring) forget(ctx context.Context, id string) error {
0 commit comments