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
|
<% if (channels.length > 0) { %>
<%
var col_return_unroutable = !is_col_empty(channels, 'return_unroutable');
var col_return_not_delivered = !is_col_empty(channels, 'return_not_delivered');
var col_redeliver = !is_col_empty(channels, 'redeliver');
var ratesWidth = 4 + (col_return_unroutable ? 1 : 0) + (col_return_not_delivered ? 1 : 0);
%>
<table class="list">
<thead>
<tr>
<% if (mode == 'standalone') { %>
<th colspan="<% if (nodes_interesting) { %>2<% } else { %>1<% } %>"></th>
<th colspan="<% if (vhosts_interesting) { %>7<% } else { %>6<% } %>">Details</th>
<% } else { %>
<th></th>
<th colspan="5">Details</th>
<% } %>
<% if (statistics_level == 'fine') { %>
<th colspan="<%= ratesWidth %>">Message rates</th>
<% } %>
</tr>
<tr>
<% if (mode == 'standalone') { %>
<th><%= fmt_sort('Channel', 'name') %></th>
<% if (nodes_interesting) { %>
<th><%= fmt_sort('Node', 'node') %></th>
<% } %>
<% if (vhosts_interesting) { %>
<th><%= fmt_sort('Virtual host', 'vhost') %></th>
<% } %>
<th><%= fmt_sort('User name', 'user') %></th>
<th>Mode <span class="help" id="channel-mode"></span></th>
<th><%= fmt_sort('Prefetch', 'prefetch_count') %></th>
<th><%= fmt_sort('Unacked', 'messages_unacknowledged') %></th>
<th><%= fmt_sort('Unconfirmed', 'messages_unconfirmed') %></th>
<th><%= fmt_sort('Status', 'idle_since') %></th>
<% if (statistics_level == 'fine') { %>
<th><%= fmt_sort('publish', 'message_stats.publish_details.rate') %></th>
<th><%= fmt_sort('confirm', 'message_stats.confirm_details.rate') %></th>
<th>
<%= fmt_sort('deliver / get', 'message_stats.deliver_get_details.rate') %>
<% if (col_redeliver) { %>
<sub><%= fmt_sort('of which redelivered', 'message_stats.redeliver_details.rate') %></sub>
<% } %>
</th>
<th><%= fmt_sort('ack', 'message_stats.ack_details.rate') %></th>
<% if (col_return_unroutable) { %>
<th><%= fmt_sort('return (mandatory)', 'message_stats.return_unroutable_details.rate') %></th>
<% } %>
<% if (col_return_not_delivered) { %>
<th><%= fmt_sort('return (immediate)', 'message_stats.return_not_delivered_details.rate') %></th>
<% } %>
<% } %>
<% } else { %>
<!-- TODO make sortable after bug 23401 -->
<th>Channel</th>
<th>Mode <span class="help" id="channel-mode"></span></th>
<th>Prefetch</th>
<th>Unacked</th>
<th>Unconfirmed</th>
<th>Status</th>
<% if (statistics_level == 'fine') { %>
<th>publish</th>
<th>confirm</th>
<th>
deliver / get
<% if (col_redeliver) { %>
<sub>of which redelivered</sub>
<% } %>
</th>
<th>ack</th>
<% if (col_return_unroutable) { %>
<th>return (mandatory)</th>
<% } %>
<% if (col_return_not_delivered) { %>
<th>return (immediate)</th>
<% } %>
<% } %>
<% } %>
</tr>
</thead>
<tbody>
<%
for (var i = 0; i < channels.length; i++) {
var channel = channels[i];
%>
<tr<%= alt_rows(i)%>>
<td>
<%= link_channel(channel.name) %>
</td>
<% if (mode == 'standalone' && nodes_interesting) { %>
<td><%= fmt_string(channel.node) %></td>
<% } %>
<% if (mode == 'standalone') { %>
<% if (vhosts_interesting) { %>
<td class="c"><%= fmt_string(channel.vhost) %></td>
<% } %>
<td class="c"><%= fmt_string(channel.user) %></td>
<% } %>
<td class="l">
<%= fmt_channel_mode(channel) %>
<% if (channel.transactional) { %>
<small><acronym title="<%= channel.messages_uncommitted %> uncommitted messages"><%= channel.messages_uncommitted %>m</acronym>/<acronym title="<%= channel.acks_uncommitted %> uncommitted acks"><%= channel.acks_uncommitted %>a</acronym></small>
<% } %>
</td>
<td class="c"><%= channel.prefetch_count %></td>
<td class="c"><%= channel.messages_unacknowledged %></td>
<td class="c"><%= channel.messages_unconfirmed %></td>
<td class="c"><%= fmt_idle(channel) %></td>
<% if (statistics_level == 'fine') { %>
<td class="r"><%= fmt_rate(channel.message_stats, 'publish') %></td>
<td class="r"><%= fmt_rate(channel.message_stats, 'confirm') %></td>
<td class="r"><%= fmt_deliver_rate(channel.message_stats, col_redeliver) %></td>
<td class="r"><%= fmt_rate(channel.message_stats, 'ack') %></td>
<% if (col_return_unroutable) { %>
<td class="r"><%= fmt_rate(channel.message_stats, 'return_unroutable') %></td>
<% } %>
<% if (col_return_not_delivered) { %>
<td class="r"><%= fmt_rate(channel.message_stats, 'return_not_delivered') %></td>
<% } %>
<% } %>
</tr>
<% } %>
</tbody>
</table>
<% } else { %>
<p>... no channels ...</p>
<% } %>
|