Show nodes in maintenance mode in UI
This commit is contained in:
parent
b959a92cfa
commit
782830f4bd
|
|
@ -13,6 +13,12 @@
|
|||
<div class="hider">
|
||||
<div class="box">
|
||||
<table class="facts facts-l">
|
||||
<% if (node.drained) { %>
|
||||
<tr>
|
||||
<th>Status</th>
|
||||
<td><abbr class="status-yellow" title="Broker is in maintenance mode.">In maintenance mode</abbr></td>
|
||||
</tr>
|
||||
<% } %>
|
||||
<tr>
|
||||
<th>Uptime</th>
|
||||
<td><%= fmt_uptime(node.uptime) %></td>
|
||||
|
|
|
|||
|
|
@ -190,6 +190,9 @@
|
|||
<% } %>
|
||||
<% if (show_column('overview', 'info')) { %>
|
||||
<td>
|
||||
<% if (node.drained) { %>
|
||||
<abbr class="status-yellow" title="Broker in maintenance mode">maint.mode</abbr>
|
||||
<% } %>
|
||||
<abbr title="Message rates"><%= fmt_string(node.rates_mode) %></abbr>
|
||||
<% if (node.type == 'disc') { %>
|
||||
<abbr title="Broker definitions are held on disc.">disc</abbr>
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ node_data(Node, ReqData) ->
|
|||
Nodes = proplists:get_value(nodes, S),
|
||||
Running = proplists:get_value(running_nodes, S),
|
||||
Type = find_type(Node, Nodes),
|
||||
Basic = [[{name, Node}, {running, lists:member(Node, Running)}, {type, Type}]],
|
||||
Basic = [[{name, Node}, {running, lists:member(Node, Running)}, {type, Type}, {drained, rabbit_maintenance:is_being_drained_local_read(Node)}]],
|
||||
case rabbit_mgmt_util:disable_stats(ReqData) of
|
||||
false ->
|
||||
rabbit_mgmt_db:augment_nodes(Basic, rabbit_mgmt_util:range_ceil(ReqData));
|
||||
|
|
|
|||
|
|
@ -51,5 +51,5 @@ all_nodes_raw() ->
|
|||
Nodes = proplists:get_value(nodes, S),
|
||||
Types = proplists:get_keys(Nodes),
|
||||
Running = proplists:get_value(running_nodes, S),
|
||||
[[{name, Node}, {type, Type}, {running, lists:member(Node, Running)}] ||
|
||||
[[{name, Node}, {type, Type}, {running, lists:member(Node, Running)}, {drained, rabbit_maintenance:is_being_drained_local_read(Node)}] ||
|
||||
Type <- Types, Node <- proplists:get_value(Type, Nodes)].
|
||||
|
|
|
|||
Loading…
Reference in New Issue