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="hider">
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<table class="facts facts-l">
|
<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>
|
<tr>
|
||||||
<th>Uptime</th>
|
<th>Uptime</th>
|
||||||
<td><%= fmt_uptime(node.uptime) %></td>
|
<td><%= fmt_uptime(node.uptime) %></td>
|
||||||
|
|
|
||||||
|
|
@ -190,6 +190,9 @@
|
||||||
<% } %>
|
<% } %>
|
||||||
<% if (show_column('overview', 'info')) { %>
|
<% if (show_column('overview', 'info')) { %>
|
||||||
<td>
|
<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>
|
<abbr title="Message rates"><%= fmt_string(node.rates_mode) %></abbr>
|
||||||
<% if (node.type == 'disc') { %>
|
<% if (node.type == 'disc') { %>
|
||||||
<abbr title="Broker definitions are held on disc.">disc</abbr>
|
<abbr title="Broker definitions are held on disc.">disc</abbr>
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ node_data(Node, ReqData) ->
|
||||||
Nodes = proplists:get_value(nodes, S),
|
Nodes = proplists:get_value(nodes, S),
|
||||||
Running = proplists:get_value(running_nodes, S),
|
Running = proplists:get_value(running_nodes, S),
|
||||||
Type = find_type(Node, Nodes),
|
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
|
case rabbit_mgmt_util:disable_stats(ReqData) of
|
||||||
false ->
|
false ->
|
||||||
rabbit_mgmt_db:augment_nodes(Basic, rabbit_mgmt_util:range_ceil(ReqData));
|
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),
|
Nodes = proplists:get_value(nodes, S),
|
||||||
Types = proplists:get_keys(Nodes),
|
Types = proplists:get_keys(Nodes),
|
||||||
Running = proplists:get_value(running_nodes, S),
|
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)].
|
Type <- Types, Node <- proplists:get_value(Type, Nodes)].
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue