%%%
%%%----------------------------------------------------------------------
+%%%% definitions
+
-module(ejabberd_web_admin).
-author('alexey@process-one.net').
{"name", Name},
{"value", Value}])).
+%%%==================================
+%%%% process/2
+
process(["doc", LocalFile], _Request) ->
DocPath = case os:getenv("EJABBERD_DOC_PATH") of
P when is_list(P) -> P;
end
end.
+%%%==================================
+%%%% make_xhtml
+
make_xhtml(Els, Host, Lang) ->
make_xhtml(Els, Host, cluster, Lang).
get_base_path(global, Node) -> "/admin/node/" ++ atom_to_list(Node) ++ "/";
get_base_path(Host, Node) -> "/admin/server/" ++ Host ++ "/node/" ++ atom_to_list(Node) ++ "/".
+%%%==================================
+%%%% css & images
+
additions_js() ->
"
function selectAll() {
"AEFJREFUCNdlw0sRwCAQBUE+gSRHLGABC1jAAhbWAhZwC+88XdXOXb4UlFAr"
"SmwN5ekdJY2BkudEec1QvrVQ/r3xOlK9HsTvertmAAAAAElFTkSuQmCC").
+%%%==================================
+%%%% process_admin
process_admin(global,
#request{path = [],
make_xhtml(Res, Host, Node, Lang)
end;
+%%%==================================
+%%%% process_admin default case
+
process_admin(Host, #request{lang = Lang} = Request) ->
{Hook, Opts} = case Host of
global -> {webadmin_page_main, [Request]};
Res -> make_xhtml(Res, Host, Lang)
end.
-
+%%%==================================
+%%%% acl
acls_to_xhtml(ACLs) ->
?XAE("table", [],
{ok, Rs}
end.
+%%%==================================
+%%%% list_vhosts
list_vhosts(Lang) ->
Hosts = ?MYHOSTS,
end, SHosts)
)])].
+%%%==================================
+%%%% list_users
list_users(Host, Query, Lang, URLFunc) ->
Res = list_users_parse_query(Query, Host),
su_to_list({Server, User}) ->
jlib:jid_to_string({User, Server, ""}).
+%%%==================================
+%%%% get_stats
get_stats(global, Lang) ->
OnlineUsers = mnesia:table_info(session, size),
lists:reverse(Hist)
end.
+%%%==================================
+%%%% get_nodes
get_nodes(Lang) ->
RunningNodes = mnesia:system_info(running_db_nodes),
Res -> Res
end.
-
+%%%==================================
+%%%% node parse
node_parse_query(Node, Query) ->
case lists:keysearch("restart", 1, Query) of
lists:reverse(String)),
Result.
-
-%%%
-%%% Navigation Menu
-%%%
+%%%==================================
+%%%% navigation menu
%% @spec (Host, Node, Lang) -> [LI]
make_navigation(Host, Node, Lang) ->
?LI([?XAE("div", [{"id", "navitemsub"}], [?ACT(URI, Name)] )]);
make_menu_item(item, 3, URI, Name, Lang) ->
?LI([?XAE("div", [{"id", "navitemsubsub"}], [?ACT(URI, Name)] )]).
+
+%%%==================================
+
+%%% vim: set foldmethod=marker foldmarker=%%%%,%%%=: