Abstract the delivery rate thing a bit.
This commit is contained in:
parent
0b0d3b6b62
commit
b7958936f3
|
|
@ -156,6 +156,14 @@ function fmt_rate0(obj, name, fmt, show_total) {
|
|||
return res;
|
||||
}
|
||||
|
||||
function fmt_deliver_rate(obj, show_redeliver, cssClass) {
|
||||
var res = fmt_rate(obj, 'deliver_get', false, cssClass);
|
||||
if (show_redeliver) {
|
||||
res += '<sub>' + fmt_rate(obj, 'redeliver') + '</sub>';
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
function is_stat_empty(obj, name) {
|
||||
if (obj == undefined
|
||||
|| obj[name] == undefined
|
||||
|
|
|
|||
|
|
@ -111,10 +111,7 @@
|
|||
<td class="r"><%= fmt_rate(channel.message_stats, 'publish') %></td>
|
||||
<td class="r"><%= fmt_rate(channel.message_stats, 'confirm') %></td>
|
||||
<td class="r">
|
||||
<%= fmt_rate(channel.message_stats, 'deliver_get') %>
|
||||
<% if (col_redeliver) { %>
|
||||
<sub><%= fmt_rate(channel.message_stats, 'redeliver') %></sub>
|
||||
<% } %>
|
||||
<%= fmt_deliver_rate(channel.message_stats, col_redeliver) %>
|
||||
</td>
|
||||
<td class="r"><%= fmt_rate(channel.message_stats, 'ack') %></td>
|
||||
<% if (col_return_unroutable) { %>
|
||||
|
|
|
|||
|
|
@ -28,22 +28,14 @@
|
|||
<% } else { %>
|
||||
<td><%= link_queue(del.queue_details.vhost, del.queue_details.name) %></td>
|
||||
<% } %>
|
||||
<td class="r">
|
||||
<%= fmt_rate(del.stats, 'deliver_get') %>
|
||||
<% if (col_redeliver) { %>
|
||||
<sub><%= fmt_rate(del.stats, 'redeliver') %></sub>
|
||||
<% } %>
|
||||
</td>
|
||||
<td class="r"><%= fmt_deliver_rate(del.stats, col_redeliver) %></td>
|
||||
<td class="r"><%= fmt_rate(del.stats, 'ack') %></td>
|
||||
</tr>
|
||||
<% } %>
|
||||
<tr class="total">
|
||||
<th>Total:</th>
|
||||
<td class="r">
|
||||
<%= fmt_rate(totals, 'deliver_get', false, 'mini-highlight') %>
|
||||
<% if (col_redeliver) { %>
|
||||
<br/><%= fmt_rate(totals, 'redeliver', false) %>
|
||||
<% } %>
|
||||
<%= fmt_deliver_rate(totals, col_redeliver, 'mini-highlight') %>
|
||||
</td>
|
||||
<td class="r"><%= fmt_rate(totals, 'ack', false, 'mini-highlight') %></td>
|
||||
</tr>
|
||||
|
|
|
|||
|
|
@ -69,10 +69,7 @@
|
|||
<% if (statistics_level == 'fine') { %>
|
||||
<td class="r"><%= fmt_rate(queue.message_stats, 'publish', false) %></td>
|
||||
<td class="r">
|
||||
<%= fmt_rate(queue.message_stats, 'deliver_get', false) %>
|
||||
<% if (col_redeliver) { %>
|
||||
<sub><%= fmt_rate(queue.message_stats, 'redeliver', false) %></sub>
|
||||
<% } %>
|
||||
<%= fmt_deliver_rate(queue.message_stats, col_redeliver) %>
|
||||
</td>
|
||||
<td class="r"><%= fmt_rate(queue.message_stats, 'ack', false) %></td>
|
||||
<% } %>
|
||||
|
|
|
|||
Loading…
Reference in New Issue