Skip to content
This repository has been archived by the owner on Nov 17, 2020. It is now read-only.

Commit

Permalink
Merge branch 'bug26613'
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon MacMullen committed Feb 27, 2015
2 parents af0cc63 + b08a282 commit 30ffe3b
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 53 deletions.
4 changes: 2 additions & 2 deletions priv/www/js/charts.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ function rates_chart_or_text(id, stats, items, fmt, axis_fmt, chart_rates,
else {
res = '<p>Currently idle</p>';
}
return prefix + '<div class="updatable">' + res + '</div>';
return prefix + res;
}

function chart_h3(id, heading, heading_help) {
var mode = get_pref('rate-mode-' + id);
var range = get_pref('chart-range');
return '<h3>' + heading +
' <span class="popup-options-link updatable" title="Click to change" ' +
' <span class="popup-options-link" title="Click to change" ' +
'type="rate" for="' + id + '">(' + prefix_title(mode, range) +
')</span>' + (heading_help == undefined ? '' :
' <span class="help" id="' + heading_help + '"></span>') +
Expand Down
4 changes: 2 additions & 2 deletions priv/www/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ function postprocess() {
return confirm("Are you sure? This object cannot be recovered " +
"after deletion.");
});
$('div.section h2, div.section-hidden h2').click(function() {
$('div.section h2, div.section-hidden h2').die().live('click', function() {
toggle_visibility($(this));
});
$('label').map(function() {
Expand Down Expand Up @@ -507,7 +507,6 @@ function postprocess() {
}
}
});
setup_visibility();
$('.help').die().live('click', function() {
help($(this).attr('id'))
});
Expand Down Expand Up @@ -561,6 +560,7 @@ function postprocess() {
}

function postprocess_partial() {
setup_visibility();
$('.sort').click(function() {
var sort = $(this).attr('sort');
if (current_sort == sort) {
Expand Down
4 changes: 1 addition & 3 deletions priv/www/js/tmpl/channel.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@

<div class="section">
<h2>Overview</h2>
<div class="hider">
<div class="hider updatable">
<% if (rates_mode != 'none') { %>
<%= message_rates('msg-rates-ch', channel.message_stats) %>
<% } %>

<div class="updatable">
<h3>Details</h3>
<table class="facts facts-l">
<tr>
Expand Down Expand Up @@ -63,7 +62,6 @@
<td><%= channel.acks_uncommitted %></td>
</tr>
</table>
</div>

</div>
</div>
Expand Down
4 changes: 1 addition & 3 deletions priv/www/js/tmpl/connection.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@

<div class="section">
<h2>Overview</h2>
<div class="hider">
<div class="hider updatable">
<%= data_rates('data-rates-conn', connection, 'Data rates') %>

<div class="updatable">
<h3>Details</h3>
<table class="facts facts-l">
<% if (nodes_interesting) { %>
Expand Down Expand Up @@ -62,7 +61,6 @@
</tr>
</table>
<% } %>
</div>

</div>
</div>
Expand Down
5 changes: 1 addition & 4 deletions priv/www/js/tmpl/exchange.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@

<div class="section">
<h2>Overview</h2>
<div class="hider">
<div class="hider updatable">
<% if (rates_mode != 'none') { %>
<%= message_rates('msg-rates-x', exchange.message_stats) %>
<% } %>

<div class="updatable">
<h3>Details</h3>
<table class="facts">
<tr>
Expand All @@ -23,7 +21,6 @@
<td><%= fmt_string(exchange.policy, '') %></td>
</tr>
</table>
</div>
</div>
</div>

Expand Down
55 changes: 22 additions & 33 deletions priv/www/js/tmpl/node.ejs
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
<h1>Node <b><%= node.name %></b></h1>
<div class="updatable">

<div class="section">
<h2>Overview</h2>
<div class="hider updatable">
<% if (!node.running) { %>
<p class="warning">Node not running</p>
<% } else if (node.os_pid == undefined) { %>
<p class="warning">Node statistics not available</p>
<% } else { %>
<div class="section">
<h2>Overview</h2>
<div class="hider">
<div class="box">
<table class="facts facts-l">
<tr>
Expand Down Expand Up @@ -55,20 +56,13 @@
</tr>
<% } %>
</table>
<% } %>
</div>
</div>
<div class="section">
<h2>Process statistics</h2>
<div class="hider">
<% if (!node.running) { %>
<p class="warning">Node not running</p>
<% } else if (node.os_pid == undefined) { %>
<p class="warning">Node statistics not available</p>
<% } else { %>
<%= node_stats_prefs() %>
<div class="updatable">
<table class="facts">
<tr>
<th>
Expand Down Expand Up @@ -131,20 +125,12 @@
</td>
</tr>
</table>
</div>
<% } %>
</div>
</div>
<div class="section-hidden">
<h2>Persistence statistics</h2>
<div class="hider">
<% if (!node.running) { %>
<p class="warning">Node not running</p>
<% } else if (node.os_pid == undefined) { %>
<p class="warning">Node statistics not available</p>
<% } else { %>
<%= rates_chart_or_text('mnesia-stats-count', node,
[['RAM only', 'mnesia_ram_tx_count'],
['Disk', 'mnesia_disk_tx_count']],
Expand All @@ -161,18 +147,11 @@
['QI Write', 'queue_index_write_count']],
fmt_rate, fmt_rate_axis, true, 'Persistence operations (bulk)', 'persister-operations-bulk') %>
</div>
<% } %>
</div>
</div>
<div class="section-hidden">
<h2>I/O statistics</h2>
<div class="hider">
<% if (!node.running) { %>
<p class="warning">Node not running</p>
<% } else if (node.os_pid == undefined) { %>
<p class="warning">Node statistics not available</p>
<% } else { %>
<%= rates_chart_or_text('persister-io-stats-count', node,
[['Read', 'io_read_count'],
['Write', 'io_write_count'],
Expand All @@ -192,10 +171,17 @@
['Seek', 'io_seek_avg_time'],
['Sync', 'io_sync_avg_time']],
fmt_ms, fmt_ms, false, 'I/O average time per operation') %>
<% } %>
</div>
</div>
<% } %>

</div>
<!--
The next two need to be non-updatable or we will wipe the memory details
as soon as we have drawn it.
-->

<% if (node.running && node.os_pid != undefined) { %>
<div class="section">
<h2>Memory details</h2>
Expand All @@ -217,14 +203,14 @@
</div>
</div>
<% } %>

<div class="updatable">
<% if (node.running && node.os_pid != undefined) { %>
<div class="section-hidden">
<h2>Advanced</h2>
<div class="hider updatable">
<% if (!node.running) { %>
<p class="warning">Node not running</p>
<% } else if (node.os_pid == undefined) { %>
<p class="warning">Node statistics not available</p>
<% } else { %>
<div class="hider">
<div class="box">
<h3>VM</h3>
<table class="facts">
Expand Down Expand Up @@ -278,6 +264,9 @@
<h3>Authentication mechanisms</h3>
<%= format('registry', {'list': node.auth_mechanisms, 'node': node, 'show_enabled': true} ) %>
<% } %>
</div>
</div>
<% } %>

</div>
4 changes: 1 addition & 3 deletions priv/www/js/tmpl/queue.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@

<div class="section">
<h2>Overview</h2>
<div class="hider">
<div class="hider updatable">
<%= queue_lengths('lengths-q', queue) %>
<% if (rates_mode != 'none') { %>
<%= message_rates('msg-rates-q', queue.message_stats) %>
<% } %>

<div class="updatable">
<h3>Details</h3>
<table class="facts facts-l">
<tr>
Expand Down Expand Up @@ -153,7 +152,6 @@
<td class="r"><%= fmt_bytes(queue.memory) %></td>
</tr>
</table>
</div>
</div>
</div>

Expand Down
4 changes: 1 addition & 3 deletions priv/www/js/tmpl/vhost.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,19 @@

<div class="section">
<h2>Overview</h2>
<div class="hider">
<div class="hider updatable">
<%= queue_lengths('lengths-vhost', vhost) %>
<% if (rates_mode != 'none') { %>
<%= message_rates('msg-rates-vhost', vhost.message_stats) %>
<% } %>
<%= data_rates('data-rates-vhost', vhost, 'Data rates') %>
<div class="updatable">
<h3>Details</h3>
<table class="facts">
<tr>
<th>Tracing enabled:</th>
<td><%= fmt_boolean(vhost.tracing) %></td>
</tr>
</table>
</div>
</div>
</div>

Expand Down

0 comments on commit 30ffe3b

Please sign in to comment.