From 85e550ed7124d9aa9508dd89ab914074578096e1 Mon Sep 17 00:00:00 2001 From: Edwin Fine Date: Sun, 7 Jan 2018 14:23:16 -0500 Subject: [PATCH] Fix ecallmgr_maintenance sbc_acls alignment (#4457) --- applications/ecallmgr/src/ecallmgr_maintenance.erl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/applications/ecallmgr/src/ecallmgr_maintenance.erl b/applications/ecallmgr/src/ecallmgr_maintenance.erl index 2a46f8a7240..51f251e1a5f 100644 --- a/applications/ecallmgr/src/ecallmgr_maintenance.erl +++ b/applications/ecallmgr/src/ecallmgr_maintenance.erl @@ -610,10 +610,12 @@ remove_acl(Name, ACLs, ConfigFun) -> -spec list_acls(kz_json:object(), api_binary()) -> 'no_return'. list_acls(ACLs, Network) -> - io:format("+--------------------------------+-------------------+---------------+-------+------------------+----------------------------------+~n", []), + ThinBar = "+--------------------------------+--------------------+---------------+-------+------------------+----------------------------------+\n", + ThickBar = "+================================+====================+===============+=======+==================+==================================+\n", + io:put_chars(ThinBar), FormatString = "| ~-30s | ~-18s | ~-13s | ~-5s | ~-16s | ~-32s |~n", io:format(FormatString, [<<"Name">>, <<"CIDR">>, <<"List">>, <<"Type">>, <<"Authorizing Type">>, <<"ID">>]), - io:format("+================================+===================+===============+=======+==================+==================================+~n", []), + io:put_chars(ThickBar), Props = kz_json:foldl(fun(Name, ACL, Acc) -> [{kz_json:get_value(<<"network-list-name">>, ACL) ,kz_json:set_value(<<"name">>, Name, ACL)} @@ -623,7 +625,7 @@ list_acls(ACLs, Network) -> _ = [maybe_print_acl(Network, FormatString, ACL) || {_, ACL} <- lists:sort(fun list_acls_sort/2, Props) ], - io:format("+--------------------------------+-------------------+---------------+-------+------------------+----------------------------------+~n", []), + io:put_chars(ThinBar), 'no_return'. list_acls_sort({Network1, _}, {Network2, _}) ->