summaryrefslogtreecommitdiff
path: root/deps/rabbitmq_management/priv/www/js/tmpl/binary.ejs
blob: e19921e12d95cb2ccd92ed68d8f3c9604261cdaf (plain)
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
<%
  if (binary == "not_available") {
%>
<p class="warning">
  Binary statistics not available.
</p>
<% } else { %>
<%
  var sections = {'queue_procs'         : ['queue',  'Classic queues (masters)'],
                  'queue_slave_procs'   : ['queue',  'Classic queues (mirrors)'],
                  'quorum_queue_procs'  : ['queue',  'Quorum queues'],
                  'stream_queue_procs'          : ['queue',  'Stream queues'],
                  'stream_queue_replica_reader_procs'  : ['queue',  'Stream queues (replica reader)'],
                  'stream_queue_coordinator_procs'  : ['queue',  'Stream queues (coordinator)'],
                  'connection_readers'  : ['conn',   'Connection readers'],
                  'connection_writers'  : ['conn',   'Connection writers'],
                  'connection_channels' : ['conn',   'Connection channels'],
                  'connection_other'    : ['conn',   'Connections (other)'],
                  'msg_index'           : ['table',  'Message store index'],
                  'mgmt_db'             : ['table',  'Management database'],
                  'plugins'             : ['proc',   'Plugins'],
                  'other'               : ['system', 'Other binary references']};
   var total_out = [];
%>
<%= format('memory-bar', {sections: sections, memory: binary, total_out: total_out}) %>
<span class="clear">&nbsp;</span>
<div class="box">
<%
var key = [[{name: 'Queues', colour: 'queue',
             keys: [['queue_procs',         'queues'],
                    ['queue_slave_procs',   'mirrors'],
                    ['quorum_queue_procs',  'quorum'],
                    ['stream_queue_procs',          'stream'],
                    ['stream_queue_replica_reader_procs',  'stream replica reader'],
                    ['stream_queue_coordinator_procs',  'stream coordinator']]}],

           [{name: 'Connections', colour: 'conn',
             keys: [['connection_readers',  'readers'],
                    ['connection_writers',  'writers'],
                    ['connection_channels', 'channels'],
                    ['connection_other',    'other']]}],

           [{name: 'Tables', colour: 'table',
             keys: [['msg_index',           'message store index'],
                    ['mgmt_db',             'management database']]}],

           [{name: 'Processes', colour: 'proc',
             keys: [['plugins',             'plugins']]},
            {name: 'System', colour: 'system',
             keys: [['other',               'other']]}]];
%>
<%= format('memory-table', {key: key, memory: binary}) %>
</div>

<div class="memory-info">
  Last updated: <b><%= fmt_date(new Date()) %></b>.<br/>
  Total referenced binaries at last update: <b><%= fmt_bytes(total_out[0]) %></b>
  <span class="help" id="binary-use"></span>
</div>

<% } %>