status_num(<<"all">>, Status).
status_list(Host, Status) ->
Res = get_status_list(Host, Status),
- [{U, S, R, P, St} || {U, S, R, P, St} <- Res].
+ [{U, S, R, num_prio(P), St} || {U, S, R, P, St} <- Res].
status_list(Status) ->
status_list(<<"all">>, Status).
_ ->
fun(A, B) -> A == B end
end,
- [{User, Server, Resource, Priority, stringize(Status_text)}
+ [{User, Server, Resource, num_prio(Priority), stringize(Status_text)}
|| {{User, Resource, Status, Status_text}, Server, Priority} <- Sessions4,
apply(Fstatus, [Status, Status_required])].
NodeS = atom_to_list(node(Pid)),
Uptime = CurrentSec - calendar:datetime_to_gregorian_seconds(
calendar:now_to_local_time(Now)),
- {atom_to_list(Conn), IPS, Port, Priority, NodeS, Uptime, Status, Resource, StatusText}.
+ {atom_to_list(Conn), IPS, Port, num_prio(Priority), NodeS, Uptime, Status, Resource, StatusText}.
%%%
is_glob_match(String, Glob) ->
is_regexp_match(String, ejabberd_regexp:sh_to_awk(Glob)).
+num_prio(Priority) when is_integer(Priority) ->
+ Priority;
+num_prio(_) ->
+ -1.
+
mod_options(_) -> [].