Commit graph

12 commits

Author SHA1 Message Date
Pranav Kant
28cf20b091 bccu#1640: Add elapsed time field to admin console
Time increment is handled on client-side, server only sends the
elapsed time during first page-load.

Change-Id: I73e98fd95ca9f391b625a8dcfc7e3490878c6a40
2016-04-01 13:33:45 +05:30
Pranav Kant
4ae077200c loolwsd: Separate AdminModel header and implementation
Change-Id: Iddf107aa7985988deba800030e75243a831a7532
2016-03-31 13:00:30 +05:30
Pranav Kant
aa391888d5 loolwsd: Remove the AdminModel document after expired
The plan was to keep the document's open and close history right
from the moment the server started up to the end, so we would
only expire() the document. For now, just destroy the document
as soon as user session is closed.

Change-Id: Id8f5b550a2b9bda217f7f8f8f1f82f85b1aa3502
2016-03-25 20:06:48 +05:30
Pranav Kant
ea29196fed loolwsd: Periodic memory usage subscription
By default, queries and stores the total memory usage in
AdminModel every 5 seconds, and caches the last 100 such values.
Both cache size and interval can be changed by simple commands
from the clients.

Change-Id: I86cf8228d0129dc8aab0a03856c12dfeb240b169
2016-03-13 19:40:13 +05:30
Pranav Kant
3731f0c0d7 loolwsd: Avoid unnecessary copying
Change-Id: Iff888e5ff4577f20fae63a7b62ab1481ea2d71ed
2016-03-10 18:01:04 +05:30
Pranav Kant
afb7e7dcff loolwsd: Make clients subscribe to commands
... for which they want to be notified.

Needed to add some missing header files to Storage and Auth class
because of conflict raised when LOOLWSD.hpp is included in
Admin.cpp

Change-Id: Ia1c8ed82f8cd979eaf93267ae5dfa347acf895f4
2016-03-08 15:14:14 +05:30
Pranav Kant
76542d8d52 loolwsd: Add total memory, total active docs, total active users
Further changes/refactoring to make it possible:
* Add broker pid to Admin class
* Move getMemoryUsage for process to Util
* Change variable name to accurately reflect *active* items
  _nViews -> _nActiveViews, etc.

Change-Id: I4c9206c49ab829b73ebfe226874bfbbcc8f95342
Reviewed-on: https://gerrit.libreoffice.org/22989
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2016-03-08 09:34:51 +00:00
Tor Lillqvist
e7e1ef58ae Cosmetics: Sort and prune #include and 'using' lines 2016-03-08 09:44:04 +02:00
Miklos Vajna
0fc711c9a1 loolwsd: fix -Werror=maybe-uninitialized 2016-03-07 09:51:22 +01:00
Pranav Kant
ada6a74dc0 loolwsd: Basic layout and interaction with AdminModel
Admin web sessions are added as subscribers to AdminModel. Live
notification fill up the AdminModel, and notifies to
subscribers, if present any. AdminModel can also be queried to
fetch any previous data since the start of the server including
expired documents/views with timestamps for analysis.

There is lot of stuff that can be added in future. This commit
just lays the foundation of appropriate classes.

Change-Id: Ifcf6c2896ef46b33935802e79cd28240fd4f980e
Reviewed-on: https://gerrit.libreoffice.org/22869
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2016-03-03 18:30:33 +00:00
Pranav Kant
85c6467344 loolwsd: Move Admin class to separate header
As a test, add command to fetch documents from AdminModel.

Change-Id: I3cb7097ba7dde049f3b2478fe7b6b6c309da1d92
Reviewed-on: https://gerrit.libreoffice.org/22781
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2016-03-03 18:26:55 +00:00
Pranav Kant
c5aa122fcb loolwsd: Create notification pipe
... and Admin and AdminModel containing all the required data
that we need to expose to Admin panel.

Admin processor will keep listening to any data on this
notification pipe and update AdminModel accordingly.

Change-Id: I0dd6f07ae60158733c34d17f53a35def70600513
Reviewed-on: https://gerrit.libreoffice.org/22780
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-03 03:34:47 +00:00