Bug 106449 - Admin Console: add user list to document display
Summary: Admin Console: add user list to document display
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice Online
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Aditya Dewan
URL:
Whiteboard: target:5.4.0 target:5.5.0
Keywords:
Depends on:
Blocks: LOOL-Admin-Console
  Show dependency treegraph
 
Reported: 2017-03-09 09:58 UTC by Pranav Kant
Modified: 2019-02-03 05:33 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pranav Kant 2017-03-09 09:58:22 UTC
We have a nice per-document list in the admin-console - but it would be great to add the user information to this - perhaps revealed on demand via some expansion widget (if we can) - so its possible to see who the users are.

Similarly - it would be good to have a user list in the admin console that will show the set of users logged in and (revealed by an expander) the documents that each user has open
Comment 1 Aditya Dewan 2017-04-05 04:52:42 UTC
Hi,
I would like to work on this issue.
Comment 2 Aditya Dewan 2017-04-07 11:54:14 UTC
I have been working on this  issue, and its pretty much complete.
The current status is that, if the admin page is already open and a user opens a new document, then this gets shown on the admin page, by sending the username along with the 'addoc' message.
but lets say the admin page is closed initially, user open their files, then you open the admin page.
For such case implementation is yet to be added because as of now i couldn't figure out if we are storing the list of users corresponding to each document or not.
how do you suggest me to go about it.
Comment 3 Pranav Kant 2017-04-07 13:40:28 UTC
(In reply to Aditya Dewan from comment #2)
> I have been working on this  issue, and its pretty much complete.
> The current status is that, if the admin page is already open and a user
> opens a new document, then this gets shown on the admin page, by sending the
> username along with the 'addoc' message.
> but lets say the admin page is closed initially, user open their files, then
> you open the admin page.
> For such case implementation is yet to be added because as of now i couldn't
> figure out if we are storing the list of users corresponding to each
> document or not.

I guess you would need to store the username in the AdminModel itself so that when we query the AdminModel using, 'documents' command, you are able to return the list of usernames also.

It'd be great if you upload your WIP patch on gerrit, to us to have a look.
Comment 4 Aditya Dewan 2017-04-07 14:35:07 UTC
I have uploaded the patch here at https://gerrit.libreoffice.org/#/c/36275/
Comment 5 Commit Notification 2017-04-19 06:18:55 UTC
Aditya Dewan committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/online/commit/?id=41ed318de8c1ebb5c2d707b6fb12a9c9b5440407

tdf#106449 admin:adding user list for each document
Comment 6 Aditya Dewan 2017-04-26 08:24:45 UTC
can we mark this as resolved now?
Comment 7 Pranav Kant 2017-04-26 09:37:45 UTC
(In reply to Aditya Dewan from comment #6)
> can we mark this as resolved now?

I think the second part still needs some doing here.

(In reply to Pranav Kant from comment #0)
> We have a nice per-document list in the admin-console - but it would be
> great to add the user information to this - perhaps revealed on demand via
> some expansion widget (if we can) - so its possible to see who the users are.
> 

You finished this.

> Similarly - it would be good to have a user list in the admin console that
> will show the set of users logged in and (revealed by an expander) the
> documents that each user has open

This still needs to be done. This should be possible using the same data that we get from the server. You just need to manipulate it and create user->array of documents mapping. I'd avoid doing this in separate page because we'd have to ask for the information from the server again then. So ideal would be to create some tabbed view with its first tab saying 'Documents opened' and second tab 'Users' (and this one containing the user->array of documents mapping). The tabbed approach would preclude creating a new websocket connection and hence will allow us to reuse the the data that we asked from the server in the starting and the data that we have been subscribed to already (add, remove documents etc.).

Ofcourse, feel free to use your own creativity if you want.
Comment 8 Aditya Dewan 2017-05-25 14:42:04 UTC
Hi,

I have tried to provide a solution for the second part at https://gerrit.libreoffice.org/#/c/38017/
Comment 9 Commit Notification 2017-05-27 05:08:51 UTC
Aditya Dewan committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/online/commit/?id=66a3e1c273c9f967d650e65d40e9d16e3b8454d1

tdf#106449 Admin console: adding user list
Comment 10 Pranav Kant 2017-05-31 07:30:12 UTC
Okay, this looks good to me. It'd be great if you could do the the small follow-ups also sometimes as mentioned in the gerrit request.

Closing this bug as majority of the bug is fixed.