Move vhost display up into the h1.

This commit is contained in:
Simon MacMullen 2014-08-07 14:20:10 +01:00
parent f1556ce3c6
commit 7e3579f1f1
6 changed files with 11 additions and 33 deletions

View File

@ -321,6 +321,12 @@ function is_col_empty(objects, name, accessor) {
return true;
}
function fmt_maybe_vhost(name) {
return vhosts_interesting ?
' in virtual host <b>' + fmt_escape_html(name) + '</b>'
: '';
}
function fmt_exchange(name) {
return fmt_escape_html(fmt_exchange0(name));
}

View File

@ -1,4 +1,4 @@
<h1>Channel: <b><%= fmt_escape_html(channel.name) %></b></h1>
<h1>Channel: <b><%= fmt_escape_html(channel.name) %></b><%= fmt_maybe_vhost(channel.vhost) %></h1>
<div class="section">
<h2>Overview</h2>
@ -19,12 +19,6 @@
<th>Node</th>
<td><%= fmt_node(channel.node) %></td>
</tr>
<% } %>
<% if (vhosts_interesting) { %>
<tr>
<th>Virtual host</th>
<td><%= fmt_string(channel.vhost) %></td>
</tr>
<% } %>
<tr>
<th>Username</th>

View File

@ -1,4 +1,4 @@
<h1>Connection <b><%= fmt_string(connection.name) %></b></h1>
<h1>Connection <b><%= fmt_string(connection.name) %></b><%= fmt_maybe_vhost(connection.vhost) %></h1>
<div class="section">
<h2>Overview</h2>
@ -14,12 +14,6 @@
<td><%= fmt_node(connection.node) %></td>
</tr>
<% } %>
<% if (vhosts_interesting) { %>
<tr>
<th>Virtual host</th>
<td><%= fmt_string(connection.vhost) %></td>
</tr>
<% } %>
<tr>
<th>Username</th>
<td><%= fmt_string(connection.user) %></td>

View File

@ -1,4 +1,4 @@
<h1>Exchange: <b><%= fmt_exchange(exchange.name) %></b></h1>
<h1>Exchange: <b><%= fmt_exchange(exchange.name) %></b><%= fmt_maybe_vhost(exchange.vhost) %></h1>
<div class="section">
<h2>Overview</h2>
@ -22,12 +22,6 @@
<th>Policy</th>
<td><%= fmt_string(exchange.policy, '') %></td>
</tr>
<% if (vhosts_interesting) { %>
<tr>
<th>Virtual host</th>
<td><%= fmt_string(exchange.vhost) %></td>
</tr>
<% } %>
</table>
</div>
</div>

View File

@ -1,13 +1,9 @@
<h1>Policy: <b><%= fmt_string(policy.name) %></b></h1>
<h1>Policy: <b><%= fmt_string(policy.name) %></b><%= fmt_maybe_vhost(policy.vhost) %></h1>
<div class="section">
<h2>Overview</h2>
<div class="hider">
<table class="facts">
<tr>
<th>Virtual Host</th>
<td><%= fmt_string(policy.vhost) %></td>
</tr>
<tr>
<th>Pattern</th>
<td><%= fmt_string(policy.pattern) %></td>

View File

@ -1,4 +1,4 @@
<h1>Queue <b><%= fmt_string(queue.name) %></b></h1>
<h1>Queue <b><%= fmt_string(queue.name) %></b><%= fmt_maybe_vhost(queue.vhost) %></h1>
<div class="section">
<h2>Overview</h2>
@ -75,12 +75,6 @@
</table>
<table class="facts">
<% if (vhosts_interesting) { %>
<tr>
<th>Virtual host</th>
<td><%= fmt_string(queue.vhost) %></td>
</tr>
<% } %>
<% if (nodes_interesting) { %>
<tr>
<th>Node</th>