Skip to content

Commit

Permalink
GET /api/overview: format cluster and node tag lists as maps
Browse files Browse the repository at this point in the history
Empty proplists will be serialized to JSON as arrays,
which they arguably are, and HTTP API clients
expect a regardless of collection size.

References #12552 #12699

(cherry picked from commit 5c3ccc4)
  • Loading branch information
michaelklishin authored and mergify[bot] committed Nov 25, 2024
1 parent 9b1f6cc commit e3e8554
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions deps/rabbitmq_management/src/rabbit_mgmt_wm_overview.erl
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,13 @@ transform_retention_intervals([{MaxAgeInSeconds, _}|Rest], Acc) ->
transform_retention_intervals(Rest, [AccVal|Acc]).

cluster_tags() ->
case rabbit_runtime_parameters:value_global(cluster_tags) of
Val = case rabbit_runtime_parameters:value_global(cluster_tags) of
not_found ->
[];
Tags -> Tags
end.
end,
rabbit_data_coercion:to_map(Val).

node_tags() ->
application:get_env(rabbit, node_tags, []).
Val = application:get_env(rabbit, node_tags, []),
rabbit_data_coercion:to_map(Val).

0 comments on commit e3e8554

Please sign in to comment.