-
Notifications
You must be signed in to change notification settings - Fork 0
/
nodes.html.go
56 lines (52 loc) · 1.6 KB
/
nodes.html.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
package templates
func init() {
registerTemplate("nodes.html", `
{{template "header.html" .}}
{{$ld := .Lookupd}}
<div class="row-fluid"><div class="span12">
<h2>NSQD Hosts ({{.Producers | len}})</h2>
</div></div>
<div class="row-fluid"><div class="span12">
<table class="table table-bordered">
<tr>
<th>Hostname</th>
<th>Broadcast Address</th>
<th>TCP Port</th>
<th>HTTP Port</th>
<th>Version</th>
{{if $ld}}
<th>Lookupd Conns.</th>
{{end}}
<th>Topics</th>
</tr>
{{range $p := .Producers }}
<tr {{if .OutOfDate}}class="warning"{{end}}>
<td>{{.Hostname}}</td>
<td><a href="/node/{{.BroadcastAddress}}:{{.HttpPort}}">{{.BroadcastAddress}}</a></td>
<td>{{.TcpPort}}</td>
<td>{{.HttpPort}}</td>
<td>{{.Version}}</td>
{{if $ld}}
<td>
<a href="#" class="conn-counts btn btn-small {{$p | getNodeConsistencyClass}}">{{.RemoteAddresses | len}}</a>
<div style="display: none;">
{{range .RemoteAddresses}}{{.}}<br/>{{end}}
</div>
</td>
{{end}}
<td>
{{if .Topics}}
<span class="badge">{{.Topics | len}}</span>
{{range .Topics}}
<a href="/topic/{{.Topic}}" class="label {{if .Tombstoned}}label-important{{else}}label-info{{end}}" {{if .Tombstoned}}title="this topic is currently tombstoned on this node"{{end}}>{{.Topic}}</a>
{{end}}
{{end}}
</td>
</tr>
{{ end }}
</table>
</div></div>
{{template "js.html" .}}
{{template "footer.html" .}}
`)
}