Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions deps/rabbitmq_shovel_management/priv/www/js/shovel.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,19 @@ HELP['shovel-amqp10-auto-delete'] =
<dt><code>After num messages</code></dt>\
<dd>The shovel will delete itself after the given number of messages have been transferred.</dd>\
</dl>';

HELP['shovel-remaining-counter'] =
'When not <code>unlimited</code>: number of messages left to transfer before this shovel will be deleted.';

HELP['shovel-remaining-unacked-counter'] =
'When ack mode is <code>on-confirm</code> and Remaining is not <code>unlimited</code>: number of messages not yet acknowledged at the source.';

HELP['shovel-pending-counter'] =
'When destination connection is blocked or doesn\'t have enough credits: number of messages that were cached.';

HELP['shovel-forwarded-counter'] =
'Number of forwarded messages.';

function remove_params_with(sammy, prefix) {
for (var i in sammy.params) {
if(i.startsWith(prefix)) {
Expand Down
10 changes: 9 additions & 1 deletion deps/rabbitmq_shovel_management/priv/www/js/tmpl/shovels.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
<th>Virtual Host</th>
<% } %>
<th>State</th>
<th>Remaining <span class="help" id="shovel-remaining-counter"></span></th>
<th>Remaining Unacked <span class="help" id="shovel-remaining-unacked-counter"></span></th>
<th>Pending <span class="help" id="shovel-pending-counter"></span></th>
<th>Forwarded <span class="help" id="shovel-forwarded-counter"></span></th>
<th colspan="3">Source</th>
<th colspan="3">Destination</th>
<th>Last changed</th>
Expand Down Expand Up @@ -46,7 +50,11 @@
</td>
<td><%= shovel.timestamp %></td>
<% } else { %>
<td><%= fmt_object_state(shovel) %></td>
<td><%= fmt_object_state(shovel) %></td>
<td><%= fmt_string(shovel.remaining) %></td>
<td><%= fmt_string(shovel.remaining_unacked) %></td>
<td><%= fmt_string(shovel.pending) %></td>
<td><%= fmt_string(shovel.forwarded) %></td>
<td><%= fmt_string(shovel.src_protocol) %></td>
<td><%= shovel.src_uri == undefined ? fmt_string(shovel.src_uri) : fmt_string(fmt_uri_with_credentials(shovel.src_uri)) %></td>
<td><%= fmt_shovel_endpoint('src_', shovel) %></td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ status(Node) ->
[format(Node, I) || I <- Status]
end.

format(Node, {Name, Type, Info, _Metrics, TS}) ->
format(Node, {Name, Type, Info, Metrics, TS}) ->
[{node, Node}, {timestamp, format_ts(TS)}] ++
format_name(Type, Name) ++
format_metrics(Metrics) ++
format_info(Info);
format(Node, {Name, Type, Info, TS}) ->
[{node, Node}, {timestamp, format_ts(TS)}] ++
Expand All @@ -57,6 +58,11 @@ format_name(dynamic, {VHost, Name}) -> [{name, Name},
{vhost, VHost},
{type, dynamic}].

format_metrics(undefined) ->
[];
format_metrics(Metrics) when is_map(Metrics) ->
maps:to_list(Metrics).

format_info(starting) ->
[{state, starting}];

Expand Down
Loading