Skip to content

Commit fc12ac8

Browse files
Merge pull request #12069 from rabbitmq/mergify/bp/v4.0.x/pr-12035
Management: Add segment count to stream queue page (backport #12035)
2 parents 4b6345c + f80eaea commit fc12ac8

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,9 @@ var HELP = {
253253
'queue-messages':
254254
'<p>Message counts.</p><p>Note that "in memory" and "persistent" are not mutually exclusive; persistent messages can be in memory as well as on disc, and transient messages can be paged out if memory is tight. Non-durable queues will consider all messages to be transient.</p>',
255255

256+
'queue-messages-stream':
257+
'<p>Approximate message counts.</p><p>Note that streams store some entries that are not user messages such as offset tracking data which is included in this count. Thus this value will never be completely correct.</p>',
258+
256259
'queue-dead-lettered':
257260
'Applies to messages dead-lettered with dead-letter-strategy <code>at-least-once</code>.',
258261

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,15 +121,21 @@
121121
<th>Readers</th>
122122
<td><%= fmt_table_short(queue.readers) %></td>
123123
</tr>
124+
<tr>
125+
<th>Segments</th>
126+
<td><%= fmt_string(queue.segments) %></td>
127+
</tr>
124128
<% } %>
125129
</table>
126130
127131
<table class="facts">
128132
<tr>
129133
<td></td>
130134
<th class="horizontal">Total</th>
135+
<% if (!is_stream(queue)) { %>
131136
<th class="horizontal">Ready</th>
132137
<th class="horizontal">Unacked</th>
138+
<% } %>
133139
<% if (is_quorum(queue)) { %>
134140
<th class="horizontal">High priority</th>
135141
<th class="horizontal">Normal priority</th>
@@ -147,17 +153,23 @@
147153
<tr>
148154
<th>
149155
Messages
156+
<% if (is_stream(queue)) { %>
157+
<span class="help" id="queue-messages-stream"></span>
158+
<% } else { %>
150159
<span class="help" id="queue-messages"></span>
160+
<% } %>
151161
</th>
152162
<td class="r">
153163
<%= fmt_num_thousands(queue.messages) %>
154164
</td>
165+
<% if (!is_stream(queue)) { %>
155166
<td class="r">
156167
<%= fmt_num_thousands(queue.messages_ready) %>
157168
</td>
158169
<td class="r">
159170
<%= fmt_num_thousands(queue.messages_unacknowledged) %>
160171
</td>
172+
<% } %>
161173
<% if (is_quorum(queue)) { %>
162174
<td class="r">
163175
<%= fmt_num_thousands(queue.messages_ready_high) %>

0 commit comments

Comments
 (0)