Make policy clickable.

Policy is refered by name in exchanges and queues pages.
Make it a link, so it's easier to navigate.

Fixes #493
[#152274158]
This commit is contained in:
Daniil Fedotov 2017-10-27 10:50:28 +01:00
parent e9d8d71a64
commit c24320c4bb
5 changed files with 5 additions and 5 deletions

View File

@ -85,7 +85,7 @@ function fmt_policy_short(obj) {
if (obj.policy != undefined && obj.policy != '') {
return '<abbr class="policy" title="Policy: ' +
fmt_escape_html(obj.policy) + '">' +
fmt_escape_html(obj.policy) + '</abbr> ';
link_policy(obj.vhost, obj.policy) + '</abbr> ';
} else {
return '';
}

View File

@ -18,7 +18,7 @@
</tr>
<tr>
<th>Policy</th>
<td><%= fmt_string(exchange.policy, '') %></td>
<td><%= link_policy(exchange.vhost, exchange.policy) %></td>
</tr>
</table>
</div>

View File

@ -58,7 +58,7 @@
<% } %>
<% if (show_column('exchanges', 'policy')) { %>
<td class="c">
<%= fmt_string(exchange.policy) %>
<%= link_policy(exchange.vhost, exchange.policy) %>
</td>
<% } %>
<% if (rates_mode != 'none') { %>

View File

@ -16,7 +16,7 @@
</tr>
<tr>
<th>Policy</th>
<td><%= fmt_string(queue.policy, '') %></td>
<td><%= link_policy(queue.vhost, queue.policy) %></td>
</tr>
<% if (nodes_interesting) { %>
<tr>

View File

@ -116,7 +116,7 @@
<td class="c"><%= fmt_features_short(queue) %></td>
<% } %>
<% if (show_column('queues', 'policy')) { %>
<td class="c"><%= fmt_string(queue.policy) %></td>
<td class="c"><%= link_policy(queue.vhost, queue.policy) %></td>
<% } %>
<% if (show_column('queues', 'consumers')) { %>
<td class="c"><%= fmt_string(queue.consumers) %></td>