1018 Commits

Author SHA1 Message Date
fonfon
7af92d9e65 Updated unit- and doctests 2015-05-03 19:27:12 +02:00
fonfon
7a4486fadf pagekite: restart service when config is changed
so the changed config gets applied immediately, and
not only after enabling/disabling the service manually.
2015-05-03 16:53:47 +02:00
fonfon
ef08f40447 minor layout cleanup 2015-05-03 15:28:45 +02:00
fonfon
3cc0cb74a6 Prevent adding existing or predefined services
and improved form error handling
2015-05-03 09:44:46 +02:00
fonfon
b3da314560 use util.service_is_running for tor also 2015-05-03 09:44:46 +02:00
fonfon
3f2c9ff2c8 cleaned up actions and configuration form 2015-05-03 09:44:46 +02:00
fonfon
99bfda3b69 removed default frontend stuff from actions
it's all handled via get-frontend and set-frontend now.
and there are now some doctests in actions/pagekite_util.py
2015-05-03 09:44:46 +02:00
fonfon
e0fa113a9c updated tests 2015-05-03 09:44:46 +02:00
fonfon
bab54aa26d removed old configobj pagekite action 2015-05-03 09:44:46 +02:00
fonfon
b96c89b0ab make pagekite login-required;
restart pagekite after adding/deleting a service so the changes take
effect;
improved warnings in the UI
2015-05-03 09:44:46 +02:00
fonfon
0b2b8ba51a Removing a service limited to removing 1 service
before it could happen that more services were removed
2015-05-03 09:44:46 +02:00
fonfon
d5d9e2df2e renamed variables for consistency
there are only 'service' and 'service_string' now, no more 'params'
2015-05-03 09:44:46 +02:00
fonfon
c04897be8b Moved pagekit url creation to pagekite module
plus some minor cleanup
2015-05-03 09:44:46 +02:00
fonfon
8955e41f15 pagekite is required to be installed via package now 2015-05-03 09:44:46 +02:00
fonfon
1fc0064fd0 refactoring pagekite: configuration form works
splitting the services to a separate page is not yet finished
2015-05-03 09:44:46 +02:00
fonfon
cf96797040 pagekite action: Use augeas pagekite lens
And allow setting any server as pagekite frontend.
2015-05-03 09:44:45 +02:00
Sunil Mohan Adapa
07ee03941f Redirect to apps page always from index page
- Plinth will become the home page for FreedomBox.  So it has to serve
  the purpose the directing users to available services.  This will
  happen most often and should also work when users are not logged in.

- Soon we will have a resigned 'front page'/'apps' section which is
  expected to be shown to user who are not logged in too.

- Apps menus has been removed.  Index page is now the only way to reach
  Apps section.
2015-05-01 21:14:04 -04:00
Sunil Mohan Adapa
7e3a7ad53c Implement a simpler navigation bar
- Add a login menu for 'edit' user, 'change password' and 'logout'
  items.

- Move settings to right and remove label.

- Move documention to right, remove label and change icon.

- Remove apps menu.  User is expected to use the brand icon for reaching
  apps.  It is also the home page and the main focus of entire
  interface.
2015-05-01 21:14:04 -04:00
Sunil Mohan Adapa
d22b0d4185 Don't use inverted look for navigation bar
This contribute to a flatter and simple appearance.
2015-05-01 21:14:04 -04:00
Sunil Mohan Adapa
53b0f5aca8 Don't use wells for placing all the content 2015-05-01 21:14:04 -04:00
James Valleroy
d185e88022 transmission: minor comment updates 2015-05-01 19:38:49 -04:00
Sunil Mohan Adapa
69adf1cfc5 transmission: Run from behind Apache
- Introduce Apache configuration for plinth.

- Remove Transmission service file for firewalld.

- Enable transmission on install.

- Enable/disable Apache configuration on Transmission on enable/disable.

- Remove IP address whilelisting as 127.0.0.1 is the default setting and
  is sufficient for Apache to reverse proxy.

- Update UI URL.
2015-05-01 19:00:56 +05:30
Sunil Mohan Adapa
f94d0d5414 transmission: New module for BitTorrent downloads 2015-05-01 18:52:17 +05:30
Sunil Mohan Adapa
b62f6746f4 Handle arguments to actions properly
- Don't allow strings to be sent as arguments.  The mixup with
  lists/tuples could be dangerous.

- Don't escape arguments.  subprocess.Popen takes care that arguments
  are passed on nicely to the actions.

- Update tests.
2015-05-01 18:52:17 +05:30
Sunil Mohan Adapa
4e42486822 ikiwiki: Data in /var/lib & setup after install
- It is conventional to store application data in /var/lib/APPDIR
  instead of /var/APPDIR.  Change ikiwiki data folder to
  /var/lib/ikiwiki.

- After installing and before enabling and setting up basic
  configuration, performing any operation such as 'create' wiki/blog
  lead to silent errors.  Do avoid this situation, perform a separate
  setup() operation soon after the package is installed.
2015-04-18 21:09:44 +05:30
Sunil Mohan Adapa
cc97304925 ikiwiki: Don't error out when listing before setup
- After a ikiwiki module is installed but not yet enabled, visting the
  'manage' page throws an error.  Fix this.
2015-04-18 21:07:08 +05:30
Sunil Mohan Adapa
9b674292c8 ikiwiki: Update UI messages and minor refactoring
- In manage page, show a message to create new blog/wiki when there are
  none.

- Elaborate on what gets deleted in delete page.

- Add Ikiwiki in menu item label.  This is in order to allow for other
  Wiki/Blog modules.

- Indentation changes.
2015-04-18 20:59:24 +05:30
James Valleroy
57e5799880 PEP8 fixes 2015-04-13 20:43:07 +05:30
James Valleroy
35dcde00de ikiwiki: Create admin account for new wiki/blog. 2015-04-13 20:43:07 +05:30
James Valleroy
18234850ff ikiwiki: Add delete command for wikis and blogs. 2015-04-13 20:43:07 +05:30
James Valleroy
1464ff3184 ikiwiki: Create and manage wikis/blogs. 2015-04-13 20:43:07 +05:30
James Valleroy
fbce204180 Add ikiwiki module with initial setup and option to enable site. 2015-04-13 20:43:07 +05:30
Sunil Mohan Adapa
e09018fe9a Fix issues with configuration/parameters loading
- Change default server directory from plinth/ to /plinth as the program
  expects.

- First load the values from configuration file and then override them
  with command line parameters.

- Show default values on the command line help.

- Use configuration file values as default values to command line
  parameters.

- Log the value of script prefix (server_dir) for easy debugging.

- Make sure the server_dir is properly loaded from configuration files.
2015-04-07 22:43:25 +05:30
Sunil Mohan Adapa
2a83f29b8b Add systemd service file
- When running in an environment without systemd, the changes are completely
  ignored.

- When running under systemd, the patch introduces a systemd native service
  file to take advantages of nice feature provided by systemd.

- One of the feature currently taken advantage of is the ability to restart the
  service automatically if it ever crashes or exits with error.

- Another feature is that when we wish to kill Plinth all the processes under
  the cgroup are killed as well.
2015-04-07 22:43:25 +05:30
Sunil Mohan Adapa
13e0707b09 network: Skip network tests when running as non-root 2015-04-06 23:11:26 +05:30
Sunil Mohan Adapa
cd88ca7ecc network: Add python-networkmanager to setup.py and requirements.txt 2015-04-06 22:49:04 +05:30
Sunil Mohan Adapa
97b7133d60 network: Add python3-dbus install dependency to travis config 2015-04-06 22:39:53 +05:30
Sunil Mohan Adapa
6a605f777c network: Disable networks module until python3-networkmanager is available 2015-04-06 22:21:29 +05:30
Sunil Mohan Adapa
6326b9143c network: Update travis configuration to install network-manager package 2015-04-06 22:21:29 +05:30
Sunil Mohan Adapa
f00f65f484 network: Update tests to work with UUIDs and add a few more checks 2015-04-06 22:21:29 +05:30
Sunil Mohan Adapa
0cb8b4a5fc network: Cleanup, minor fixes and refactoring
- Make network-manager package get installed when accessing the index page of
  networks.  Also freedombox-setup shold actually pull network-manager package
  as dependency and use it for configuring the initial networks.

- Remove the /connect page and re-use the /add_wifi page for that purpose.

- Fix add connection page titles.

- Handle the case when network-manager returned empty string for SSID.

- Don't explictly URL encode the Wi-Fi SSID when adding a new Wi-Fi network.
  Django automatically handles this in 'url' tag and decodes before url
  routing.  Relax the regex that matches SSID as part of the URL to handle all
  possible SSIDs.
2015-04-06 22:21:29 +05:30
Sunil Mohan Adapa
fc6b59d59b network: Untabify and minor refactoring 2015-04-06 22:21:29 +05:30
Sunil Mohan Adapa
bc4ac58f2e network: Use uuids for identifying connections
- Name for a network connection is not unique.  UUIDs are much less likely to
  change compared to name of the connection.  No necessity to perform URL
  encoding too.

- Move UI error message strings to view module instead of the network module
  for proper separation.

- Minor refactoring.
2015-04-06 22:21:29 +05:30
James Valleroy
ed4e6eddc1 Update dependency list and pep8 fixes. 2015-04-06 22:21:29 +05:30
James Valleroy
40bbad4484 Add wifi mode to connect page also. 2015-04-06 22:21:29 +05:30
James Valleroy
2441caf647 Add AP and adhoc wifi modes, and shared IPv4 addressing mode. 2015-04-06 22:21:29 +05:30
James Valleroy
8d9b388375 Fix network tests, add form help and validator. 2015-04-06 22:21:29 +05:30
James Valleroy
45086ff003 Add firewall zone selection for networks. 2015-04-06 22:21:29 +05:30
James Valleroy
f0c5cd080c Add wifi security settings. 2015-04-06 22:21:29 +05:30
James Valleroy
f63d8d29de Connect to network selected from scan page. 2015-04-06 22:21:29 +05:30