40 Commits

Author SHA1 Message Date
James Valleroy
f8dfd49f0f
frontpage: Rearrange parameters for add_shortcut
Rename id to shortcut_id.
2016-12-18 12:32:49 -05:00
mridulnagpal
e4b310369e
icons updated 2016-12-18 12:32:43 -05:00
mridulnagpal
8d5fc5f1c4
icons updated 2016-12-18 12:32:41 -05:00
mridulnagpal
071058b427
ugettexy lazy restored 2016-12-18 12:32:39 -05:00
mridulnagpal
06fb7fab3b
License updated ikiwiki icon added title indented 2016-12-18 12:32:26 -05:00
James Valleroy
0a20e1e83a
frontpage: Use reverse_lazy for Configure links 2016-12-08 19:42:54 +05:30
Swapnil Gupta
ce18ed4214
Error when initializing modules fixed 2016-12-07 05:43:54 -05:00
James Valleroy
b234d0e1b3
Ensure that services are registered when modules complete setup 2016-12-04 13:45:31 -05:00
mridulnagpal
941259df1e
Firewall updated 2016-12-04 13:45:26 -05:00
James Valleroy
69332a903d
Minor changes for frontpage configure button
Remove unneeded gettext around configure URLs.

Remove module-level variables for configure URLs. Just use it directly
in add_shortcut().

Use reverse lookup for configure URLs.

Check that configure_url is set before displaying.

Change appearance of Configure link to a button.
2016-11-21 19:13:23 -05:00
mridulnagpal
8f147e4c7f
frontpage: Show Configure button in service details
Only show when user is logged in.
2016-11-21 12:22:01 -05:00
mridulnagpal
fbe40f17b2
apps requiring login don't show up on frontpage unless logged in 2016-11-15 19:50:58 -05:00
Sunil Mohan Adapa
3fe6ea6014
frontpage: Cleanup urls for showing description
In a module, when URL is not avialable for a shortcut, send None instead
of an implementation specific detail on how to show description.  This
allows use to change the implementation of how description is shown
without changes to modules.
2016-09-02 20:06:53 +05:30
James Valleroy
49eadd971a
Add information about enabled services to front page 2016-09-02 20:03:39 +05:30
Sunil Mohan Adapa
5f548a9e36
packages: Make modules declare managed packages
This can then be used by a privileged action to verify that packages
requested for installation are in fact valid.  This slightly improves
security of those privileged actions.
2016-06-11 12:11:32 -04:00
Sunil Mohan Adapa
ad61028a3a
menu: Sort menu items for all locales
Currently menu items are shown in alphabetical order in applications and
no clear order in system configuration.  This is done using static
weights for menu items based on English names that does not work for
other locales.

Sorting can't be done at the time of adding menu items as users of
multiple locales may use the interface at the same time.

Implement a sorting mechanism based on existing order as well as labels
of menu item.  This allows the flexiblity of grouping menu items in
future as it may be need for system configuration.  In case of help menu

Remove sort order for all modules except for help menu as here we want
that specific order.
2016-06-06 17:44:59 -04:00
Sunil Mohan Adapa
f245e7e763
firewall: Explicitly specify ports for services
It has become confusing to reuse the name of the service for name of the
systemd unit file and firewall port.  This has lead to the regression
that quassel, mumble and minetest can no longer open firewall ports.
Fix this by explicitly specifying ports all services.
2016-06-05 15:44:41 -04:00
Sunil Mohan Adapa
97b77e3719
diagnostics: Implement scoping for IPv6 addresses 2016-06-03 16:21:59 -04:00
Sunil Mohan Adapa
288a9e7bf9
privoxy: Fix issue with privoxy diagnotic tests
The URL is always https:// so we only need https proxy and nothing else.
2016-06-03 16:21:53 -04:00
James Valleroy
f6884a18fa
Set privoxy listen-address by debconf preseed before install. 2016-05-25 19:23:54 -04:00
fonfon
f419c28596
Services: Explicitly use ServiceForm and ServiceView
- adapted all modules to not use views.ConfigurationView anymore
- removed templates that are not needed anymore
- no more implicit 'enabled' and 'get_status' functions in __init__.py files
- (more coherent/explicit use of Django functionality)
2016-05-11 18:19:31 -04:00
fonfon
a9528c56d9
Service object to handle services on a system-level
The Service object now offers handling services on a system level,
and gathering information whether it's enabled or running.
New methods: enable, disable, is_enabled, is_running;

For this it needs the correct (system-level) service name.
All of the methods can be overridden/customized.

This changes all modules to the new Service object and deletes
action scripts that are not required anymore.
2016-05-11 18:19:27 -04:00
Sunil Mohan Adapa
6a462cecc8
privoxy: Use common view for configuration 2016-02-28 19:38:21 +05:30
Sunil Mohan Adapa
b112c82889
privoxy: Use new setup mechanism 2016-02-13 13:50:28 +05:30
Sunil Mohan Adapa
7f4c5f7410
Make app names as module identifiers
- The last part of the module import path is the module name.  This also
  becomes the Django app name.  Apps names have to be unique.  Hence,
  there is no scope for two different modules with same name but
  different load path to exist in the project.

- Most uses of list of loaded modules are dealing with app names instead
  of full module load path.  This is due to the fact that Django deals
  with app names and not module paths.

- It is also somewhat clumsy to access a loaded module as we are
  re-importing every time to get access module.

- Simplify all of the above by using app names are module identifiers
  and maintaing an ordered dictionary of app names to loadded modules.

- Remove unused imports.

- Minor styling fixes.
2016-02-13 13:49:23 +05:30
Sunil Mohan Adapa
4602c5bfce
Use translated brand name in templates
Using brand name directly from configuration means that it can't be
easily translated.  Instead use the translated brand name sent in my the
context processor.
2016-01-24 00:37:01 +05:30
Ruben Lubbes
841439ba73 Punctuation errors changed after DE language check
Influences all translations, so do not use for 0.7.
2015-12-09 23:55:55 +05:30
Sunil Mohan Adapa
a69f419c3c Make Django urlpatterns list of url()s
- Support for legacy pattern() mechanism will be removed in Django
  1.10.  Currently we see a warning for each Plinth module.
2015-12-05 09:33:23 -05:00
Sunil Mohan Adapa
01d50c7ae8 Fix i18n of template expressions 2015-11-14 11:42:32 +05:30
Sunil Mohan Adapa
3df1a88824 Switch to Django i18n for code strings
Django i18n layer is on top of gettext and provide may crucial features
such as per-request locales, lazy translations etc.
2015-11-13 22:08:43 +05:30
Sunil Mohan Adapa
02cd89b60d Internationalize strings in template files 2015-11-13 22:02:17 +05:30
Sean Alexandre
95e81b0906 Adds missing calls to service.notify_enabled() from on_install handlers.
Fixes https://github.com/freedombox/Plinth/issues/175
"Many services do not show as enabled in Firewall after install"
2015-09-27 21:39:33 +05:30
James Valleroy
a95142cfff privoxy: Use diagnostics_button template like other modules. 2015-08-29 06:56:34 -04:00
Sunil Mohan Adapa
69420c38cb privoxy: Implement diagnostics
- Mostly moved from freedombox-setup.
2015-08-29 06:22:01 -04:00
Sunil Mohan Adapa
5ffe3dab70 Reorder all app menu items alphabetically
- Alphabetical order is best for users to find the necessary items
  quickly and precitably.

- Currently there is no particular order.
2015-07-28 12:15:35 +05:30
Sunil Mohan Adapa
4906384b39 privoxy: Remove get-enabled from actions 2015-07-19 19:56:05 -04:00
Sunil Mohan Adapa
07e2c0ce14 Don't use actions to check if service is running
- To check whether a service is running does not require root
  privileges.  This can directly be done from a module without any
  action.

- Since actions are allowed to be run using sudo, introducing
  unnecessary sub-commands increases attack surface.

- Simple functions calls are unnecessarily being converted to command
  line invocations and involve parsing response.

- There is a lot of repeated code because of this that can be
  eliminated.

- To generalize this, we need to make all non-root system operations
  directly from module instead of delegating to action commands.
2015-07-19 19:54:13 -04:00
fonfon
824a9091c1 use django-stronghold for authentication handling (instead of @login_required) 2015-07-01 00:01:02 +05:30
Bob Girard
d64ce6cc01 Bundle tests with applications
- For each application, add ./tests directory and __init__.py file
  within it.

- Modify test controllers (coverage.py, runtests.py) to find the new
  test directories for testing and coverage analysis.

- Move existing application-specific test modules (test_pagekite.py) to
  the newly created directories.
2015-06-26 12:05:48 +05:30
Sunil Mohan Adapa
56c732ab10 privoxy: New web proxy application 2015-05-27 22:46:57 +05:30