cosmetic: spaces around |
This commit is contained in:
parent
7c0fb96ad3
commit
a7dafdf95a
|
|
@ -70,7 +70,7 @@ stop(_State) ->
|
|||
register_contexts() ->
|
||||
application:set_env(
|
||||
webmachine, dispatch_list,
|
||||
[{[?PREFIX|Path], F, A} ||
|
||||
[{[?PREFIX | Path], F, A} ||
|
||||
{Path, F, A} <- rabbit_mgmt_dispatcher:dispatcher()]),
|
||||
application:set_env(webmachine, error_handler, webmachine_error_handler),
|
||||
rabbit_mochiweb:register_static_context(?UI_PREFIX, ?MODULE, "priv/www",
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ pget(Key, List, Default) ->
|
|||
proplists:get_value(Key, List, Default).
|
||||
|
||||
pset(Key, Value, List) ->
|
||||
[{Key, Value}|proplists:delete(Key, List)].
|
||||
[{Key, Value} | proplists:delete(Key, List)].
|
||||
|
||||
id(Pid) when is_pid(Pid) -> rabbit_mgmt_format:pid(Pid);
|
||||
id(List) -> rabbit_mgmt_format:pid(pget(pid, List)).
|
||||
|
|
@ -321,7 +321,7 @@ handle_event(#event{type = connection_created, props = Stats}, State) ->
|
|||
[rabbit_mgmt_format:ip(pget(peer_address, Stats)),
|
||||
pget(peer_port, Stats)]),
|
||||
handle_created(
|
||||
connection_stats, [{name, Name}|Stats],
|
||||
connection_stats, [{name, Name} | Stats],
|
||||
[{fun rabbit_mgmt_format:ip/1, [address, peer_address]},
|
||||
{fun rabbit_mgmt_format:pid/1, [pid]},
|
||||
{fun rabbit_mgmt_format:protocol/1, [protocol]},
|
||||
|
|
@ -453,7 +453,7 @@ format_id({ChPid, QPid, #resource{name=XName, virtual_host=XVhost}}) ->
|
|||
|
||||
merge_fine_stats(Stats, []) ->
|
||||
Stats;
|
||||
merge_fine_stats(Stats, [Dict|Dicts]) ->
|
||||
merge_fine_stats(Stats, [Dict | Dicts]) ->
|
||||
merge_fine_stats([merge_fine_stats0(Props, Dict) || Props <- Stats], Dicts).
|
||||
|
||||
merge_fine_stats0(Props, Dict) ->
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ find_files_line([]) ->
|
|||
find_files_line([" File " ++ Rest | _T]) ->
|
||||
[Files] = string:tokens(Rest, ": "),
|
||||
list_to_integer(Files);
|
||||
find_files_line([_H|T]) ->
|
||||
find_files_line([_H | T]) ->
|
||||
find_files_line(T).
|
||||
|
||||
get_total_memory() ->
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ format(Stats, Fs) ->
|
|||
|
||||
format_item(Stat, []) ->
|
||||
[Stat];
|
||||
format_item({Name, Value}, [{Fun, Names}|Fs]) ->
|
||||
format_item({Name, Value}, [{Fun, Names} | Fs]) ->
|
||||
case lists:member(Name, Names) of
|
||||
true -> case Fun(Value) of
|
||||
List when is_list(List) -> List;
|
||||
|
|
@ -158,7 +158,7 @@ tokenise(Str) ->
|
|||
Count = string:cspan(Str, "_"),
|
||||
case length(Str) of
|
||||
Count -> [Str];
|
||||
_ -> [string:sub_string(Str, 1, Count)|
|
||||
_ -> [string:sub_string(Str, 1, Count) |
|
||||
tokenise(string:sub_string(Str, Count + 2))]
|
||||
end.
|
||||
|
||||
|
|
|
|||
|
|
@ -256,5 +256,5 @@ map_name(K, Props) ->
|
|||
|
||||
add_args_types(Props) ->
|
||||
Args = proplists:get_value(arguments, Props),
|
||||
[{arguments, rabbit_mgmt_util:args(Args)}|
|
||||
[{arguments, rabbit_mgmt_util:args(Args)} |
|
||||
proplists:delete(arguments, Props)].
|
||||
|
|
|
|||
Loading…
Reference in New Issue