Format stream management source files
This commit is contained in:
		
							parent
							
								
									2af24048b9
								
							
						
					
					
						commit
						f8657e02ef
					
				| 
						 | 
				
			
			@ -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() ->
 | 
			
		||||
    [].
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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() ->
 | 
			
		||||
    [].
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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() ->
 | 
			
		||||
    [].
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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() ->
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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() ->
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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() ->
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue