52 Commits

Author SHA1 Message Date
Sunil Mohan Adapa
f65b4ec407
views: Don't require sending diagnostics module name separately
- Reuse the app_id already available to the view.

- Implement automatically detecting if an app has implemented diagnostics.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-30 11:38:02 -05:00
Sunil Mohan Adapa
2ebb565c92
diagnostics: Use new component based API for all diagnostic tests
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-30 11:37:46 -05:00
Alice Kile
0dd4d1acf2
implement responsive layout for app page
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-07 13:08:44 -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
Alice Kile
eb83e00011
fix formatting issues
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-07 13:08:35 -05:00
Alice Kile
fa74a26042
use single variable for referencing icon filename
- add and use "icon_filename" property to almost all of the modules
  being displayed in the apps page
- sharing and tor modules do not seem to be using setup.html template
  file and so the variable is not added to their __init__.py files,
  therefore the icon will not be displayed on these app pages.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-07 13:08:33 -05:00
Alice Kile
4969efd3b9
apps: Remove link to webapps in app descriptions
[sunil: Fix trailing white space in description]
[sunil: Fix removal of wrong message from ttrss app]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-11-26 15:39:28 -08:00
Veiko Aasa
955da6bee8
turbolinks: Disable turbolinks on links that don't point to /plinth/...
Fixes #1678

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2019-11-14 08:14:49 +05:30
Sunil Mohan Adapa
8a1a3a66f7
cosmetic: yapf formatting
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-20 11:54:15 -04:00
Nikolas Nyby
5439084c84
Add flake8 to gitlib-ci - closes #58
And fix the rest of the flake8 errors.

Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-07-25 11:07:06 -07:00
Nikolas Nyby
f81b1751ce
Fix typos in module init docs
Intialize -> Initialize

Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-07-24 14:55:22 -07:00
Sunil Mohan Adapa
c6bbc847b4
syncthing: Open firewall ports for listening and discovery
- Closes #1592.

- Use firewall service definition 'syncthing' already available.

- Open externally also, helps in syncing with peers on the Internet. Open
  discovery port also externally and syncthing deal with the traffic.

- Based on https://docs.syncthing.net/users/firewall.html

Test:

- Install version 2, syncthing firewall service is enabled in internal and
  external zones.

- Disable app, syncthing firewall service is removed. Enable app, syncthing
  firewall service is added.

- Install version 1, upgrade to version 2, syncthing firewall service is added.

- Install version 1, disable syncthing, upgrade to version 2, syncthing firewall
  service is not added. Enable syncthing, firewall service is added.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-06-24 18:11:35 -04:00
Sunil Mohan Adapa
e4351b6b97
Introduce daemon component to handle systemd units
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-06-13 20:18:02 -04:00
Sunil Mohan Adapa
46f162d093
app: Add unique ID to each app class
Also maintain a global list of apps

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-06-13 20:17:59 -04:00
Sunil Mohan Adapa
4100d36381
Introduce webserver component for managing Apache configuration
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-06-13 20:17:49 -04:00
Sunil Mohan Adapa
ca2c7dbeb0
Introduce firewall component for opening/closing ports
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-06-13 20:17:45 -04: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
Sunil Mohan Adapa
b96d901071
Introduce component architecture and menu component
- Introduce base class for all apps that will contain components. With
  unittests.

- Introduce base classes for components. With unittests.

- Turn Menu class into an app component.

  - Further cleanup Menu class.

  - Update tests.

  - Maintain a global list of menu items and look them up easily. Generalize
    such that subsubmenus can later be merged into Menu class.

  - Cleanup scope of main menu initialization.

  - Use None instead of empty strings for various values. Ensure that
    printing short_description does not show 'None' in output.

  - Use enable/disable instead of promote/demote.

- Use menu component in all apps.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-06-07 11:48:04 -07:00
James Valleroy
893bd2b4d6
apps: Separate enabled and disabled apps
- Add 'secondary' flag to menu items.

- Mark apps as 'secondary' when disabled.

- Extend TemplateView for apps index.

- Add card-container for disabled apps.

Closes #1309

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-05-07 16:57:55 -07:00
Sunil Mohan Adapa
ff247fa5aa
setup: Move app data files into respective apps
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-03-17 16:20:57 -04:00
Sunil Mohan Adapa
fdcbd46513
setup: Move app enabling files to respective apps
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-03-17 16:20:54 -04:00
Sunil Mohan Adapa
529c281734
syncthing: Add backup/restore support
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-01-26 21:30:29 -05:00
Hemanth Kumar Veeranki
881302ac02
Use logos instead of icons in the apps page
- Adjust the template so that it uses glyphicons for sys page and logos for the app page
- Add logos for missing apps (tor and sharing) and their licences

Signed-off-by: Hemanth Kumar Veeranki <hems.india1997@gmail.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-06-30 09:40:09 -04:00
Hemanth Kumar Veeranki
b605c9da8a
Add a way to refine shortcuts
- Add a field `allowed_groups` to shortcuts, which will contain groups which can
  access a particular app
- When a user is logged in, only return those shortcuts to the front page if the
  user is allowed to access them. This check is done based on the allowed_groups
  field of the shortcut
- Add allowed_groups for shortcuts of all apps with group-restricted access

Signed-off-by: Hemanth Kumar Veeranki <hemanthveeranki@gmail.com>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2018-06-21 18:53:45 +05:30
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
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
Sunil Mohan Adapa
8dcf570c76
syncthing: yapf indentation
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2018-01-15 17:51:43 +05:30
Aakanksha Saini
5ec7f49c8b
syncthing: Restrict administration to users in group syncthing
- Add syncthing group
- Add validation in syncthing-plinth configuration

* Tested on UI

Signed-off-by: Aakanksha Saini <aakanksa@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2018-01-15 17:51:30 +05:30
Sunil Mohan Adapa
44b92f12eb
clients: Update all manifest due to use updated framework
- Validate all the client data using the validation function.

- No need for enums anymore. Easier to read.

- Use the combined store URL method.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2017-12-13 18:56:38 -05:00
Joseph Nuthalapati
590ba78f89
Create an enum for different package types
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2017-12-04 12:16:12 -05:00
Joseph Nuthalapati
4c69935e7a
Remove unnecessary attributes in manifest files
- Other minor refactoring
- Fix ejabberd and jsxc Client Apps listing

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2017-12-04 12:15:54 -05:00
Joseph Nuthalapati
57c44f32e6
Add support for iOS AppStore
- iSorted Python imports in all the manifest files
- Some refactoring in plinth_extras

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2017-12-04 12:15:36 -05:00
Joseph Nuthalapati
bf33a1a492
Make naming convention consistent using enums
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2017-12-04 12:15:31 -05:00
Joseph Nuthalapati
aaf5d6dbe1
Convert collapsible list to collapsible table
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2017-12-04 12:15:26 -05:00
Joseph Nuthalapati
5165f5a414
consistent naming convention for icons
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2017-12-04 12:15:20 -05:00
Joseph Nuthalapati
efa575b204
Add clients to ServiceView
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2017-12-04 12:15:12 -05:00
Joseph Nuthalapati
d3cddfa68c
Add icons for desktop applications and Apple App store.
- Add yapf style file for consistency of formatting
- Some minor changes and renaming
- Add template tag filters for checking conditions
- Move icons from img directory to icons directory

Currently the client listing is in both the SetupView and ServceView for ease of
development. Have to remove from ServiceView.

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2017-12-04 12:15:03 -05:00
Joseph Nuthalapati
d403782b77
Add client information for Matrix Synapse and Syncthing
- Add logos for desktop operating systems

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2017-12-04 12:14:42 -05:00
Prachi
823e06271f
Add client information for modules
Added information for the following:
-diaspora
-ejabbered
-infinoted
-ikiwiki
-jsxc
-matrixsynapse
-minetest
-mumble
-quassel
-radicale
-repro
-restore
-roundcube
-shaarli
-synchting
-tor
-shaarli
-transmission
-ttrss

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2017-12-04 12:14:34 -05:00
Prachi Srivastava
83430f4031
Add mobile, web and desktop client for modules
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2017-10-24 17:13:13 +05:30
Prachi
c8eb714562
Separate out the short description and app name
Signed-off-by: Prachi <prachi@swecha.net>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2017-08-21 11:17:08 +05:30
Sunil Mohan Adapa
ee7cc98fee
apps, system: Remove modules and merge into main
- Remove apps and system modules and merge their views into main views.

- Move main_menu from cfg into menu.py.

- Remove dependencies of other modules on apps and system modules.

- Update tests.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2017-05-05 22:31:45 -04:00
Johannes Keyser
fab423e652
syncthing: Fixed typos and clarity in description 2017-04-17 11:48:19 +05:30
Sahithi Yarlagadda
24851ca7ff
syncthing: Added line break to title 2017-04-12 14:06:35 +05:30
Sunil Mohan Adapa
4a3cf220c8
syncthing: Fixes issues with enabling and setup
- On enable, don't just run syncthing, actually enable it.

- Make setup step idempotent. Run setup during enable as it is
  idempotent.

- Perform user/group creation properly during setup.

- Provide better description.

- Modify the application label and icon for accuracy of the service
  provided.

- Fix problem with showing service in firewall.
2017-03-23 15:09:46 +05:30
Sunil Mohan Adapa
277cd45342
syncthing: Minor styling fixes 2017-03-23 15:09:26 +05:30
Joseph Nuthalpati
551bd7b92c
syncthing: Fix showing running status in configuration page 2017-03-23 15:07:38 +05:30
Joseph Nuthalpati
a5147cfe16
syncthing: Run service as system user 'syncthing'
- Enabled Apache LDAP authentication for Syncthing.
2017-03-23 15:07:25 +05:30
Joseph Nuthalpati
53645deebf
syncthing: Made it a systemd service 2017-03-23 15:06:52 +05:30