4677 Commits

Author SHA1 Message Date
Pavel Borecki
e83f387be1
Translated using Weblate (Czech)
Currently translated at 98.9% (1061 of 1073 strings)
2019-09-17 21:24:00 +02:00
Anxin YI
f47da405ce
Translated using Weblate (Chinese (Simplified))
Currently translated at 64.6% (693 of 1073 strings)
2019-09-13 07:23:47 +02:00
Pavel Borecki
320f1889fd
Translated using Weblate (Czech)
Currently translated at 98.5% (1057 of 1073 strings)
2019-09-11 10:23:47 +02:00
James Valleroy
ee77b00079
Release v19.16 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v19.16
2019-09-09 18:20:16 -04:00
James Valleroy
c44d4d1bd7
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-09-09 18:19:04 -04:00
James Valleroy
d826778a41
locale: Update translation strings
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-09-09 17:50:56 -04:00
Sunil Mohan Adapa
3bf4b217fe
actions: Improve log message about action execution
- Use '#' vs '$' to indicate root vs. user message.

- Remove '-n' argument to sudo as it is always present.

- Remove env arguments to sudo as they are only present during debug.

- Remove full path to the action as they are already thoroughly checked.

- Print the message as a shell command with escapes instead of as python list.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-09-08 09:49:24 -04:00
Sunil Mohan Adapa
c4ab81252c
module_loader: Remove log message when app is imported
It is no longer very useful and floods the log window, taking our attention away
from more import things. It is only useful during new module development. Module
load order message helps anyway.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-09-08 09:49:21 -04:00
Sunil Mohan Adapa
526123b6dd
setup: Better log message when no apps need upgrades
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-09-08 09:49:18 -04:00
Sunil Mohan Adapa
9b7d38fa67
web_server: Remove log message about serving static directory
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-09-08 09:49:16 -04:00
Sunil Mohan Adapa
78961d6b99
module_loader: Cosmetic changes by yapf
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-09-08 09:49:12 -04: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
7571c45184
ejabberd: Fix listen port configuration for ejabberd 19.x
Debian has a patch to configuration to change port 5443 to 5280 in ejabberd
package version 18.12. However, 5443 is the correct port to host BOSH. So,
change it back. In 19.x, this behavior has changed to use both ports 5443 (for
BOSH) and 5280 (for web administration).

Closes: #1640.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-09-07 15:35:01 -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
Sunil Mohan Adapa
925df966f3
backups: Add missing slashes at the end of URLs
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-09-07 12:52:01 -04:00
Joseph Nuthalpati
de4a019063
backups: Save new backup location to plinth database
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-09-07 12:51:58 -04:00
Joseph Nuthalpati
7c7ad6d56a
backups: Refactor class hierarchy in repository.py
- Reduce repetition between various kinds of BorgBackup repositories

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil@medhas.org Undo blank line removals]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-09-07 12:51:54 -04:00
Joseph Nuthalpati
8a93b5b90c
backups: Allow adding backup repositories on multiple disks
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil@medhas.org Fix showing form choices, undo blank line removals]
[sunil@medhas.org Fix typo in tooltip for add repo button]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-09-07 12:51:40 -04:00
Sunil Mohan Adapa
5fbc3fc31f
help: Make download as PDF a regular button
By creating an icon for 'download as pdf', we are introducing a completely new
class of buttons into FreedomBox UI. While not being essential, this causes more
learning for the user. Further, it does not exhibit the regular behavior of a
button such as hover styling and button text.

Change the icon into a regular button that user is familiar with elsewhere. Also
add label text.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2019-09-07 10:51:05 +05:30
Danny Haidar
6e5791ca0c
help: Minor updates to the statements on contribute page
See https://salsa.debian.org/freedombox-team/plinth/issues/1517#note_108382

Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-09-06 12:43:55 -07:00
Joseph Nuthalapati
7409ea5daa
help: Convert help icon in the navbar to dropdown
- Tested with JavaScript disabled
- Tested on mobile

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil@medhas.org Add some missing accessibility attributes]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-09-06 12:43:51 -07:00
Allan Nordhøy
a1243f71f7
Translated using Weblate (Norwegian Bokmål)
Currently translated at 98.4% (1035 of 1052 strings)
2019-09-06 20:24:20 +02:00