|
15 | 15 |
|
16 | 16 | -module('Elixir.RabbitMQ.CLI.Ctl.Commands.ListStompConnectionsCommand').
|
17 | 17 |
|
18 |
| --behaviour('Elixir.RabbitMQ.CLI.CommandBehaviour'). |
19 | 18 | -include("rabbit_stomp.hrl").
|
20 | 19 |
|
21 |
| --export([formatter/0, scopes/0, switches/0, aliases/0, |
22 |
| - usage/0, usage_additional/0, banner/2, |
23 |
| - validate/2, merge_defaults/2, run/2, output/2, description/0, |
| 20 | +-behaviour('Elixir.RabbitMQ.CLI.CommandBehaviour'). |
| 21 | + |
| 22 | +-export([formatter/0, |
| 23 | + scopes/0, |
| 24 | + switches/0, |
| 25 | + aliases/0, |
| 26 | + usage/0, |
| 27 | + usage_additional/0, |
| 28 | + usage_doc_guides/0, |
| 29 | + banner/2, |
| 30 | + validate/2, |
| 31 | + merge_defaults/2, |
| 32 | + run/2, |
| 33 | + output/2, |
| 34 | + description/0, |
24 | 35 | help_section/0]).
|
25 | 36 |
|
26 | 37 | formatter() -> 'Elixir.RabbitMQ.CLI.Formatters.Table'.
|
@@ -48,16 +59,21 @@ merge_defaults(Args, Opts) ->
|
48 | 59 | {Args, maps:merge(#{verbose => false}, Opts)}.
|
49 | 60 |
|
50 | 61 | usage() ->
|
51 |
| - <<"list_stomp_connections [<stomp_connectioninfoitem> ...]">>. |
| 62 | + <<"list_stomp_connections [<column> ...]">>. |
52 | 63 |
|
53 | 64 | usage_additional() ->
|
54 |
| - <<"<stomp_connectioninfoitem> must be a member of the list [", |
55 |
| - ('Elixir.Enum':join(?INFO_ITEMS, <<", ">>))/binary, |
56 |
| - "].">>. |
| 65 | + Prefix = <<" must be one of ">>, |
| 66 | + InfoItems = 'Elixir.Enum':join(lists:usort(?INFO_ITEMS), <<", ">>), |
| 67 | + [ |
| 68 | + {<<"<column>">>, <<Prefix/binary, InfoItems/binary>>} |
| 69 | + ]. |
| 70 | + |
| 71 | +usage_doc_guides() -> |
| 72 | + [?STOMP_GUIDE_URL]. |
57 | 73 |
|
58 | 74 | run(Args, #{node := NodeName,
|
59 |
| - timeout := Timeout, |
60 |
| - verbose := Verbose}) -> |
| 75 | + timeout := Timeout, |
| 76 | + verbose := Verbose}) -> |
61 | 77 | InfoKeys = case Verbose of
|
62 | 78 | true -> ?INFO_ITEMS;
|
63 | 79 | false -> 'Elixir.RabbitMQ.CLI.Ctl.InfoKeys':prepare_info_keys(Args)
|
|
0 commit comments