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