Skip to content

Commit e3e8554

Browse files
michaelklishinmergify[bot]
authored andcommitted
GET /api/overview: format cluster and node tag lists as maps
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)
1 parent 9b1f6cc commit e3e8554

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

deps/rabbitmq_management/src/rabbit_mgmt_wm_overview.erl

+5-3
Original file line numberDiff line numberDiff line change
@@ -185,11 +185,13 @@ transform_retention_intervals([{MaxAgeInSeconds, _}|Rest], Acc) ->
185185
transform_retention_intervals(Rest, [AccVal|Acc]).
186186

187187
cluster_tags() ->
188-
case rabbit_runtime_parameters:value_global(cluster_tags) of
188+
Val = case rabbit_runtime_parameters:value_global(cluster_tags) of
189189
not_found ->
190190
[];
191191
Tags -> Tags
192-
end.
192+
end,
193+
rabbit_data_coercion:to_map(Val).
193194

194195
node_tags() ->
195-
application:get_env(rabbit, node_tags, []).
196+
Val = application:get_env(rabbit, node_tags, []),
197+
rabbit_data_coercion:to_map(Val).

0 commit comments

Comments
 (0)