Show the bar as 800px of mem_used, not 800px of mem_limit.
This commit is contained in:
parent
838acf9734
commit
016f7bf1a0
|
|
@ -29,6 +29,7 @@ div.box, div.section, div.section-hidden { overflow: auto; width: 100%; }
|
|||
|
||||
.left { float: left; }
|
||||
.right { float: right; }
|
||||
.clear { clear: both; }
|
||||
|
||||
.help { color: #888; cursor: pointer; }
|
||||
.help:hover { color: #444; }
|
||||
|
|
@ -54,9 +55,8 @@ table.list tr.total th { border: none; border-top: 1px solid #bbb; text-align: r
|
|||
|
||||
div.section table.list, div.section-hidden table.list { margin-bottom: 0; }
|
||||
|
||||
div.memory-bar { margin: 10px 0 5px 0; border-radius: 5px; border: 1px solid #ddd;}
|
||||
div.memory-total { text-align: center; float: left; margin: 0 0 10px 0; border-top: 1px solid #ddd;}
|
||||
div.memory-hwm { text-align: right; float: right; margin: 0 0 10px 0; }
|
||||
div.memory-bar { margin: 10px 0 5px 0; border-radius: 5px; border: 1px solid #ddd; float: left; }
|
||||
div.memory-total { text-align: right; margin: 0 0 10px 0; }
|
||||
div.memory-section { float: left; height: 30px; }
|
||||
div.memory-key { float: left; width: 10px; height: 10px; margin: 3px 5px 0 0;}
|
||||
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@
|
|||
<% } else {
|
||||
var width = 800;
|
||||
%>
|
||||
<div class="memory-bar box" style="width: <%= width %>px;">
|
||||
<div class="memory-bar">
|
||||
<%
|
||||
var sections = {'connection_procs': 'Connections',
|
||||
'queue_procs': 'Queues',
|
||||
|
|
@ -143,23 +143,18 @@
|
|||
'other_system': 'Other system'};
|
||||
var total = 0;
|
||||
for (var section in sections) {
|
||||
var section_width = Math.round(width * node.memory[section] / node.mem_limit);
|
||||
var section_width = Math.round(width * node.memory[section] / node.mem_used);
|
||||
total += section_width;
|
||||
%>
|
||||
<div class="memory-section memory_<%= section %>"
|
||||
style="width: <%= section_width %>px;"
|
||||
title="<%= sections[section] %>">
|
||||
title="<%= sections[section] %> <%= fmt_bytes(node.memory[section]) %>">
|
||||
</div>
|
||||
<% } %>
|
||||
</div>
|
||||
<div class="box" style="width: <%= width %>px;">
|
||||
<div class="memory-total"
|
||||
style="width: <%= total + 1 %>px;">
|
||||
<%= fmt_bytes(node.mem_used) %> used
|
||||
</div>
|
||||
<div class="memory-hwm">
|
||||
<%= fmt_bytes(node.mem_limit) %> high watermark
|
||||
</div>
|
||||
<span class="clear"></span>
|
||||
<div class="memory-total" style="width: <%= width %>px;">
|
||||
<%= fmt_bytes(node.mem_used) %> used
|
||||
</div>
|
||||
|
||||
<div class="box">
|
||||
|
|
|
|||
Loading…
Reference in New Issue