2010-07-17 00:38:06 +08:00
|
|
|
<h1>Queues</h1>
|
2010-09-29 21:45:40 +08:00
|
|
|
<div class="section">
|
|
|
|
|
<h2>All queues</h2>
|
2013-03-06 20:29:30 +08:00
|
|
|
<div class="hider">
|
|
|
|
|
<%= filter_ui(queues) %>
|
|
|
|
|
<div class="updatable">
|
2010-07-17 00:38:06 +08:00
|
|
|
<% if (queues.length > 0) { %>
|
2011-06-20 22:54:36 +08:00
|
|
|
<%
|
|
|
|
|
var col_redeliver = !is_col_empty(queues, 'redeliver');
|
|
|
|
|
%>
|
2010-07-17 00:38:06 +08:00
|
|
|
<table class="list">
|
|
|
|
|
<thead>
|
2010-07-23 21:01:10 +08:00
|
|
|
<tr>
|
2012-05-18 00:54:20 +08:00
|
|
|
<th colspan="<% if (nodes_interesting && vhosts_interesting) { %>7<% } else if (nodes_interesting || vhosts_interesting) { %>6<% } else { %>5<% } %>">Overview</th>
|
2010-07-17 00:38:06 +08:00
|
|
|
<th colspan="3">Messages</th>
|
2010-10-29 20:01:22 +08:00
|
|
|
<% if (statistics_level == 'fine') { %>
|
|
|
|
|
<th colspan="3">Message rates</th>
|
|
|
|
|
<% } %>
|
2010-07-17 00:38:06 +08:00
|
|
|
</tr>
|
2010-07-23 21:01:10 +08:00
|
|
|
<tr>
|
2010-11-09 19:42:43 +08:00
|
|
|
<% if (vhosts_interesting) { %>
|
2010-10-12 00:05:06 +08:00
|
|
|
<th><%= fmt_sort('Virtual host', 'vhost') %></th>
|
2010-11-09 19:42:43 +08:00
|
|
|
<% } %>
|
2010-10-12 00:05:06 +08:00
|
|
|
<th><%= fmt_sort('Name', 'name') %></th>
|
2010-11-05 22:40:09 +08:00
|
|
|
<% if (nodes_interesting) { %>
|
|
|
|
|
<th><%= fmt_sort('Node', 'node') %></th>
|
|
|
|
|
<% } %>
|
2010-10-29 20:01:22 +08:00
|
|
|
<th><%= fmt_sort('Exclusive', 'owner_pid_details.name') %></th>
|
|
|
|
|
<th>Parameters</th>
|
2012-05-18 00:54:20 +08:00
|
|
|
<th><%= fmt_sort('Policy', 'policy') %></th>
|
2010-11-16 23:41:17 +08:00
|
|
|
<th><%= fmt_sort('Status', 'idle_since') %></th>
|
2010-10-12 00:05:06 +08:00
|
|
|
<th><%= fmt_sort('Ready', 'messages_ready') %></th>
|
|
|
|
|
<th><%= fmt_sort('Unacked', 'messages_unacknowledged') %></th>
|
|
|
|
|
<th><%= fmt_sort('Total', 'messages') %></th>
|
2010-10-29 20:01:22 +08:00
|
|
|
<% if (statistics_level == 'fine') { %>
|
2011-07-05 20:19:06 +08:00
|
|
|
<th><%= fmt_sort('incoming', 'message_stats.publish_details.rate') %></th>
|
|
|
|
|
<th><%= fmt_sort('deliver / get', 'message_stats.deliver_get_details.rate') %>
|
2011-06-20 22:54:36 +08:00
|
|
|
<% if (col_redeliver) { %>
|
2011-07-05 20:19:06 +08:00
|
|
|
<sub><%= fmt_sort('of which redelivered', 'message_stats.redeliver_details.rate') %></sub>
|
2011-06-20 22:54:36 +08:00
|
|
|
<% } %>
|
2011-07-05 20:19:06 +08:00
|
|
|
</th>
|
|
|
|
|
<th><%= fmt_sort('ack', 'message_stats.ack_details.rate') %></th>
|
2010-10-29 20:01:22 +08:00
|
|
|
<% } %>
|
2010-07-17 00:38:06 +08:00
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
2010-09-29 21:45:40 +08:00
|
|
|
<%
|
|
|
|
|
for (var i = 0; i < queues.length; i++) {
|
|
|
|
|
var queue = queues[i];
|
|
|
|
|
%>
|
|
|
|
|
<tr<%= alt_rows(i) %>>
|
2010-11-09 19:42:43 +08:00
|
|
|
<% if (vhosts_interesting) { %>
|
2011-11-30 21:43:42 +08:00
|
|
|
<td><%= fmt_string(queue.vhost) %></td>
|
2010-11-09 19:42:43 +08:00
|
|
|
<% } %>
|
2010-09-29 21:45:40 +08:00
|
|
|
<td><%= link_queue(queue.vhost, queue.name) %></td>
|
2010-11-05 22:40:09 +08:00
|
|
|
<% if (nodes_interesting) { %>
|
2011-05-25 18:58:56 +08:00
|
|
|
<td>
|
2012-11-05 21:26:32 +08:00
|
|
|
<%= fmt_node(queue.node) %>
|
2011-05-25 18:58:56 +08:00
|
|
|
<%= fmt_mirrors(queue) %>
|
2012-12-14 20:03:27 +08:00
|
|
|
<% if (queue.status == 'syncing') { %>
|
2013-01-08 23:41:53 +08:00
|
|
|
<%= fmt_sync_status(queue) %>
|
2012-12-14 20:03:27 +08:00
|
|
|
<% } %>
|
2011-05-25 18:58:56 +08:00
|
|
|
</td>
|
2010-11-05 22:40:09 +08:00
|
|
|
<% } %>
|
2012-10-19 23:29:16 +08:00
|
|
|
<td class="c">
|
2010-11-08 21:50:57 +08:00
|
|
|
<% if (queue.owner_pid_details != undefined) { %>
|
2012-10-19 23:29:16 +08:00
|
|
|
<%= link_conn(queue.owner_pid_details.name, "Owner") %>
|
2010-07-24 00:24:01 +08:00
|
|
|
<% } %>
|
|
|
|
|
</td>
|
2012-05-18 00:54:20 +08:00
|
|
|
<td class="c"><%= fmt_parameters_short(queue) %></td>
|
2012-06-26 01:02:03 +08:00
|
|
|
<td class="c"><%= fmt_string(queue.policy, '') %></td>
|
2010-11-16 23:41:17 +08:00
|
|
|
<td class="c"><%= fmt_idle(queue) %></td>
|
2013-06-29 00:30:08 +08:00
|
|
|
<td class="r"><%= fmt_num_thousands(queue.messages_ready) %></td>
|
|
|
|
|
<td class="r"><%= fmt_num_thousands(queue.messages_unacknowledged) %></td>
|
|
|
|
|
<td class="r"><%= fmt_num_thousands(queue.messages) %></td>
|
2010-10-29 20:01:22 +08:00
|
|
|
<% if (statistics_level == 'fine') { %>
|
2012-12-19 01:13:44 +08:00
|
|
|
<td class="r"><%= fmt_rate(queue.message_stats, 'publish') %></td>
|
2011-07-07 05:51:40 +08:00
|
|
|
<td class="r"><%= fmt_deliver_rate(queue.message_stats, col_redeliver) %></td>
|
2012-12-19 01:13:44 +08:00
|
|
|
<td class="r"><%= fmt_rate(queue.message_stats, 'ack') %></td>
|
2010-10-29 20:01:22 +08:00
|
|
|
<% } %>
|
2010-07-17 00:38:06 +08:00
|
|
|
</tr>
|
|
|
|
|
<% } %>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
<% } else { %>
|
|
|
|
|
<p>... no queues ...</p>
|
|
|
|
|
<% } %>
|
2010-09-29 21:45:40 +08:00
|
|
|
</div>
|
2013-03-06 20:29:30 +08:00
|
|
|
</div>
|
2010-09-29 21:45:40 +08:00
|
|
|
</div>
|
2010-08-27 17:55:32 +08:00
|
|
|
|
|
|
|
|
<div class="section-hidden">
|
|
|
|
|
<h2>Add a new queue</h2>
|
2010-10-27 19:41:55 +08:00
|
|
|
<div class="hider">
|
2010-08-27 17:55:32 +08:00
|
|
|
<form action="#/queues" method="put">
|
|
|
|
|
<table class="form">
|
2011-05-24 22:48:54 +08:00
|
|
|
<% if (vhosts_interesting) { %>
|
2010-08-27 17:55:32 +08:00
|
|
|
<tr>
|
|
|
|
|
<th><label>Virtual host:</label></th>
|
|
|
|
|
<td>
|
|
|
|
|
<select name="vhost">
|
|
|
|
|
<% for (var i = 0; i < vhosts.length; i++) { %>
|
2011-11-30 21:43:42 +08:00
|
|
|
<option value="<%= fmt_string(vhosts[i].name) %>"><%= fmt_string(vhosts[i].name) %></option>
|
2010-08-27 17:55:32 +08:00
|
|
|
<% } %>
|
|
|
|
|
</select>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
2011-05-24 22:48:54 +08:00
|
|
|
<% } else { %>
|
2011-11-30 21:43:42 +08:00
|
|
|
<tr><td><input type="hidden" name="vhost" value="<%= fmt_string(vhosts[0].name) %>"/></td></tr>
|
2011-05-24 22:48:54 +08:00
|
|
|
<% } %>
|
2010-08-27 17:55:32 +08:00
|
|
|
<tr>
|
|
|
|
|
<th><label>Name:</label></th>
|
2011-01-08 01:10:04 +08:00
|
|
|
<td><input type="text" name="name"/><span class="mand">*</span></td>
|
2010-08-27 17:55:32 +08:00
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<th><label>Durability:</label></th>
|
|
|
|
|
<td>
|
|
|
|
|
<select name="durable">
|
|
|
|
|
<option value="true">Durable</option>
|
|
|
|
|
<option value="false">Transient</option>
|
|
|
|
|
</select>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
2011-03-25 01:00:16 +08:00
|
|
|
<%
|
|
|
|
|
if (nodes_interesting) {
|
|
|
|
|
var nodes = JSON.parse(sync_get('/nodes'));
|
|
|
|
|
%>
|
2011-02-07 22:59:30 +08:00
|
|
|
<tr>
|
2011-05-25 20:51:05 +08:00
|
|
|
<th><label>Node:</label></th>
|
2011-02-07 22:59:30 +08:00
|
|
|
<td>
|
|
|
|
|
<select name="node">
|
|
|
|
|
<% for (var i = 0; i < nodes.length; i++) { %>
|
2011-11-30 21:43:42 +08:00
|
|
|
<option value="<%= fmt_string(nodes[i].name) %>"><%= nodes[i].name %></option>
|
2011-02-07 22:59:30 +08:00
|
|
|
<% } %>
|
|
|
|
|
</select>
|
2011-05-25 22:50:31 +08:00
|
|
|
</td>
|
|
|
|
|
</tr>
|
2011-02-07 22:59:30 +08:00
|
|
|
<% } %>
|
2010-08-27 17:55:32 +08:00
|
|
|
<tr>
|
2012-01-25 20:00:24 +08:00
|
|
|
<th><label>Auto delete: <span class="help" id="queue-auto-delete"></span></label></th>
|
2010-08-27 17:55:32 +08:00
|
|
|
<td>
|
|
|
|
|
<select name="auto_delete">
|
|
|
|
|
<option value="false">No</option>
|
|
|
|
|
<option value="true">Yes</option>
|
|
|
|
|
</select>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
2011-05-25 20:51:05 +08:00
|
|
|
<tr>
|
2012-01-25 20:00:24 +08:00
|
|
|
<th><label>Message TTL: <span class="help" id="queue-message-ttl"></span></label></th>
|
2011-05-25 20:51:05 +08:00
|
|
|
<td><input type="text" name="x-message-ttl"/> ms</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
2012-01-25 20:00:24 +08:00
|
|
|
<th><label>Auto expire: <span class="help" id="queue-expires"></span></label></th>
|
2011-05-25 20:51:05 +08:00
|
|
|
<td><input type="text" name="x-expires"/> ms</td>
|
|
|
|
|
</tr>
|
2013-04-10 23:16:45 +08:00
|
|
|
<tr>
|
|
|
|
|
<th><label>Max length: <span class="help" id="queue-max-length"></span></label></th>
|
|
|
|
|
<td><input type="text" name="x-max-length"/></td>
|
|
|
|
|
</tr>
|
2012-01-25 02:29:37 +08:00
|
|
|
<tr>
|
2012-01-25 20:00:24 +08:00
|
|
|
<th><label>Dead letter exchange: <span class="help" id="queue-dead-letter-exchange"></span></label></th>
|
|
|
|
|
<td><input type="text" name="x-dead-letter-exchange"/></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<th><label>Dead letter routing key: <span class="help" id="queue-dead-letter-routing-key"></span></label></th>
|
|
|
|
|
<td><input type="text" name="x-dead-letter-routing-key"/></td>
|
2012-01-25 02:29:37 +08:00
|
|
|
</tr>
|
2010-08-27 17:55:32 +08:00
|
|
|
<tr>
|
|
|
|
|
<th><label>Arguments:</label></th>
|
2013-05-14 01:10:59 +08:00
|
|
|
<td><div class="multifield" id="arguments"></div></td>
|
2010-08-27 17:55:32 +08:00
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
<input type="submit" value="Add queue"/>
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|