39 Commits

Author SHA1 Message Date
Sunil Mohan Adapa
9368504da5
*.py: Use SPDX license identifier
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-02-19 14:38:55 +02:00
Sunil Mohan Adapa
b576a77c3d
app: Refactor all apps to use the Info component
- Remove the need to pass all the individual information elements to the AppView
  separately. This eliminates many issues with elements that were mistakenly not
  sent to AppView. Also reduces a lot of code duplication.

- Create App classes for power and sso for consistency.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-02-16 18:22:01 -05:00
James Valleroy
c78d96984b
bind: Bump version and handle upgrade
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2020-02-15 10:07:48 -05:00
Nektarios Katakis
19f9436457
bind: parse zones files
Signed-off-by: Nektarios Katakis <iam@nektarioskatakis.xyz>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-02-15 10:07:38 -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
Sunil Mohan Adapa
0cf099fe4f
Yapf changes
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-08-10 09:38:53 -04:00
Sunil Mohan Adapa
acdcabcbed
setup: Clarify success log message when force upgrading
Currently, in cases of ignoring an upgrade and actually upgrading, the log
message says success which is somewhat confusing. Make the force_upgrade()
methods in apps return information about ignoring the upgrade and print log
message accordingly.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-08-10 09:38:49 -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
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
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
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
Sunil Mohan Adapa
3a0b2cbc01
bind: Show port forwarding information
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-05-13 15:54:30 -07:00
Sunil Mohan Adapa
ec68eb3d89
setup: Make additional info available for force upgrading
This includes list of packages for which conffile prompts will be shown. For
each package current version of the package, new version of the package and list
of configuration files that were modified.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-28 20:48:51 -05:00
Sunil Mohan Adapa
d51a2b6865
bind: Handle conffile prompt during upgrade
- Simply keep the old configuration as the configuration format for bind is
  unlikely to change due to its stability. Future versions may consider checking
  for version of package being upgraded to.

- Don't start service if not already running.

- Don't perform firewall changes.

- No need to rerun setup as old configuration is being kept.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-26 06:24:22 -05:00
Prachi Srivastava
5d68f6bf52
Replace glyphicons with forkawesome icons
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-01-14 17:37:58 -08:00
Joseph Nuthalapati
03e19b0bdc
bind: Enable backup/restore
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-10-21 19:18:22 -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
0a3eec3510
bind: Add information about current utility
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-01-01 09:41:46 -05:00
Sunil Mohan Adapa
ec0a323cb6
bind: Minor i18n updates
- Use a proper i18n label for 'Forwarders' fields instead of auto-generated one.

- Reuse an already used success message for form submission so that a new
  message is not introduced for l10n.

- Minor styling fixes and a yapf run.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2017-12-31 18:42:22 +05:30
James Valleroy
c7c9b200a8
bind: Remove option to enable forwarding
Forwarding is enabled by adding forwarders.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2017-12-31 18:42:12 +05:30
James Valleroy
7dcaee7b43
bind: Don't use forwarders by default
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2017-12-31 18:42:05 +05:30
James Valleroy
3e66e57c0f
bind: Rework getting and changing config
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2017-12-31 18:41:58 +05:30
James Valleroy
3cb95fcbbd
bind: Add tests for config
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2017-12-31 18:41:48 +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
James Valleroy
24943ebe15
bind: Use django's form validation 2017-01-06 19:03:53 -05:00
James Valleroy
8f8d0e8901
bind: Minor fixes and style updates 2017-01-06 18:44:44 -05:00
mridulnagpal
d4b0809db0
bind: Replace config in setup 2017-01-06 18:17:29 -05:00
mridulnagpal
e0abdbd0e9
bind: Add validator 2017-01-06 18:17:27 -05:00
mridulnagpal
0312c41415
bind: Added DNS servers setting 2017-01-06 18:17:25 -05:00
mridulnagpal
d986d58250
bind: Add enable DNSSEC 2017-01-06 18:17:22 -05:00
mridulnagpal
8c0d8e9db2
bind: forwarding works fine now 2017-01-06 18:17:19 -05:00
mridulnagpal
95265426a9
bind: Move setup to action script 2017-01-06 18:17:17 -05:00
mridulnagpal
4a73cbcf3c
bind: Run setup 2017-01-06 18:17:11 -05:00
mridulnagpal
da408d3381
bind: Add basic config 2017-01-06 18:17:06 -05:00
mridulnagpal
8552f43154
Add bind module 2017-01-06 18:16:38 -05:00