Skip to content

Commit 082456a

Browse files
gomoripetimergify[bot]
authored andcommitted
Show consumer count column on Mgmt UI Channels page
Consumer count is already returned by the /channels API endpoint. Now the consumer count column can be shown in the channels table but it is hidden by default. (cherry picked from commit b62e098) (cherry picked from commit 31b9ecb)
1 parent 94576a0 commit 082456a

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ var ALL_COLUMNS =
9696
['mode', 'Mode', true],
9797
['state', 'State', true]],
9898
'Details': [['msgs-unconfirmed', 'Unconfirmed', true],
99+
['consumer-count', 'Consumer count', false],
99100
['prefetch', 'Prefetch', true],
100101
['msgs-unacked', 'Unacked', true]],
101102
'Transactions': [['msgs-uncommitted', 'Msgs uncommitted', false],

deps/rabbitmq_management/priv/www/js/tmpl/channels-list.ejs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@
3535
<% if (show_column('channels', 'msgs-unconfirmed')) { %>
3636
<th><%= fmt_sort('Unconfirmed', 'messages_unconfirmed') %></th>
3737
<% } %>
38+
<% if (show_column('channels', 'consumer-count')) { %>
39+
<th><%= fmt_sort('Consumer count', 'consumer_count') %></th>
40+
<% } %>
3841
<% if (show_column('channels', 'prefetch')) { %>
3942
<th>Prefetch <span class="help" id="channel-prefetch"></span></th>
4043
<% } %>
@@ -85,6 +88,9 @@
8588
<% if (show_column('channels', 'msgs-unconfirmed')) { %>
8689
<th>Unconfirmed</th>
8790
<% } %>
91+
<% if (show_column('channels', 'consumer-count')) { %>
92+
<th>Consumer count</th>
93+
<% } %>
8894
<% if (show_column('channels', 'prefetch')) { %>
8995
<th>Prefetch <span class="help" id="channel-prefetch"></span></th>
9096
<% } %>
@@ -152,6 +158,9 @@
152158
<% if (show_column('channels', 'msgs-unconfirmed')) { %>
153159
<td class="c"><%= channel.messages_unconfirmed %></td>
154160
<% } %>
161+
<% if (show_column('channels', 'consumer-count')) { %>
162+
<td class="c"><%= channel.consumer_count %></td>
163+
<% } %>
155164
<% if (show_column('channels', 'prefetch')) { %>
156165
<td class="c">
157166
<% if (channel.prefetch_count != 0) { %>

0 commit comments

Comments
 (0)