From b5da0ffd7e85054f77289a60f842cac416d459b1 Mon Sep 17 00:00:00 2001 From: Badlop Date: Mon, 23 Oct 2017 12:12:37 +0200 Subject: [PATCH] Show in WebAdmin the erlang node where the room resides https://www.ejabberd.im/forum/29687/muc-mangement#comment-67685 --- src/mod_muc_admin.erl | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/mod_muc_admin.erl b/src/mod_muc_admin.erl index 9d3d4e765..9e447301e 100644 --- a/src/mod_muc_admin.erl +++ b/src/mod_muc_admin.erl @@ -535,7 +535,8 @@ make_rooms_page(Host, Lang, {Sort_direction, Sort_column}) -> ?T("Persistent"), ?T("Logging"), ?T("Just created"), - ?T("Room title")], + ?T("Room title"), + ?T("Node")], {Titles_TR, _} = lists:mapfoldl( fun(Title, Num_column) -> @@ -581,6 +582,7 @@ build_info_room({Name, Host, _ServerHost, Pid}) -> S = get_room_state(Pid), Just_created = S#state.just_created, Num_participants = maps:size(S#state.users), + Node = node(Pid), History = (S#state.history)#lqueue.queue, Ts_last_message = @@ -600,7 +602,8 @@ build_info_room({Name, Host, _ServerHost, Pid}) -> Persistent, Logging, Just_created, - Title}. + Title, + Node}. get_queue_last(Queue) -> List = p1_queue:to_list(Queue), @@ -616,7 +619,8 @@ prepare_room_info(Room_info) -> Persistent, Logging, Just_created, - Title} = Room_info, + Title, + Node} = Room_info, [NameHost, integer_to_binary(Num_participants), Ts_last_message, @@ -624,7 +628,8 @@ prepare_room_info(Room_info) -> misc:atom_to_binary(Persistent), misc:atom_to_binary(Logging), justcreated_to_binary(Just_created), - Title]. + Title, + misc:atom_to_binary(Node)]. justcreated_to_binary(J) when is_integer(J) -> JNow = misc:usec_to_now(J),