Commit graph

6055 commits

Author SHA1 Message Date
Pranav Kant
65e3f7c7df admin: expose total available memory to admin clients
Take into reckoning the memproportion config value for total available
memory to us.

Change-Id: Ib93c88d746268f3e9f566beed7df77357d530eba
2017-08-29 12:12:08 +05:30
Aditya Dewan
c61db390c9 Ruler now compatible with comments and zoom
Change-Id: Ic5e99eb3a280ce5f5f4621b20d0e44250ea30621
Reviewed-on: https://gerrit.libreoffice.org/41562
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2017-08-28 10:46:26 +02:00
Aditya Dewan
6494821d27 add numbers on ruler
Change-Id: Iff90ddedf3c808cda3bad0a397b456cb8c9e607d
Reviewed-on: https://gerrit.libreoffice.org/41336
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2017-08-28 10:46:17 +02:00
Aditya Dewan
94ee746edc Add tooltip on ruler to track change
Change-Id: I6d982dadbee18e2ce492b80f429b65e20b3905f8
Reviewed-on: https://gerrit.libreoffice.org/41352
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2017-08-28 10:45:55 +02:00
Aditya Dewan
8ef4d33e15 Adding ruler to loleaflet
Change-Id: I585850a7111eb5ab70bc5b51a508eb29317b92ca
Reviewed-on: https://gerrit.libreoffice.org/40461
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2017-08-28 10:45:33 +02:00
Pranav Kant
29aef0af4b loleaflet: Mention the reason of closing websocket to WOPI hosts
Reason is part of the JSON of post message with ID, 'Session_Close'.

Change-Id: I51a465f63fbd80843292a3f19c5b89f920301194
2017-08-25 18:46:39 +05:30
Pranav Kant
ad211ef51b wsd: Configurable autosave and idlesave durations
But these save conditions are checked every 30 seconds only, so setting
them to less than 30 seconds wouldn't mean that save will be triggered
anytime sooner.

Change-Id: Id473a79af6a3170c72e372040460f2b7c15f150e
2017-08-24 16:54:15 +05:30
Pranav Kant
da4fe86b82 wsd: Do not throw when cannot save local file out of jail
Change-Id: Ie155823536694facb8bfcfe49f6386a7fc845689
2017-08-22 19:50:19 +05:30
Pranav Kant
a9522f38aa wsd: Notify forkit conditionally about rlimits
No need to notify the forkit very early when loolwsd is initializing and
forkit pipes are not set. Forkit is notified of rlimits anyway
explicitly in the URL when it is initialized; no need to try to
initialize it again.

Change-Id: I9fde13e42f6e6393da7cf245ed979538d715319a
2017-08-21 20:06:11 +05:30
Pranav Kant
b0ad8874dc wsd: don't write until forkit write pipe is ready
Change-Id: I95439e8e77dc308d993b07ccbd273228f755ce14
2017-08-21 20:06:06 +05:30
Aditya Dewan
4f775788b2 tdf#107278 bug fix | misinterpratation of units related to network usage
Change-Id: I22bccfe1970b11a0284d0e7ecee9e71f4b0522f7
Reviewed-on: https://gerrit.libreoffice.org/41327
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2017-08-21 12:18:30 +02:00
Aditya Dewan
0cf9c8791f tdf#107278 Beautification of graphs
- better looking axis
- smooth transition for axis and data path

Change-Id: I419a1e9a0691fc4b6a396a970a438431aa724d9c
Reviewed-on: https://gerrit.libreoffice.org/41313
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2017-08-21 12:07:37 +02:00
Jan Holesovsky
057fd10881 No need to scare people too much.
Change-Id: I2b598b3363a73c352bda2cb6bbf0c0d208456456
Reviewed-on: https://gerrit.libreoffice.org/41291
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-08-18 15:39:16 +02:00
Pranav Kant
769e41dfb2 Fix build
Mismerge. There is no session->getAccessToken now

Change-Id: I4d8f2cc612cbd39b3163bcdbba5df8ea5d732774
2017-08-18 07:14:33 +05:30
Aditya Dewan
c3711a4375 Extending WOPI implementaion to introduce 'Save As' feature
Change-Id: Ic4c80f4c4b54944143682c25a5878c1336787b27
Reviewed-on: https://gerrit.libreoffice.org/40946
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2017-08-17 19:25:44 +02:00
Pranav Kant
10bfd18e97 Decode the headers before creating Authorization object
Change-Id: I0da0b4112ac46d2407d2cd308b21ee1dee9d68de
Reviewed-on: https://gerrit.libreoffice.org/41258
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-08-17 17:15:12 +02:00
Jan Holesovsky
a3a3d0ad6c Fix various nitpicks.
Change-Id: I41fe795bc1ea7c73527c7e1183de7098517bad7a
2017-08-17 14:05:22 +02:00
Jan Holesovsky
d78c0b164b unit tests: Really bail out on error; and no need for a tempfile.
Change-Id: I53c1ab62bf9293217a5cada54c358292364ed60a
2017-08-17 14:04:22 +02:00
Jan Holesovsky
f8ca17278f access_header: Pass the access_header around + unit test.
Change-Id: I5d6d93e289d8faceda59deae128e8124a0193d95
Reviewed-on: https://gerrit.libreoffice.org/41243
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-08-17 13:41:07 +02:00
Jan Holesovsky
afcfac4bef access_header: Infrastructure for providing custom headers for authentication.
Change-Id: I52e61dc01dbad0d501471e663aaf364d9bc23c52
Reviewed-on: https://gerrit.libreoffice.org/41223
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2017-08-17 13:40:57 +02:00
Cor Nouws
8a02d9eace Better wording.
Change-Id: I335dd2f6980032464f66c6ba482f6f23d7093144
2017-08-17 10:54:12 +02:00
Miklos Vajna
3f24872971 clang-tidy: invoke this in parallel
The moreutils-parallel package provides this command (at least on
openSUSE).

Change-Id: I53ec59c2e886f651676f6e64a16215793a917b73
2017-08-16 17:02:04 +02:00
Tamas Bunth
b285c5f321 Copy file with linkOrCopy
So that it can create folder in jails when needed.
2017-08-16 16:14:59 +02:00
Tamas Bunth
a37d5789e0 Log missing cache on standard error too 2017-08-16 12:09:09 +02:00
Pranav Kant
8537d4372f Reset the flag when doc unloads
Though no harm as of now because we are calling resetAppLoaded whenever
we are emitting 'docloaded' with false status at the caller site, better
safe than sorry for future.

Change-Id: Id6d86ca2ae01a6eb32c8120df435d0535d906938
2017-08-14 19:51:43 +05:30
Pranav Kant
1a9d5c2ccc loleaflet: Handle Close_Session even if document is not loaded
Now the Close_Session Post message command can be used to close the
documents while it is loading.

Change-Id: If60391834fedc90b3dcb63848aa72503eb43888d
2017-08-14 17:42:07 +05:30
Aron Budea
7455705517 Add dlopen check again to fix build
That unneeded dlopen check isn't unneeded.
Regression from 4be7a6cb16

Change-Id: I8fc451d16c3fa95696995d884743af675d42804d
Reviewed-on: https://gerrit.libreoffice.org/41077
Reviewed-by: Aron Budea <aron.budea@collabora.com>
Tested-by: Aron Budea <aron.budea@collabora.com>
2017-08-12 07:10:51 +02:00
Pranav Kant
ef54b6ea16 wsd: Ignore useractive, userinactive when doc is not loaded
Sometimes client sends a userinactive message while the document is
already being loaded, which leads to the kit process skipping sending
the result of LOK callbacks to the client.

Handling this in child session is futile in the case when userinactive
message is sent when the document is being loaded, since kit process
handles the 'userinactive' message only after document is loaded (i.e
isLoaded() returns true). Moving this handling to DocumentBroker will
take care of both the cases - when 'userinactive' is sent before load
starts, and during load of the document.

Change-Id: I4ea3ac7b184d2ca373eb3ff4fb7b4ae394d454df
2017-08-11 23:27:17 +05:30
Pranav Kant
8c74d4a38d loleaflet: activate the inactivity timer after document load
The timer is cancelled right after 'statusindicator' is received, so a
document never really go to inactive mode after set inactivity time
period (unless user refocuses the document). Call _activate() to ensure
that timer is started after document is completely loaded.

Also timer shouldn't really start when the document is not yet loaded.

Change-Id: I58f5d7718c65cc37da9c3feb99ee6b16741a22a2
2017-08-11 23:27:17 +05:30
Pranav Kant
d0be89bffa loleaflet: new event, docloaded, to sync. various things
First, use the docloaded event to see whether we should be dimming the
document (make it inactive) or not. There is no point in inactivating a
document before document has completely loaded; so don't start the timer
until after the document is completely loaded.

It turns out that we were only emitting the WOPI's App_LoadingStatus
with DocumentLoaded for the first document load, but not for subsequent
reconnections. The problem here was that doclayerinit event is only
emitted during first document load (when TileLayer is -actually-
initialized), which was responsible for emitting this event. By
bifurcating the document load from document layer initialization, we
solve this problem.

Change-Id: I0b7b97fc6244ba9ebd6318d68d78d3abef2c0c08
2017-08-11 23:27:17 +05:30
Aron Budea
a75b780b8a loleaflet: don't add reply on Cancel, don't leave empty box
Reply was added when clicking Cancel. This is a regression from
0760786392

Additionally, when focus was lost on an empty, initial commit,
an empty, defunct comment box remained until reload.

Change-Id: I49a5224ff70de65623496cfcba538acb6a8086f8
Reviewed-on: https://gerrit.libreoffice.org/40915
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2017-08-11 09:56:33 +02:00
Jan Holesovsky
894c5f2cc2 Warn more about missing capabilities, and advise what to do on SLES11.
Change-Id: I93587db6fa32c1c505877c20857799be71ee162f
2017-08-10 11:12:24 +02:00
Jan Holesovsky
4be7a6cb16 We don't need that new autoconf.
Also check for C++11 support, and remove an unneeded dlopen check (we check for
dlopen earlier in the configure.ac).

Change-Id: I76c25a25d22987ad6a1de309c3edd6ef2ea2b64d
Reviewed-on: https://gerrit.libreoffice.org/40952
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-08-10 10:37:57 +02:00
Jan Holesovsky
cef217ea24 wsd: Fix the OAuth unit test.
Trying to combine the Poco's http server together with our polling loop leads
only to problem; so instead let's introduce a hook where we can do the WOPI
serving directly in the unit test.

Change-Id: Id3fec6ff93c3ad652aa4e0fc6309c5b7639728cb
2017-08-09 22:27:49 +02:00
Jan Holesovsky
e7af725b7c Better description of the buttons in case of document conflict.
Change-Id: I177e0fdafef218f958f2efae7eb5ca3e099414de
Reviewed-on: https://gerrit.libreoffice.org/40888
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-08-08 16:17:38 +02:00
Jan Holesovsky
a59598050d convert-to: Set the mimetype in the responses.
Change-Id: Ib8dcad5f81499aec0ba147a3a4ef0b7a30995bcc
2017-08-07 11:33:08 +02:00
Jan Holesovsky
beffd4967a convert-to: New features in the convert-to functionality.
* Add possibility to omit the 'format' parameter
* Allow it even when the 'file' storage is disabled

Change-Id: Ib8dcad5f81499aec0ba147a3a4ef0b7a30995bcc
2017-08-07 11:32:10 +02:00
Jan Holesovsky
b12649d859 discovery: Add the binary MS filetypes.
Change-Id: I745471cc2c1febf6de70c7063197eee7b1672f2e
Reviewed-on: https://gerrit.libreoffice.org/40825
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-08-07 10:28:18 +02:00
Pranav Kant
341c07b64f loleaflet: Explicitly mention z-index to please MS Edge 40
This is not required in any other browser, but Edge 40 requires it
otherwise the popup window upon clicking the combo box goes behind the
main #map element.

Change-Id: Ie95263f08c8af27b16a56ba2c3c7a9faa308400a
2017-08-04 17:44:57 +05:30
Pranav Kant
dbadff5551 loleaflet: Be more specific in README instructions regarding update
An `npm update` on my local tries to update all the modules to latest
version; surely we don't want it everytime only one module update is
required.

Change-Id: I2f79e77ae23edb9b8f8248ac7535e014b7b3218d
2017-08-04 17:44:57 +05:30
Henry Castro
a262b7d7ba wsd: OAuth token passing
MS-WOPI:
"The following HTTP header MUST be included in all WOPI requests."
"Authorization "Bearer" and <token>"

Change-Id: Ie5327286e93b86a49a0248ff5886bf3ea99df768
2017-08-03 17:11:00 -04:00
Marco Cecchetti
2916b99535 loleaflet: graphic selection can get misplaced if mouse is moved fast
Change-Id: I2c1893110ce76bed2c822c8d1ddd293c8f627307
Reviewed-on: https://gerrit.libreoffice.org/40643
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-08-02 12:57:48 +02:00
Andras Timar
0bfd359a7c loleaflet: create destination file's directory with po2json.py
... because the Makefile did not work on SLED11SP4 (?!)

Change-Id: I4e7468149f1c5461aeeb05d3a68e62cda1e329e5
Reviewed-on: https://gerrit.libreoffice.org/39778
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2017-07-31 19:42:32 +02:00
Andras Timar
945d74c237 wsd: fix compilation with old OpenSSL that does not have PKCS5_PBKDF2_HMAC()
Change-Id: If48641f6cbcc4d4ded78ea5cc9c9f66063a2ac0a
Reviewed-on: https://gerrit.libreoffice.org/39779
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2017-07-31 19:40:37 +02:00
Andras Timar
478e803819 add xpdfimport dependencies (e.g. system libpoppler) to systemplate
Change-Id: Iedb77cc0eed107899b15d3d471edcfa0f655d176
2017-07-31 19:39:50 +02:00
Jan Holesovsky
206a070554 Align the close button with the 'more' toolbar button.
Change-Id: Id7997da325adb6df89155605d6978b6da39890f4
2017-07-28 18:13:53 +02:00
Aditya Dewan
7d2bbbee28 tdf#108997 'kill document' from admin console now works.
Change-Id: I8521f0e50e8e037755d34ca2cea99abc002405ae
Reviewed-on: https://gerrit.libreoffice.org/39898
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2017-07-25 07:58:44 +02:00
Pranav Kant
a283942b00 Fix a superfluous condition
(a != 0 || a != 1) makes no sense. Author probably meant AND, not OR.

Change-Id: If91954e9e48e5804c54380db8c99184ef0fcc1d2
2017-07-20 21:08:19 +05:30
Jan Holesovsky
92cdab8bf8 discovery: Make the unknown file extensions read-only.
Change-Id: Ie1467334868a7e4aa31aa69f67d0cd434ed18e7b
Reviewed-on: https://gerrit.libreoffice.org/40083
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-07-17 20:05:27 +02:00
Pranav Kant
af13e5927d Open the log channel explicitly to avoid file creation inside jail
Change-Id: Ida66861e0e1c5925dbbf53d564a829eaf0fd15c7
2017-07-12 15:14:58 +05:30