Skip to content

Commit 95ea150

Browse files
committed
Add number of cores used by RabbitMQ nodes to the management overview.
Also remove the deprectated node type field from the UI to reclaim some screen estate. RAM nodes are deprecated and almost never used.
1 parent ebbff46 commit 95ea150

File tree

4 files changed

+17
-15
lines changed

4 files changed

+17
-15
lines changed

deps/rabbitmq_management/priv/www/api/index.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2068,6 +2068,12 @@ <h2>/api/nodes</h2>
20682068
Time since the Erlang VM started, in milliseconds.
20692069
</td>
20702070
</tr>
2071+
<tr>
2072+
<td><code>processors</code></td>
2073+
<td>
2074+
Number of logical CPU cores used by RabbitMQ.
2075+
</td>
2076+
</tr>
20712077
</table>
20722078

20732079
<h2>/api/nodes/(name)</h2>

deps/rabbitmq_management/priv/www/js/global.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ var ALL_COLUMNS =
141141
['memory', 'Memory', true],
142142
['disk_space', 'Disk space', true]],
143143
'General': [['uptime', 'Uptime', true],
144+
['cores', 'Cores', true],
144145
['info', 'Info', true],
145146
['reset_stats', 'Reset stats', true]]}};
146147

deps/rabbitmq_management/priv/www/js/tmpl/node.ejs

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,16 @@
2323
<th>Uptime</th>
2424
<td><%= fmt_uptime(node.uptime) %></td>
2525
</tr>
26+
<tr>
27+
<th>Cores</th>
28+
<td><%= fmt_string(node.processors) %></td>
29+
</tr>
2630
<% if (rabbit_versions_interesting) { %>
2731
<tr>
2832
<th>RabbitMQ Version</th>
2933
<td><%= fmt_rabbit_version(node.applications) %></td>
3034
</tr>
3135
<% } %>
32-
<tr>
33-
<th>Type</th>
34-
<td>
35-
<% if (node.type == 'disc') { %>
36-
<abbr title="Broker definitions are held on disc.">Disc</abbr>
37-
<% } else { %>
38-
<abbr title="Broker definitions are held in RAM. Messages will still be written to disc if necessary.">RAM</abbr>
39-
<% } %>
40-
</td>
41-
</tr>
4236
<tr>
4337
<th>
4438
<a href="https://www.rabbitmq.com/configure.html" target="_blank">Config file</a>

deps/rabbitmq_management/priv/www/js/tmpl/overview.ejs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@
9999
<% if (show_column('overview', 'uptime')) { %>
100100
<th>Uptime</th>
101101
<% } %>
102+
<% if (show_column('overview', 'cores')) { %>
103+
<th>Cores</th>
104+
<% } %>
102105
<% if (show_column('overview', 'info')) { %>
103106
<th>Info</th>
104107
<% } %>
@@ -188,17 +191,15 @@
188191
<% if (show_column('overview', 'uptime')) { %>
189192
<td><span><%= fmt_uptime(node.uptime) %></span></td>
190193
<% } %>
194+
<% if (show_column('overview', 'cores')) { %>
195+
<td><span><%= fmt_string(node.processors) %></span></td>
196+
<% } %>
191197
<% if (show_column('overview', 'info')) { %>
192198
<td>
193199
<% if (node.being_drained) { %>
194200
<abbr class="status-yellow" title="Node was put under maintenance">maintenance mode</abbr>
195201
<% } %>
196202
<abbr title="Message rates"><%= fmt_string(node.rates_mode) %></abbr>
197-
<% if (node.type == 'disc') { %>
198-
<abbr title="Broker definitions are held on disc.">disc</abbr>
199-
<% } else { %>
200-
<abbr title="Broker definitions are held in RAM. Messages will still be written to disc if necessary.">RAM</abbr>
201-
<% } %>
202203
<%= fmt_plugins_small(node) %>
203204
<abbr title="Memory calculation strategy"><%= fmt_string(node.mem_calculation_strategy) %></abbr>
204205
</td>

0 commit comments

Comments
 (0)