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 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145
|
<h1>Traces</h1>
<div class="section">
<h2>All traces</h2>
<div class="hider updatable">
<table class="two-col-layout">
<tr>
<td>
<h3>Currently running traces</h3>
<% if (traces.length > 0) { %>
<table class="list">
<thead>
<tr>
<% if (vhosts_interesting) { %>
<th>Virtual host</th>
<% } %>
<th>Name</th>
<th>Pattern</th>
<th>Format</th>
<th>Rate</th>
<th>Queued</th>
<th></th>
</tr>
</thead>
<tbody>
<%
for (var i = 0; i < traces.length; i++) {
var trace = traces[i];
%>
<tr<%= alt_rows(i)%>>
<% if (vhosts_interesting) { %>
<td><%= fmt_string(trace.vhost) %></td>
<% } %>
<td><%= fmt_string(trace.name) %></td>
<td><%= fmt_string(trace.pattern) %></td>
<td><%= fmt_string(trace.format) %></td>
<% if (trace.queue) { %>
<td class="r">
<%= fmt_rate(trace.queue.message_stats, 'ack', false) %>
</td>
<td class="r">
<%= trace.queue.messages %>
<sub><%= link_to("(queue)", '#/queues/' + esc(trace.vhost) + '/' + esc(trace.queue.name)) %></sub>
</td>
<% } else { %>
<td colspan="2" class="status">
<div class="red">FAILED</div>
</td>
<% } %>
<td>
<form action="#/traces" method="delete">
<input type="hidden" name="vhost" value="<%= fmt_string(trace.vhost) %>"/>
<input type="hidden" name="name" value="<%= fmt_string(trace.name) %>"/>
<input type="submit" value="Stop"/>
</form>
</td>
</tr>
<% } %>
</tbody>
</table>
<% } else { %>
<p>... no traces running ...</p>
<% } %>
</td>
<td>
<h3>Trace log files</h3>
<% if (files.length > 0) { %>
<table class="list">
<thead>
<tr>
<th>Name</th>
<th>Size</th>
<th></th>
</tr>
</thead>
<tbody>
<%
for (var i = 0; i < files.length; i++) {
var file = files[i];
%>
<tr<%= alt_rows(i)%>>
<td><%= link_to(file.name, "api/trace-files/" + file.name) %></td>
<td class="r"><%= fmt_bytes(file.size) %></td>
<td>
<form action="#/trace-files" method="delete" class="inline-form">
<input type="hidden" name="name" value="<%= fmt_string(file.name) %>"/>
<input type="submit" value="Delete" />
</form>
</td>
</tr>
<% } %>
</tbody>
</table>
<% } else { %>
<p>... no files ...</p>
<% } %>
</td>
</tr>
</table>
</div>
</div>
<div class="section">
<h2>Add a new trace</h2>
<div class="hider">
<form action="#/traces" method="put">
<table class="form">
<% if (vhosts_interesting) { %>
<tr>
<th><label>Virtual host:</label></th>
<td>
<select name="vhost">
<% for (var i = 0; i < vhosts.length; i++) { %>
<option value="<%= fmt_string(vhosts[i].name) %>"><%= fmt_string(vhosts[i].name) %></option>
<% } %>
</select>
</td>
</tr>
<% } else { %>
<tr><td><input type="hidden" name="vhost" value="<%= fmt_string(vhosts[0].name) %>"/></td></tr>
<% } %>
<tr>
<th><label>Name:</label></th>
<td><input type="text" name="name"/><span class="mand">*</span></td>
</tr>
<tr>
<th><label>Format:</label></th>
<td>
<select name="format">
<option value="text">Text</option>
<option value="json">JSON</option>
</select>
</td>
</tr>
<tr>
<th><label>Pattern:</label></th>
<td>
<input type="text" name="pattern" value="#"/>
<sub>Examples: #, publish.#, deliver.# #.amq.direct, #.myqueue</sub>
</td>
</tr>
</table>
<input type="submit" value="Add trace"/>
</form>
</div>
</div>
|