-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchannel.hbs
225 lines (219 loc) · 11.1 KB
/
channel.hbs
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
{{> warning}}
{{> error}}
<ol class="breadcrumb">
<li><a class="link" href="/">Streams</a>
<li><a class="link" href="/topics/{{urlencode topic}}">{{topic}}</a>
<li class="active">{{name}}</li>
</ol>
<div class="row">
<div class="col-md-6">
<blockquote>
<p>Topic: <strong>{{topic}}</strong>
<p>Channel: <strong>{{name}}</strong>
</blockquote>
</div>
</div>
{{#unless nodes.length}}
<div class="row">
<div class="col-md-6">
<div class="alert alert-warning">
<h4>Notice</h4> No producers exist for this topic/channel.
<p>See <a class="link" href="/lookup">Lookup</a> for more information.
</div>
</div>
</div>
{{else}}
{{#if isAdmin}}
<div class="row channel-actions">
<div class="col-md-2">
<button class="btn btn-medium btn-warning" data-action="empty">Empty Queue</button>
</div>
<div class="col-md-2">
<button class="btn btn-medium btn-danger" data-action="delete">Delete Channel</button>
</div>
<div class="col-md-2">
{{#if paused}}
<button class="btn btn-medium btn-success" data-action="unpause">UnPause Channel</button>
{{else}}
<button class="btn btn-medium btn-primary" data-action="pause">Pause Channel</button>
{{/if}}
</div>
</div>
{{/if}}
<div class="row">
<div class="col-md-12">
<h4>Channel</h4>
<table class="table table-bordered table-condensed">
<tr>
<th> </th>
<th colspan="4" class="text-center">Message Queues</th>
<th colspan="{{#if graph_active}}5{{else}}4{{/if}}" class="text-center">Statistics</th>
{{#if e2e_processing_latency.percentiles.length}}
<th colspan="{{e2e_processing_latency.percentiles.length}}">E2E Processing Latency</th>
{{/if}}
</tr>
<tr>
<th>NSQd Host</th>
<th>Depth</th>
<th>Memory + Disk</th>
<th>In-Flight</th>
<th>Deferred</th>
<th>Requeued</th>
<th>Timed Out</th>
<th>Messages</th>
{{#if graph_active}}<th>Rate</th>{{/if}}
<th>Connections</th>
{{#each e2e_processing_latency.percentiles}}
<th>{{floatToPercent quantile}}<sup>{{percSuffix quantile}}</sup></th>
{{/each}}
</tr>
{{#each nodes}}
<tr>
<td>
{{#if show_broadcast_address}}
{{hostname_port}} (<a class="link" href="/nodes/{{node}}">{{node}}</a>)
{{else}}
<a class="link" href="/nodes/{{node}}">{{hostname_port}}</a>
{{/if}}
{{#if paused}} <span class="label label-primary">paused</span>{{/if}}
</td>
<td>{{commafy depth}}</td>
<td>{{commafy memory_depth}} + {{commafy backend_depth}}</td>
<td>{{commafy in_flight_count}}</td>
<td>{{commafy deferred_count}}</td>
<td>{{commafy requeue_count}}</td>
<td>{{commafy timeout_count}}</td>
<td>{{commafy message_count}}</td>
{{#if ../graph_active}}
<td class="bold rate" target="{{rate "topic" node topic_name ""}}"></td>
{{/if}}
<td>{{commafy clients.length}}</td>
{{#if e2e_processing_latency.percentiles.length}}
{{#each e2e_processing_latency.percentiles}}
<td>
<span title="{{floatToPercent quantile}}: min = {{nanotohuman min}}, max = {{nanotohuman max}}">{{nanotohuman average}}</span>
</td>
{{/each}}
{{/if}}
</tr>
{{#if ../graph_active}}
<tr class="graph-row">
<td></td>
<td><a href="{{large_graph "channel" node topic_name channel_name "depth"}}"><img width="120" height="20" src="{{sparkline "channel" node topic_name channel_name "depth"}}"></a></td>
<td></td>
<td><a href="{{large_graph "channel" node topic_name channel_name "in_flight_count"}}"><img width="120" height="20" src="{{sparkline "channel" node topic_name channel_name "in_flight_count"}}"></a></td>
<td><a href="{{large_graph "channel" node topic_name channel_name "deferred_count"}}"><img width="120" height="20" src="{{sparkline "channel" node topic_name channel_name "deferred_count"}}"></a></td>
<td><a href="{{large_graph "channel" node topic_name channel_name "requeue_count"}}"><img width="120" height="20" src="{{sparkline "channel" node topic_name channel_name "requeue_count"}}"></a></td>
<td><a href="{{large_graph "channel" node topic_name channel_name "timeout_count"}}"><img width="120" height="20" src="{{sparkline "channel" node topic_name channel_name "timeout_count"}}"></a></td>
<td><a href="{{large_graph "channel" node topic_name channel_name "message_count"}}"><img width="120" height="20" src="{{sparkline "channel" node topic_name channel_name "message_count"}}"></a></td>
<td></td>
<td><a href="{{large_graph "channel" node topic_name channel_name "clients"}}"><img width="120" height="20" src="{{sparkline "channel" node topic_name channel_name "clients"}}"></a></td>
{{#if e2e_processing_latency.percentiles.length}}
<td colspan="{{e2e_processing_latency.percentiles.length}}">
<a href="{{large_graph "e2e" node e2e_processing_latency "" "e2e_processing_latency"}}"><img width="120" height="20" src="{{sparkline "e2e" node e2e_processing_latency "" "e2e_processing_latency"}}"></a>
</td>
{{/if}}
</tr>
{{/if}}
{{/each}}
<tr class="info">
<td>Total:</td>
<td>{{commafy depth}}</td>
<td>{{commafy memory_depth}} + {{commafy backend_depth}}</td>
<td>{{commafy in_flight_count}}</td>
<td>{{commafy deferred_count}}</td>
<td>{{commafy requeue_count}}</td>
<td>{{commafy timeout_count}}</td>
<td>{{commafy message_count}}</td>
{{#if ../graph_active}}
<td class="bold rate" target="{{rate "topic" node topic_name ""}}"></td>
{{/if}}
<td>{{commafy clients.length}}</td>
{{#if e2e_processing_latency.percentiles.length}}
{{#each e2e_processing_latency.percentiles}}
<td>
<span title="{{floatToPercent quantile}}: min = {{nanotohuman min}}, max = {{nanotohuman max}}">{{nanotohuman average}}</span>
</td>
{{/each}}
{{/if}}
</tr>
{{#if graph_active}}
<tr class="graph-row">
<td></td>
<td><a href="{{large_graph "channel" node topic_name channel_name "depth"}}"><img width="120" height="20" src="{{sparkline "channel" node topic_name channel_name "depth"}}"></a></td>
<td></td>
<td><a href="{{large_graph "channel" node topic_name channel_name "in_flight_count"}}"><img width="120" height="20" src="{{sparkline "channel" node topic_name channel_name "in_flight_count"}}"></a></td>
<td><a href="{{large_graph "channel" node topic_name channel_name "deferred_count"}}"><img width="120" height="20" src="{{sparkline "channel" node topic_name channel_name "deferred_count"}}"></a></td>
<td><a href="{{large_graph "channel" node topic_name channel_name "requeue_count"}}"><img width="120" height="20" src="{{sparkline "channel" node topic_name channel_name "requeue_count"}}"></a></td>
<td><a href="{{large_graph "channel" node topic_name channel_name "timeout_count"}}"><img width="120" height="20" src="{{sparkline "channel" node topic_name channel_name "timeout_count"}}"></a></td>
<td><a href="{{large_graph "channel" node topic_name channel_name "message_count"}}"><img width="120" height="20" src="{{sparkline "channel" node topic_name channel_name "message_count"}}"></a></td>
<td></td>
<td><a href="{{large_graph "channel" node topic_name channel_name "clients"}}"><img width="120" height="20" src="{{sparkline "channel" node topic_name channel_name "clients"}}"></a></td>
{{#if e2e_processing_latency.percentiles.length}}
<td colspan="{{e2e_processing_latency.percentiles.length}}">
<a href="{{large_graph "e2e" node e2e_processing_latency "" "e2e_processing_latency"}}"><img width="120" height="20" src="{{sparkline "e2e" node e2e_processing_latency "" "e2e_processing_latency"}}"></a>
</td>
{{/if}}
</tr>
{{/if}}
</table>
</div>
</div>
{{/unless}}
<h4>Client Connections</h4>
<div class="row">
<div class="col-md-12">
{{#unless clients.length}}
<div class="alert alert-warning"><h4>Notice</h4>No clients connected to this channel</div>
{{else}}
<table class="table table-bordered table-condensed">
<tr>
<th>Client Host</th>
<th>User-Agent</th>
<th>Attributes</th>
<th>NSQd Host</th>
<th>In-Flight</th>
<th>Ready Count</th>
<th>Finished</th>
<th>Requeued</th>
<th>Messages</th>
<th>Connected</th>
</tr>
{{#each clients}}
<tr>
<td title="{{remote_address}}">{{hostname_port}}{{#if show_client_id}} ({{client_id}}){{/if}}</td>
<td>{{#if user_agent.length}}<small>{{user_agent}}</small>{{/if}}</td>
<td>
{{#if sample_rate}}
<span class="label label-info">Sampled {{sample_rate}}%</span>
{{/if}}
{{#if tls}}
<span class="label label-warning" {{#if tls_version}}title="{{tls_version}} {{tls_cipher_suite}} {{tls_negotiated_protocol}} mutual:{{tls_negotiated_protocol_is_mutual}}"{{/if}}>TLS</span>
{{/if}}
{{#if deflate}}
<span class="label label-default">Deflate</span>
{{/if}}
{{#if snappy}}
<span class="label label-primary">Snappy</span>
{{/if}}
{{#if authed}}
<span class="label label-success">
{{#if auth_identity_url}}<a href="{{auth_identity_url}}">{{/if}}
<span class="glyphicon glyphicon-user white" title="Authed{{#if auth_identity}} Identity:{{auth_identity}}{{/if}}"></span>
{{#if auth_identity_url}}</a>{{/if}}
</span>
{{/if}}
</td>
<td><a class="link" href="/nodes/{{node}}">{{node}}</a></td>
<td>{{commafy in_flight_count}}</td>
<td>{{commafy ready_count}}</td>
<td>{{commafy finish_count}}</td>
<td>{{commafy requeue_count}}</td>
<td>{{commafy message_count}}</td>
<td>{{nanotohuman connected}}</td>
</tr>
{{/each}}
</table>
{{/unless}}
</div>
</div>