25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00

Add Vim folding

SVN Revision: 2335
This commit is contained in:
Badlop 2009-06-23 21:13:04 +00:00
parent b9cbb7a72b
commit 6ac4157fc1

View File

@ -24,6 +24,8 @@
%%% %%%
%%%---------------------------------------------------------------------- %%%----------------------------------------------------------------------
%%%% definitions
-module(ejabberd_web_admin). -module(ejabberd_web_admin).
-author('alexey@process-one.net'). -author('alexey@process-one.net').
@ -45,6 +47,9 @@
?XMLATTR('name', Name), ?XMLATTR('name', Name),
?XMLATTR('value', Value)])). ?XMLATTR('value', Value)])).
%%%==================================
%%%% process/2
process(["doc", LocalFile], _Request) -> process(["doc", LocalFile], _Request) ->
DocPath = case os:getenv("EJABBERD_DOC_PATH") of DocPath = case os:getenv("EJABBERD_DOC_PATH") of
P when is_list(P) -> P; P when is_list(P) -> P;
@ -152,6 +157,9 @@ get_auth_account(Host, User, Server, Pass) ->
end end
end. end.
%%%==================================
%%%% make_xhtml
make_xhtml(Els, Host, Lang) -> make_xhtml(Els, Host, Lang) ->
make_xhtml(Els, Host, cluster, Lang). make_xhtml(Els, Host, cluster, Lang).
@ -217,6 +225,9 @@ get_base_path(Host, cluster) -> "/admin/server/" ++ Host ++ "/";
get_base_path(global, Node) -> "/admin/node/" ++ atom_to_list(Node) ++ "/"; get_base_path(global, Node) -> "/admin/node/" ++ atom_to_list(Node) ++ "/";
get_base_path(Host, Node) -> "/admin/server/" ++ Host ++ "/node/" ++ atom_to_list(Node) ++ "/". get_base_path(Host, Node) -> "/admin/server/" ++ Host ++ "/node/" ++ atom_to_list(Node) ++ "/".
%%%==================================
%%%% css & images
additions_js() -> additions_js() ->
" "
function selectAll() { function selectAll() {
@ -645,6 +656,8 @@ logo_fill() ->
"AEFJREFUCNdlw0sRwCAQBUE+gSRHLGABC1jAAhbWAhZwC+88XdXOXb4UlFAr" "AEFJREFUCNdlw0sRwCAQBUE+gSRHLGABC1jAAhbWAhZwC+88XdXOXb4UlFAr"
"SmwN5ekdJY2BkudEec1QvrVQ/r3xOlK9HsTvertmAAAAAElFTkSuQmCC"). "SmwN5ekdJY2BkudEec1QvrVQ/r3xOlK9HsTvertmAAAAAElFTkSuQmCC").
%%%==================================
%%%% process_admin
process_admin(global, process_admin(global,
#request{path = [], #request{path = [],
@ -1024,6 +1037,9 @@ process_admin(Host,
make_xhtml(Res, Host, Node, Lang) make_xhtml(Res, Host, Node, Lang)
end; end;
%%%==================================
%%%% process_admin default case
process_admin(Host, #request{lang = Lang} = Request) -> process_admin(Host, #request{lang = Lang} = Request) ->
{Hook, Opts} = case Host of {Hook, Opts} = case Host of
global -> {webadmin_page_main, [Request]}; global -> {webadmin_page_main, [Request]};
@ -1034,7 +1050,8 @@ process_admin(Host, #request{lang = Lang} = Request) ->
Res -> make_xhtml(Res, Host, Lang) Res -> make_xhtml(Res, Host, Lang)
end. end.
%%%==================================
%%%% acl
acls_to_xhtml(ACLs) -> acls_to_xhtml(ACLs) ->
?XAE('table', [], ?XAE('table', [],
@ -1330,6 +1347,8 @@ parse_access_rule(Text) ->
{ok, Rs} {ok, Rs}
end. end.
%%%==================================
%%%% list_vhosts
list_vhosts(Lang) -> list_vhosts(Lang) ->
Hosts = ?MYHOSTS, Hosts = ?MYHOSTS,
@ -1356,6 +1375,8 @@ list_vhosts(Lang) ->
end, SHosts) end, SHosts)
)])]. )])].
%%%==================================
%%%% list_users
list_users(Host, Query, Lang, URLFunc) -> list_users(Host, Query, Lang, URLFunc) ->
Res = list_users_parse_query(Query, Host), Res = list_users_parse_query(Query, Host),
@ -1503,6 +1524,8 @@ us_to_list({User, Server}) ->
su_to_list({Server, User}) -> su_to_list({Server, User}) ->
exmpp_jid:to_list(User, Server, undefined). exmpp_jid:to_list(User, Server, undefined).
%%%==================================
%%%% get_stats
get_stats(global, Lang) -> get_stats(global, Lang) ->
OnlineUsers = mnesia:table_info(session, size), OnlineUsers = mnesia:table_info(session, size),
@ -1705,6 +1728,8 @@ histogram([], _Integral, _Current, Count, Hist) ->
lists:reverse(Hist) lists:reverse(Hist)
end. end.
%%%==================================
%%%% get_nodes
get_nodes(Lang) -> get_nodes(Lang) ->
RunningNodes = mnesia:system_info(running_db_nodes), RunningNodes = mnesia:system_info(running_db_nodes),
@ -2063,7 +2088,8 @@ get_node(Host, Node, NPath, Query, Lang) ->
Res -> Res Res -> Res
end. end.
%%%==================================
%%%% node parse
node_parse_query(Node, Query) -> node_parse_query(Node, Query) ->
case lists:keysearch("restart", 1, Query) of case lists:keysearch("restart", 1, Query) of
@ -2420,10 +2446,8 @@ pretty_string_int(String) when is_list(String) ->
lists:reverse(String)), lists:reverse(String)),
Result. Result.
%%%==================================
%%% %%%% navigation menu
%%% Navigation Menu
%%%
%% @spec (Host, Node, Lang) -> [LI] %% @spec (Host, Node, Lang) -> [LI]
make_navigation(Host, Node, Lang) -> make_navigation(Host, Node, Lang) ->
@ -2550,3 +2574,7 @@ make_menu_item(item, 2, URI, Name, Lang) ->
?LI([?XAE('div', [?XMLATTR('id', <<"navitemsub">>)], [?ACT(URI, Name)] )]); ?LI([?XAE('div', [?XMLATTR('id', <<"navitemsub">>)], [?ACT(URI, Name)] )]);
make_menu_item(item, 3, URI, Name, Lang) -> make_menu_item(item, 3, URI, Name, Lang) ->
?LI([?XAE('div', [?XMLATTR('id', <<"navitemsubsub">>)], [?ACT(URI, Name)] )]). ?LI([?XAE('div', [?XMLATTR('id', <<"navitemsubsub">>)], [?ACT(URI, Name)] )]).
%%%==================================
%%% vim: set foldmethod=marker foldmarker=%%%%,%%%=: