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
|
<h3><%= label %></h3>
<% if (object && object.length > 0) { %>
<%
var col_return_unroutable = !is_col_empty(object, 'return_unroutable', function(o) {return o.stats;});
var col_confirm = mode != 'exchange-outgoing';
%>
<table class="list">
<tr>
<% if (mode == 'channel') { %>
<th>Exchange</th>
<% } else if (mode == 'exchange-incoming') { %>
<th>Channel</th>
<% } else if (mode == 'exchange-outgoing') { %>
<th>Queue</th>
<% } else { %>
<th>Exchange</th>
<% } %>
<th>publish</th>
<% if (col_confirm) { %>
<th>confirm</th>
<% } %>
<% if (col_return_unroutable) { %>
<th>return (mandatory)</th>
<% } %>
</tr>
<%
for (var i = 0; i < object.length; i++) {
var pub = object[i];
%>
<tr<%= alt_rows(i)%>>
<% if (mode == 'channel') { %>
<td><%= link_exchange(pub.exchange.vhost, pub.exchange.name) %></td>
<% } else if (mode == 'exchange-incoming') { %>
<td><%= link_channel(pub.channel_details.name) %></td>
<% } else if (mode == 'exchange-outgoing') { %>
<td><%= link_queue(pub.queue.vhost, pub.queue.name) %></td>
<% } else { %>
<td><%= link_exchange(pub.exchange.vhost, pub.exchange.name) %></td>
<% } %>
<td class="r"><%= fmt_rate(pub.stats, 'publish') %></td>
<% if (col_confirm) { %>
<td class="r"><%= fmt_rate(pub.stats, 'confirm') %></td>
<% } %>
<% if (col_return_unroutable) { %>
<td class="r"><%= fmt_rate(pub.stats, 'return_unroutable') %></td>
<% } %>
</tr>
<% } %>
</table>
<% } else { %>
<p> ... no publishes ...</p>
<% } %>
|