1627 Commits

Author SHA1 Message Date
Sunil Mohan Adapa
211b0ea78d
minetest: Remove mod-torches no longer available in testing/unstable
Closes: #1651

Tests:

- Install and check that the daemon is running.

- Run functional tests.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-05 15:00:21 -04:00
Sunil Mohan Adapa
b72021782e
deluge: Support deluge 2 by starting it properly
deluge-web 1.x runs in the foreground by default and provides an option -f to
fork in the background where as deluge-web 2.x by default forks into the
background and provides option --do-no-daemonize for running in foreground.
Update systemd service to ensure that option is passed appropriately based on
the version of daemon running.

Update functional tests to accommodate UI changes in deluge-web 2.x.

Closes: #1652.

Tests:

- Install deluge 1.x by having testing in apt sources.list. Ensure that the
  daemon is working. Run functional tests.

- Upgrade deluge to 2.x by changing the sources.list and upgrading. Ensure that
  daemon is working after disable/enable. Run functional tests.

- Install deluge 2.x by having unstable in apt sources.list. Ensure that daemon
  is working. Run functional tests.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-05 13:36:06 -04:00
Sunil Mohan Adapa
b3af80b15c
snapshot: Use app.html instead of app-subsubmenu.html
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-05 13:26:19 -04:00
Sunil Mohan Adapa
d51e63ecef
pagekite: Use app.html instead of app-subsubmenu.html
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-05 13:26:16 -04:00
Sunil Mohan Adapa
d6c0b98375
i2p: Use app.html instead of app-subsubmenu.html
- Gain ability to show internal zone warning for I2P proxies.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-05 13:26:13 -04:00
Sunil Mohan Adapa
902851252a
dynamicdns: Use app.html instead of app-subsubmenu.html
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-05 13:26:11 -04:00
Sunil Mohan Adapa
6af30c40b4
backups: Remove unnecessary use of subsubmenu template
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-05 13:26:00 -04:00
Sunil Mohan Adapa
ec407bfd26
networks: Remove subsubmenu in favor of toolbar buttons
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-05 13:25:57 -04:00
Sunil Mohan Adapa
77737afadd
ikiwiki: Remove subsubmenu in favor of toolbar
- Merge managing table into the index page.

- Remove separate URL/view/template for manage.

- Convert create tab into a toolbar button.

- Remove cancel button from delete confirmation page.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-05 13:25:54 -04:00
Sunil Mohan Adapa
1b86414488
upgrades: Remove unnecessary subsubmenu
- Prefer toolbar button style instead of tabs.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-05 13:25:50 -04:00
Sunil Mohan Adapa
ad0552adf6
users: Make UI close to rest of the apps
- Provide an app title, description and link to manual page.

- Use AppView and app.html to present most of the elements.

- Remove tabs and turn create user into a button.

Tested by running: py.test-3 --include-functional -k users-groups

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-04 18:03:50 -04:00
James Valleroy
03f5ca0b05
security: Move security report to new page
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
[sunil@medhas.org Remove status header similar to other toolbars]
[sunil@medhas.org Add icon to 'show security report' button]
[sunil@medhas.org Handle error retrieving past CVE counts]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-10-03 16:00:46 -07:00
James Valleroy
5fe84bf395
security: Add past vulnerabilities count
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
[sunil@medhas.org isort]
[sunil@medhas.org Handle errors during HTTP request]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-10-03 15:59:49 -07:00
Sunil Mohan Adapa
867b8f3f63
pagekite: cosmetic: yapf and isort changes
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-02 17:21:42 -04:00
Sunil Mohan Adapa
cff9a61f09
pagekite: Remove first wizard step for danube edition
- The code was never used by end users.

- The code was expected to be used long back but the plans didn't materialize.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-02 17:21:39 -04:00
Sunil Mohan Adapa
dbb3558aab
firstboot: Hide left menu during first boot as intended
This seems to be a regression from earlier behavior.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2019-09-22 08:41:59 +02:00
Sunil Mohan Adapa
6db1926a62
tor: Fix test case for getting status
Mock the app so that it doesn't have to be loaded.

Closes: #1645.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-09-21 13:28:39 -04:00
Sunil Mohan Adapa
54b0e7c63b
letsencrypt: Update and fix tests involving domain changes
- Remove checking of the sender is 'test' and use mocking.

- Remove need for tests being run as root.

- Simplify log messages, avoid pylint warnings.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-09-21 13:28:35 -04:00
Joseph Nuthalapati
7cbaec3e26
firstboot: Add new help menu to firstboot navbar
- Refactor the help menu into a django template include.

- Show help menu if user is logged in, instead of after completing firstboot.

Closes: #1517

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil@medhas.org Rename help-menu.inc to help-menu.inc]
[sunil@medhas.org Use user.is_authenticated instead of another variable]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-09-17 19:45:48 -07:00
Joseph Nuthalapati
3e619d6882
firstboot: network connections not used, cleanup
No longer showing network connections in firstboot. Removed dead code.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-09-17 19:45:18 -07:00
Sunil Mohan Adapa
4842b81515
ejabberd: Perform host/domain name operations only when installed
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-09-07 15:43:48 -04:00
Sunil Mohan Adapa
29ae2edcd1
ejabberd: Prevent restart on freedombox startup
Closes: #1641

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-09-07 15:43:46 -04:00
Sunil Mohan Adapa
b87930406e
cockpit: Prevent restart on freedombox startup
- Add a domain only if it is not already present.

- Remove a domain only if it is already present.

- Refactor utility methods in separate module for reuse.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-09-07 15:43:43 -04:00
Sunil Mohan Adapa
20c13936c3
backups: Move add repository buttons to the top
When a large number of archives and repositories exist, the add repository
buttons are not easily discover-able by the user.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-09-07 12:53:20 -04:00
Sunil Mohan Adapa
d9d9c8167f
backups: Show error when there are no disks available to add repo
When there are no additional disks available, don't show an empty drop down
for disks and throw an error when submitting. Instead make it clear that no
additional disks are available and that is why repository can't be created.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-09-07 12:53:17 -04:00
Sunil Mohan Adapa
1d031c97f1
backups: Don't show used disk choices when adding disk repo
- Without this users can create multiple repositories for the same disk
  location.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-09-07 12:53:14 -04:00
Sunil Mohan Adapa
9db1f186cd
backups: Show error when password is provided for unencrypted repo
- Without this error, users will believe that a repository is encrypted (as
  password is provided) but it is not (repository was created earlier without a
  password).

- Remove the need to send credentials, an instance property, while getting
  encryption data, an instance method.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-09-07 12:53:11 -04:00
Sunil Mohan Adapa
00da744a94
backups: Show lock icon for encrypted repositories
- Remove unused CSS.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-09-07 12:53:08 -04:00
Sunil Mohan Adapa
786b1efcf3
backups: Show repository error in archives table
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-09-07 12:53:05 -04:00
Sunil Mohan Adapa
0465ce0efd
backups: Handle errors when adding disk repository
- Simplify repository initialization using inheritance.

- Share the code for saving repository for disk and remote repositories. Error
  messages are properly handled for disk repositories too.

- Move logic to create remote SSH directory to SSH repository class instead of
  views.

- Create a new error for handling borg repository already existing while
  initialization.

- Get information of repository after initializing so that password errors are
  caught early.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-09-07 12:53:03 -04:00
Sunil Mohan Adapa
063587f7ac
backups: Minor simplification when adding remote repository
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-09-07 12:53:00 -04:00
Sunil Mohan Adapa
c159c484ec
backups: Improve handling borg errors
- Use regular expression search instead of string search.

- Fix issue with incorrect password error not getting recognized properly.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-09-07 12:52:57 -04:00
Sunil Mohan Adapa
77a93d967f
backups: Minor simplification in running of action script
- No need to override run method in derived class if known_credentials is a
  class property exposed by base class.

- Move a method for cosmetic.

- Minor formatting.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-09-07 12:52:55 -04:00
Sunil Mohan Adapa
357e9a412a
backups: Minor cosmetic changes
- Add documentation strings.

- Styling blank lines.

- Yapf auto-formatting.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-09-07 12:52:52 -04:00
Sunil Mohan Adapa
7467fa4553
backups: Separate repository loading from instantiation
The constructor of the Repository object is being used for two distinct
purposes. One is to load the object from database and other to instantiate it
with parameter such that it can be saved to database. Separating the two usages
to different methods simplifies code and parameter passing for consumers.

Also turn some class specific constants from globals to class constants.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-09-07 12:52:49 -04:00
Sunil Mohan Adapa
5b01689a92
backups: Clarify two separate uses of name create_repository
It is being used to mean initialize the borg repository as well as creating an
instance of the repository class object. Use 'initialize' for former and
'get_instance' for latter.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-09-07 12:52:46 -04:00
Sunil Mohan Adapa
6c14e34875
backups: Implement hostname property on SSH repository
Use repository class instances instead of custom ad-hoc data structures such as
repo_data.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-09-07 12:52:44 -04:00
Sunil Mohan Adapa
0eb2db3f9a
backups: Use higher level method in views instead of store methods
Make store an internal implementation detail of the repository class and achieve
better abstraction.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-09-07 12:52:41 -04:00
Sunil Mohan Adapa
143c9e494d
backups: Make mountpoint property private
It is not required by any consumers. Allows for better abstraction on a complex
class.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-09-07 12:52:39 -04:00
Sunil Mohan Adapa
d05bbab751
backups: Rename repo_path to borg_path for clarity
borg_path clearly signifies that it is to be used by borg and consumers of the
class will not be confused by it.

Also rename some repo_path variables in test cases.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-09-07 12:52:36 -04:00
Sunil Mohan Adapa
5865fbea26
backups: Minor change to disk repository name
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-09-07 12:52:33 -04:00
Sunil Mohan Adapa
68fed450a9
backups: Rename remove_repository method to remove
Since the method is being called on Repository classes, _repository suffix is
redundant.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-09-07 12:52:30 -04:00
Sunil Mohan Adapa
461741c33f
backups: Expose repository path as property
Make consumers depend on the repository classes instead of lower level store
API.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-09-07 12:52:27 -04:00
Sunil Mohan Adapa
e8b324eece
backups: Minor cosmetic fixes
- Remove some pylint warnings

- Add documentation strings.

- Yapf auto-formatting.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-09-07 12:52:22 -04:00
Sunil Mohan Adapa
0b0791d78f
backups: Introduce method for checking if a repository is usable
get_repositories method will return repositories instead of dictionaries for
view content. This will make it usable in more situations.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-09-07 12:52:20 -04:00
Sunil Mohan Adapa
0df07f5cf2
backups: Rename network_storage module to store
Same module is being used to store/retrieve local disk repositories also.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-09-07 12:52:17 -04:00
Sunil Mohan Adapa
5df34d1927
backups: Simplify listing repositories in index page
- Use sort_order property to decide which type of repositories should be listed
  first.

- Remove getting repositories of a given type and retrieve all of them at the
  same time.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-09-07 12:52:14 -04:00
Sunil Mohan Adapa
b5d7a910dd
backups: Simplify checking repository capabilities using flags
Also make storage_type an abstract property so that derived classes are forced
to override it.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-09-07 12:52:11 -04:00
Sunil Mohan Adapa
5136304212
backups: Fix removing local repository
- Remove incorrect instantiation of SSH repository for local disk repositories.

- Clarify the removal message to convey that backups are not removed.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-09-07 12:52:08 -04:00
Sunil Mohan Adapa
92abe9f3c1
backups: Remove cancel button from add disk location page
For consistency with add remote location page.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-09-07 12:52:05 -04:00