Format stream management source files

This commit is contained in:
Arnaud Cogoluègnes 2022-02-02 11:30:06 +01:00
parent 2af24048b9
commit f8657e02ef
No known key found for this signature in database
GPG Key ID: D5C8C4DFAD43AFA8
8 changed files with 60 additions and 44 deletions

View File

@ -23,11 +23,12 @@
dispatcher() ->
case rabbit_stream_management_utils:is_feature_flag_enabled() of
true -> [{"/stream/connections/:vhost/:connection/consumers", ?MODULE, []}];
false -> []
true ->
[{"/stream/connections/:vhost/:connection/consumers", ?MODULE, []}];
false ->
[]
end.
web_ui() ->
[].

View File

@ -25,11 +25,12 @@
dispatcher() ->
case rabbit_stream_management_utils:is_feature_flag_enabled() of
true -> [{"/stream/connections/:vhost/:connection", ?MODULE, []}];
false -> []
true ->
[{"/stream/connections/:vhost/:connection", ?MODULE, []}];
false ->
[]
end.
web_ui() ->
[].

View File

@ -23,11 +23,13 @@
dispatcher() ->
case rabbit_stream_management_utils:is_feature_flag_enabled() of
true -> [{"/stream/connections/:vhost/:connection/publishers", ?MODULE, []}];
false -> []
true ->
[{"/stream/connections/:vhost/:connection/publishers", ?MODULE,
[]}];
false ->
[]
end.
web_ui() ->
[].

View File

@ -20,18 +20,24 @@
dispatcher() ->
case rabbit_stream_management_utils:is_feature_flag_enabled() of
true -> [{"/stream/connections", ?MODULE, []}];
false -> []
true ->
[{"/stream/connections", ?MODULE, []}];
false ->
[]
end.
web_ui() ->
case rabbit_stream_management_utils:is_feature_flag_enabled() of
true -> [{javascript, <<"stream.js">>}];
false -> rabbit_log:warning(
"Unable to show the stream management plugin. The stream_queue feature flag is disabled. "++
"Enable stream_queue feature flag then disable and re-enable the rabbitmq_stream_management plugin. ",
"See https://www.rabbitmq.com/feature-flags.html to learn more",
true ->
[{javascript, <<"stream.js">>}];
false ->
rabbit_log:warning("Unable to show the stream management plugin. "
"The stream_queue feature flag is disabled. "
++ "Enable stream_queue feature flag then disable "
"and re-enable the rabbitmq_stream_management "
"plugin. ",
"See https://www.rabbitmq.com/feature-flags.html "
"to learn more",
[]),
[]
end.

View File

@ -22,8 +22,10 @@
dispatcher() ->
case rabbit_stream_management_utils:is_feature_flag_enabled() of
true -> [{"/stream/connections/:vhost", ?MODULE, []}];
false -> []
true ->
[{"/stream/connections/:vhost", ?MODULE, []}];
false ->
[]
end.
web_ui() ->

View File

@ -22,9 +22,11 @@
dispatcher() ->
case rabbit_stream_management_utils:is_feature_flag_enabled() of
true -> [{"/stream/consumers", ?MODULE, []},
true ->
[{"/stream/consumers", ?MODULE, []},
{"/stream/consumers/:vhost", ?MODULE, []}];
false -> []
false ->
[]
end.
web_ui() ->

View File

@ -22,10 +22,12 @@
dispatcher() ->
case rabbit_stream_management_utils:is_feature_flag_enabled() of
true -> [{"/stream/publishers", ?MODULE, []},
true ->
[{"/stream/publishers", ?MODULE, []},
{"/stream/publishers/:vhost", ?MODULE, []},
{"/stream/publishers/:vhost/:queue", ?MODULE, []}];
false -> []
false ->
[]
end.
web_ui() ->