Commit graph

19245 commits

Author SHA1 Message Date
Michael Meeks
dadfbf0579 allow more verbose log-level during startup to be configured.
Previously this defaulted to 'trace' - now it can be configured, but
still defaults to 'trace'.

Change-Id: I0ecf2f0b991cd8cc29dbde866dd4589be4ca7957
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2022-11-21 21:44:05 +01:00
Szymon Kłos
737206696c Fixes #5488 : Sens UI_SaveAs also on mobile
regression from https://github.com/CollaboraOnline/online/pull/5252

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I632acddd406ef2ecd3aa862684e30a36f550d559
2022-11-21 15:30:28 +01:00
Ashod Nakashian
7fa1cff0af wsd: improve various logs
Change-Id: Ib4c0792eeba4da76c800f6afe4737f91c4d319f7
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-11-21 08:45:34 -05:00
Ashod Nakashian
4123a88b24 wsd: correct logged upload duration
Change-Id: Ic9fd69cabb782cd1a5662db1cf47fd87be6cf6b3
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-11-21 08:45:34 -05:00
Ashod Nakashian
21069484ec wsd: ssl: log the operation context in errors
Change-Id: I8b2bd675d5341354f240476ea80450b2dbbe7b76
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-11-21 08:45:34 -05:00
Ashod Nakashian
7bf0e980bb wsd: http: correct written data-size reporting
Change-Id: I9268b0c8bd99c1f06d20916503f7df7cdbde0cc4
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-11-21 08:45:34 -05:00
Ashod Nakashian
0ff29b4157 wsd: clang-tidy: suppress bogus assert diagnostics
Clang-tidy thinks, incorrectly, that an
assert(false) can be replaced with static_assert.

While the assert(false) in question is a trap
for code paths that shouldn't happen,
static_assert is a compile-time check that
has nothing to do with the execution path.

Since the assert in question is used in a
macro, it shows up countless times where
said macro is used. This silences it.

Change-Id: I19b35da6332a06335cc83b0584505a42741de97f
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-11-21 08:45:34 -05:00
Ashod Nakashian
432bec03e7 wsd: test: do not invoke WSD test when finished
Change-Id: I46b056c58ba6b214ab5a6099735767490b672ffc
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-11-21 08:45:17 -05:00
Ashod Nakashian
cccf7aa0be wsd: test: filter subsequent tests
Apply the test filter on all tests,
not just the first.

Change-Id: Ib34e90e883f5de2ddcf04c710f433cb54677575d
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-11-21 08:45:17 -05:00
Ashod Nakashian
571f80c260 wsd: test: capture the UnitBase instance in WebSocketHandler
With multi-tests, the instance of UnitBase may
change while an old test thread is still running.
Here we capture the instance of the test so we
do not publish events into a different (newer)
test.

Change-Id: I3ca2c058cbd81d4077b140f24f60f3f20f12b9b5
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-11-21 08:45:17 -05:00
Ashod Nakashian
5b45b2807f wsd: test: invoke configure for each test
Now that we may have multiple tests in a
single unit-test module, we should call
UnitWSD::configure for each one, not just
once at the start. Each test can modify
the configuration settings to meet its
test conditions.

Change-Id: I08de2d998edee5b4cbade08f2496196b596a8600
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-11-21 08:45:17 -05:00
Ashod Nakashian
77acf5c18b wsd: test: improved assert logging on failure
We now capture the expected variable's name
and log the expected and actual values when
the assertion fails.

Change-Id: I1c72de9a816acd4a369e8e3f649615462372c49c
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-11-21 08:45:17 -05:00
Ashod Nakashian
dad2b5e92a wsd: test: capture the reason in exitTest
When invoking exitTest it's useful to know
something about the reason. Whether it's
because the test passed or timed out,
it's useful to log this information.

Change-Id: I8e8ae525b7c2ef1de2e394d08107341cdc87c008
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-11-21 08:45:17 -05:00
Ashod Nakashian
672c958b89 wsd: test: log all test names before running
Now that multiple tests and filtering are
supported, it's useful to know what tests
exist in each unit-test module.

Change-Id: Ifaa7eccabab6b23a57edf2786c0cd726ab0265db
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-11-21 08:45:17 -05:00
Ashod Nakashian
57456f7ff6 wsd: test: filter tests using COOL_TEST_OPTIONS
Using the envar COOL_TEST_OPTIONS, which is
provisioned to support other options than
just filtering, it is now possible to
only run the tests with names partially
matching the filter's case-insensitive
string.

Change-Id: I6168887677fd0fddd72bac2538837615b10b9fae
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-11-21 08:45:17 -05:00
Ashod Nakashian
0069a41dbb wsd: test: capture the UnitWSD instance per DocBroker
Each test loads one or more document. At the end
of the test we may load a new test (a new
UnitWSD/Kit instance). However, because of the
static interface that the tests have, there
could be only one instance at a time. This
means that when we switch the current test
instance, an existing DocBroker might fire
events into the wrong (new) test, making it
fail.

By capturing the current test, we make sure
that DocBroker can never run against different
tests.

Change-Id: I161ec3c9ce1617f41d03b53d2d5fb19682930b78
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-11-21 08:45:17 -05:00
Ashod Nakashian
a124356031 wsd: test: fail -> onDataLoss
The event we trigger when we detect data-loss
is best named to reflect that fact.
And since we can override the behavior,
for example if the test expected to trigger
the data-loss detection, then we can signal
the non-failure by the return value.

Change-Id: I67ca69ae783c956cfdd14d54dab5efb7cc3d258c
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-11-21 08:45:17 -05:00
Ashod Nakashian
f3b8ac088f wsd: test: stop DocBroker when unit-test finishes
Change-Id: Ia23cc2e9e3ff503681600a9ab8536c50fafe4db7
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-11-21 08:45:17 -05:00
Ashod Nakashian
543f55f9c4 wsd: test: non-numeric filenames in WopiTestServer
Change-Id: I371c603e040466bfb6d0c5f7e9d52bd7b1d999fe
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-11-21 08:45:17 -05:00
Ashod Nakashian
e969859ef3 wsd: test: log test start and finish visibly
Change-Id: Ie374f5d617db188faa24066d494c91f4f5d49c60
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-11-21 08:45:17 -05:00
Ashod Nakashian
03f8ed11fe wsd: test: simplify WSD_CMD_BY_CONNECTION_INDEX
Unfortunately, we can eliminate it because
we want to have the file/line where the
command is issued, for debugging. But, the
body doesn't have to be in the macro and
has now moved to a member function.

Change-Id: I02aefa6d8a8182bdfae8a1e0b4bae28a649e74bf
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-11-21 08:45:17 -05:00
Ashod Nakashian
c652757724 wsd: test: return the correct type from hooks multi
Change-Id: I057c90e9b4d5f749ff0dda74a5aa20f3afc3b24f
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-11-21 08:45:17 -05:00
Michael Meeks
8ebdde2cb8 zstd: tune for speed, and compress deltas.
Small deltas were not compressed at all, now they are.

Change-Id: I0543a488723816b4140b27c5690f657aea26226e
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2022-11-21 11:53:59 +01:00
Pedro Pinto Silva
3f2e70dd09 Enable read-only status label for tablets
So tablet user is able to check what is the current edit mode
by looking at the status bar

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I4990ca748762eb100b0ca9e791b4ae2a0843f2f6
2022-11-21 10:22:37 +01:00
Ashod Nakashian
145f490e76 wsd: when loading fails exit Kit
In rare cases when we have a corrupted document, or
we run out of memory while loading, we end up with
a Kit that has no document and would not be reused.

If we exit the Kit, we immediately cleanup DocBroker
on the WSD side and allow for retrying.

Change-Id: I3e811a066365e94f0606b9458be1272607cc45cf
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-11-20 07:50:12 -05:00
Ashod Nakashian
432424c2c2 wsd: log save failures more visibly
Change-Id: If32b27ece8bfbdc89f600f85c9ac1af5c449135b
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-11-20 07:50:12 -05:00
Ashod Nakashian
261031c2ef wsd: reuse local variable
Change-Id: I621db21e4065e333e77453cecf174d04963c769e
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-11-20 07:50:12 -05:00
Ashod Nakashian
ac52505640 wsd: getServerURL is debug/test only
Change-Id: Ic4c2fe3b467fee475cdc7c0b91b1df77f441c0aa
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-11-20 07:50:12 -05:00
Ashod Nakashian
5542a6a253 wsd: correctly set the Content-Type
Change-Id: I4f121cb15e97dec0f366a9aaab4e8e5cc80df611
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-11-20 07:50:12 -05:00
Ashod Nakashian
f3b42a9941 wsd: log more info on exception in WebSocketHandler
Change-Id: I73e5a0eb17b9a059aaad2e78c64242e3ed28a8c4
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-11-20 07:50:12 -05:00
Ashod Nakashian
d3ab5adfcd wsd: kill poco
Change-Id: I694ad44539f87b0d7127ee64e71768bf408447ec
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-11-20 07:50:12 -05:00
Ashod Nakashian
c8aaa2e3c8 wsd: notify the client when the doc URI is invalid
Change-Id: I39a4c8d3dd9ca2899a9a8eacdb865a7121b75d3e
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-11-20 07:50:12 -05:00
Ashod Nakashian
3f926b488b wsd: detect json arrays in messages
So far, we assumed only json objects are
used, but that's only because we didn't
have arrays. This adds support for detecting
both json arrays and objects alike.

Change-Id: If91bf092ab95869298e90e4f071505471ab1db19
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-11-20 07:50:12 -05:00
Andras Timar
c037f53b4b Update l10n files for Weblate
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I56a9e4d7b08dbacec05e33f9be89a1943a91391a
2022-11-18 14:53:54 +01:00
Translator-3000
8cd2b7bc82 Translated using Weblate (Italian)
Currently translated at 100.0% (462 of 462 strings)

Co-authored-by: Translator-3000 <weblate.m1d0h@8shield.net>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/it/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I2cd8abdf79e2e8efdb4e815a30a80f1e479fcbe3
2022-11-18 14:46:37 +01:00
Giacomo Bertolotti
eb2752d713 Translated using Weblate (Italian)
Currently translated at 99.5% (460 of 462 strings)

Co-authored-by: Giacomo Bertolotti <giacomo.chappo@hotmail.it>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/it/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ic5955ce6453f151bb68b9e30d532ed50751d4377
2022-11-18 14:46:37 +01:00
Alex Gabilondo
79bdcd46be Translated using Weblate (Basque)
Currently translated at 100.0% (462 of 462 strings)

Co-authored-by: Alex Gabilondo <alexgabi@disroot.org>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/eu/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: If1306b1a2b78edbe1cb126807c651ee3d0a9083a
2022-11-18 14:46:36 +01:00
이정희
d0e9e2a82a Translated using Weblate (Korean)
Currently translated at 100.0% (110 of 110 strings)

Co-authored-by: 이정희 <daemul72@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/android-app/ko/
Translation: Collabora Online/Android app
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I9265c95b72c0d0b435e9189c8ccdc3caba52155e
2022-11-18 14:46:36 +01:00
Luna Jernberg
76e732c044 Translated using Weblate (Swedish)
Currently translated at 100.0% (462 of 462 strings)

Co-authored-by: Luna Jernberg <droidbittin@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/sv/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I1694f94a401773d395a249477fe3e4331755dc71
2022-11-18 14:46:36 +01:00
Szymon Kłos
e48a2ab2bd Deduplicate code in calc function list for mobile
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I775a01a42dec8780fe149d079667c41c7602bf89
2022-11-17 20:20:42 +01:00
Szymon Kłos
3a0d34d5c5 Fix display of functions help in calc on mobile
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Id42439405752e6f72876469f67fd61450e2cc2d7
2022-11-17 20:20:42 +01:00
Rash419
937d471d1f wsd: fix: wopi.host not working when alias_groups are not defined
regression from commit 3aa3334a7b

Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I601ea3bde0419129e39c1a1454c22c676d4870bd
2022-11-17 13:51:00 +01:00
Szymon Kłos
dffaeb228b masterpage: correclty refresh after switching mode
Mode is sent via status message so handle it there to avoid
race

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Iaa9c23d4c88950d88701d8adf552d606871902d8
2022-11-17 11:42:24 +01:00
Szymon Kłos
cfb6fbd150 sidebar: don't send null command
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Id790bdddfb5263fe23b7ca9e9264a20041228dfa
2022-11-17 11:42:24 +01:00
Szymon Kłos
0c63531319 masterpage: remove old hack for invalidation
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ic2ad091f522e93e669ec021361ef8779cbab55d5
2022-11-17 11:42:24 +01:00
Szymon Kłos
01530c32d5 masterpage: use mode for tile rendering
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I0180e051237043f391ba01128ccfb00fe54cb539
2022-11-17 11:42:24 +01:00
Miklos Vajna
bbb8d98ae9 admin: drop conditional that is now redundant with clamping
Follow-up to
<https://github.com/CollaboraOnline/online/pull/5421#pullrequestreview-1179138409>.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: Ie293218e504808d317436181639d9189eb6fb05c
2022-11-17 08:21:12 +01:00
Pedro Pinto Silva
7f8efc7c51 GitPod: Fix No package 'libzstd' found
Fixes issue #5465

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I5139fb4491cc1c6a29bfdf3ef3e0b2b7cb9c890c
2022-11-17 07:39:39 +01:00
Gökay Şatır
192e12a864 Merge permission sources into one. Use global variable for file permission.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I19b6c0e95ccc3249219c88224b8c183992cd3b6d
2022-11-16 15:58:14 +03:00
Gökay Şatır
fa14b9aecf Remove unusued function.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: Ie21e4164c268d5dfac78e588630f8d30682e591d
2022-11-16 15:58:14 +03:00