8 Commits

Author SHA1 Message Date
Sunil Mohan Adapa
05670257fd
web_server: Suppress warnings that static directories don't exist
When JSXC is not installed, currently we get warnings that jsxc directories are
not found when we start the web server.

Suppress warning that some of the static directories don't exist. Since there is
no way to add/remove those tree mounts at will, we need to add them all before
hand even if they don't exist now. If the directories becomes available later,
CherryPy serves them just fine.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-04-24 10:52:47 +03:00
Sunil Mohan Adapa
56250562d4
help: Move custom static file handling into app from central place
Tests performed:

- Print the calls to _mount_static_directory() before and after the changes.
They should print the same.

- With English as the preferred language, visit the user manual. Images should
be visible. Visit MediaWiki manual page with learn more link in MediaWiki.
Images should be visible.

- Repeat with Spanish as the preferred language.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-03-25 20:23:55 +02:00
Sunil Mohan Adapa
7a0ea38fb1
web_server: Introduce component to handle special static file dirs
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-03-25 20:22:37 +02:00
Sunil Mohan Adapa
9368504da5
*.py: Use SPDX license identifier
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-02-19 14:38:55 +02:00
Joseph Nuthalapati
eb91938963
help: Respect language preference when showing user manual
Retrieve the manual page or download PDF manual in user's preferred language.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil@medhas.org Merge URL format since view is the same]
[sunil@medhas.org Refactor language extraction]
[sunil@medhas.org Minor refactorings]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-30 19:25:06 -04:00
Sunil Mohan Adapa
9b7d38fa67
web_server: Remove log message about serving static directory
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-09-08 09:49:16 -04:00
Sunil Mohan Adapa
94255806cf
web_server: Move shutdown handling to main
This will keep web server de-coupled with service that want to shutdown on exit.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-26 06:24:02 -05:00
Sunil Mohan Adapa
201b256fe5 main: Separate out CherryPy code into a separate module
This will help with modularizing the code as well as abstracting out CherryPy
for potential later replacement.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-01-09 14:52:02 +05:30