23 Commits

Author SHA1 Message Date
Sunil Mohan Adapa
9368504da5
*.py: Use SPDX license identifier
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-02-19 14:38:55 +02:00
Sunil Mohan Adapa
b576a77c3d
app: Refactor all apps to use the Info component
- Remove the need to pass all the individual information elements to the AppView
  separately. This eliminates many issues with elements that were mistakenly not
  sent to AppView. Also reduces a lot of code duplication.

- Create App classes for power and sso for consistency.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-02-16 18:22:01 -05:00
Alice Kile
ec6013b5bb
properly implement header in app and setup pages
- move header section to it's own file so that it can be imported across
  the app (app.html, simple_app.html, setup.html)

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-07 13:08:41 -05:00
James Valleroy
b338501778
config: Implement get_initial and form_valid
Fixes #1675.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-11-04 11:30:38 -08:00
Sunil Mohan Adapa
dd1884e8ab
config: Use AppView and cleanup custom code
- Follow common code so that extending becomes easier.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-30 19:24:40 -04:00
Sunil Mohan Adapa
855a99cc21
config: Send hostname change signal only after fully processing it
If the domain name is not properly set before calling post_hostname_change
signal, then in the signal handlers config.get_domainname() returns an empty
string. So, call the post_hostname_change signal only after fully finishing the
hostname related changes, that is, after setting back the original domain name
too.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-08-21 21:35:19 -04:00
Sunil Mohan Adapa
173d3464b0
config: Remove unused domain change signal
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-08-11 18:40:12 -04:00
Sunil Mohan Adapa
ba4afd2a09
names: Use new API in all apps
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-08-11 18:39:56 -04:00
Sunil Mohan Adapa
b743305e06
names: Don't enumerate services for domains supporting all
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-08-11 18:39:47 -04:00
James Valleroy
ff06c722bb
config: Add option to show advanced apps
Closes #1454.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-06-10 11:15:58 -07:00
Sunil Mohan Adapa
75c57d3e00
Turn frontpage shortcut into an app component
- Turn frontpage shortcut into an App component. Add tests and full
  documentation.

- Overridden implementations for tahoe, diaspora, mediawiki shortcuts to handle
  special cases. Special handling for ikiwiki.

- Extend App API for removing and retrieving a component.

- Add clients information into shortcuts to avoid hacks when presenting
  shortcuts to Mobile devices via API.

- Fixed unnecessary stripping and adding of '/' when setting home page redirect
  URLs. This fixes problem with setting Cockpit as home page.

- Replaced the use of term 'app' in favor of 'shortcut' as the term when setting
  frontpage shortcuts as home page.

- JSXC shortcut does not require login.

- Don't show shadowsocks for anonymous users.

- Simplify showing selected shortcut details.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-06-07 11:48:08 -07:00
Joseph Nuthalapati
b33b44b526
config: Fix error when setting JSXC as the home page
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-23 10:31:08 -05:00
Joseph Nuthalapati
bedc5ff96d
config: Add option to use Apache's default home page as home page
This supports the use case of hosting a website on FreedomBox at Apache's web
root. This makes the assumption that index.html is a file in the website.

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-23 10:31:02 -05:00
Joseph Nuthalapati
8bc34f84c3
config: Rename Default App to Webserver Home Page
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-23 10:30:59 -05:00
Joseph Nuthalapati
0023481d48
configuration: Fix parsing error in retrieving default app
- some minor refactoring
- optimized imports

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2018-07-30 15:23:51 +05:30
Joseph Nuthalapati
a309b28035
configuration: Use augeas to edit Apache files
Move the file editing code to actions/config since it must be executed by a
super user.

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-07-29 20:50:14 -04:00
Joseph Nuthalapati
9a3af288fa
configuration: Option to set a default app for FreedomBox
Closes #1315

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-07-29 20:50:10 -04:00
Joseph Nuthalapati
4064d6e231
manual: Link to manual from each service
Closes #930

- Make targets to download wiki pages of each service

- Add post-processor script for DocBook file processing

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-03-22 19:49:14 -04:00
Sunil Mohan Adapa
c3167dac64
config: Remove language selection from config page
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-02-21 21:08:40 +01:00
Sunil Mohan Adapa
8f0e2d6381
Rename Plinth to FreedomBox in module doc strings
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-02-16 20:10:25 -05:00
Sunil Mohan Adapa
dea4af17fb
Rename Plinth to FreedomBox in license headers
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-02-16 20:10:09 -05:00
Joseph Nuthalapati
5edf7d00fa
config: Move the method get_hostname to __init__.py
- formatting and optimization of imports

Closes #1232

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2018-02-12 16:49:34 +05:30
RaviBolla
644b4ef4e5
config: refactoring of config.py into views and form
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2017-11-13 12:52:21 -05:00