mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
*: Drop use of module level is_essential flag
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
1 parent
6f791d8806
commit
cf36a9d385
29 files changed
+45
-107
No files matched your search
@@ -17,8 +17,6 @@ from plinth.utils import format_lazy, is_valid_user_name
|
||||
|
||||
version = 9
|
||||
|
||||
is_essential = True
|
||||
|
||||
app = None
|
||||
|
||||
|
||||
@@ -32,8 +30,7 @@ class ApacheApp(app_module.App):
|
||||
super().__init__()
|
||||
|
||||
info = app_module.Info(app_id=self.app_id, version=version,
|
||||
is_essential=is_essential,
|
||||
name=_('Apache HTTP Server'))
|
||||
is_essential=True, name=_('Apache HTTP Server'))
|
||||
self.add(info)
|
||||
|
||||
packages = Packages('packages-apache', [
|
||||
|
||||
@@ -23,8 +23,6 @@ from . import manifest
|
||||
|
||||
version = 1
|
||||
|
||||
is_essential = True
|
||||
|
||||
depends = ['names']
|
||||
|
||||
_description = [
|
||||
@@ -51,8 +49,8 @@ class AvahiApp(app_module.App):
|
||||
super().__init__()
|
||||
|
||||
info = app_module.Info(app_id=self.app_id, version=version,
|
||||
name=_('Service Discovery'), icon='fa-compass',
|
||||
description=_description,
|
||||
is_essential=True, name=_('Service Discovery'),
|
||||
icon='fa-compass', description=_description,
|
||||
manual_page='ServiceDiscovery')
|
||||
self.add(info)
|
||||
|
||||
|
||||
@@ -25,8 +25,6 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
version = 3
|
||||
|
||||
is_essential = True
|
||||
|
||||
depends = ['storage']
|
||||
|
||||
_description = [
|
||||
@@ -50,9 +48,9 @@ class BackupsApp(app_module.App):
|
||||
super().__init__()
|
||||
|
||||
info = app_module.Info(
|
||||
app_id=self.app_id, version=version, depends=depends,
|
||||
name=_('Backups'), icon='fa-files-o', description=_description,
|
||||
manual_page='Backups',
|
||||
app_id=self.app_id, version=version, is_essential=True,
|
||||
depends=depends, name=_('Backups'), icon='fa-files-o',
|
||||
description=_description, manual_page='Backups',
|
||||
donation_url='https://www.borgbackup.org/support/fund.html')
|
||||
self.add(info)
|
||||
|
||||
|
||||
@@ -22,8 +22,6 @@ from . import manifest, utils
|
||||
|
||||
version = 1
|
||||
|
||||
is_essential = True
|
||||
|
||||
_description = [
|
||||
format_lazy(
|
||||
_('Cockpit is a server manager that makes it easy to administer '
|
||||
@@ -61,7 +59,7 @@ class CockpitApp(app_module.App):
|
||||
super().__init__()
|
||||
|
||||
info = app_module.Info(app_id=self.app_id, version=version,
|
||||
is_essential=is_essential, name=_('Cockpit'),
|
||||
is_essential=True, name=_('Cockpit'),
|
||||
icon='fa-wrench', icon_filename='cockpit',
|
||||
short_description=_('Server Administration'),
|
||||
description=_description, manual_page='Cockpit',
|
||||
|
||||
@@ -21,8 +21,6 @@ from plinth.signals import domain_added
|
||||
|
||||
version = 3
|
||||
|
||||
is_essential = True
|
||||
|
||||
_description = [
|
||||
_('Here you can set some general configuration options '
|
||||
'like hostname, domain name, webserver home page etc.')
|
||||
@@ -52,7 +50,7 @@ class ConfigApp(app_module.App):
|
||||
"""Create components for the app."""
|
||||
super().__init__()
|
||||
info = app_module.Info(app_id=self.app_id, version=version,
|
||||
is_essential=is_essential, depends=depends,
|
||||
is_essential=True, depends=depends,
|
||||
name=_('General Configuration'), icon='fa-cog',
|
||||
description=_description,
|
||||
manual_page='Configure')
|
||||
|
||||
@@ -16,8 +16,6 @@ from . import manifest
|
||||
|
||||
version = 2
|
||||
|
||||
is_essential = True
|
||||
|
||||
_description = [
|
||||
_('Network time server is a program that maintains the system time '
|
||||
'in synchronization with servers on the Internet.')
|
||||
@@ -63,9 +61,8 @@ class DateTimeApp(app_module.App):
|
||||
super().__init__()
|
||||
|
||||
info = app_module.Info(app_id=self.app_id, version=version,
|
||||
is_essential=is_essential,
|
||||
name=_('Date & Time'), icon='fa-clock-o',
|
||||
description=_description,
|
||||
is_essential=True, name=_('Date & Time'),
|
||||
icon='fa-clock-o', description=_description,
|
||||
manual_page='DateTime')
|
||||
self.add(info)
|
||||
|
||||
|
||||
@@ -21,8 +21,6 @@ from . import manifest
|
||||
|
||||
version = 1
|
||||
|
||||
is_essential = True
|
||||
|
||||
_description = [
|
||||
_('The system diagnostic test will run a number of checks on your '
|
||||
'system to confirm that applications and services are working as '
|
||||
@@ -49,9 +47,8 @@ class DiagnosticsApp(app_module.App):
|
||||
"""Create components for the app."""
|
||||
super().__init__()
|
||||
info = app_module.Info(app_id=self.app_id, version=version,
|
||||
is_essential=is_essential,
|
||||
name=_('Diagnostics'), icon='fa-heartbeat',
|
||||
description=_description,
|
||||
is_essential=True, name=_('Diagnostics'),
|
||||
icon='fa-heartbeat', description=_description,
|
||||
manual_page='Diagnostics')
|
||||
self.add(info)
|
||||
|
||||
|
||||
@@ -19,8 +19,6 @@ from . import manifest
|
||||
|
||||
version = 1
|
||||
|
||||
is_essential = True
|
||||
|
||||
depends = ['names']
|
||||
|
||||
_description = [
|
||||
@@ -52,7 +50,7 @@ class DynamicDNSApp(app_module.App):
|
||||
super().__init__()
|
||||
|
||||
info = app_module.Info(app_id=self.app_id, version=version,
|
||||
is_essential=is_essential, depends=depends,
|
||||
is_essential=True, depends=depends,
|
||||
name=_('Dynamic DNS Client'), icon='fa-refresh',
|
||||
description=_description,
|
||||
manual_page='DynamicDNS')
|
||||
|
||||
@@ -23,8 +23,6 @@ glib = import_from_gi('GLib', '2.0')
|
||||
|
||||
version = 2
|
||||
|
||||
is_essential = True
|
||||
|
||||
_description = [
|
||||
format_lazy(
|
||||
_('Firewall is a security system that controls the incoming and '
|
||||
@@ -61,7 +59,7 @@ class FirewallApp(app_module.App):
|
||||
super().__init__()
|
||||
|
||||
info = app_module.Info(app_id=self.app_id, version=version,
|
||||
is_essential=is_essential, name=_('Firewall'),
|
||||
is_essential=True, name=_('Firewall'),
|
||||
icon='fa-shield', description=_description,
|
||||
manual_page='Firewall')
|
||||
self.add(info)
|
||||
|
||||
@@ -13,8 +13,6 @@ from plinth.signals import post_setup
|
||||
|
||||
version = 1
|
||||
|
||||
is_essential = True
|
||||
|
||||
first_boot_steps = [
|
||||
{
|
||||
'id': 'firstboot_welcome',
|
||||
@@ -42,6 +40,12 @@ class FirstBootApp(app.App):
|
||||
def __init__(self):
|
||||
"""Create components for the app."""
|
||||
super().__init__()
|
||||
|
||||
info = app.Info(app_id=self.app_id, version=version, is_essential=True)
|
||||
self.add(info)
|
||||
|
||||
def post_init(self):
|
||||
"""Perform post initialization operations."""
|
||||
post_setup.connect(_clear_first_boot_steps)
|
||||
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@ from plinth import cfg, menu, web_server
|
||||
|
||||
version = 1
|
||||
|
||||
is_essential = True
|
||||
app = None
|
||||
|
||||
|
||||
@@ -27,7 +26,7 @@ class HelpApp(app_module.App):
|
||||
super().__init__()
|
||||
|
||||
info = app_module.Info(app_id=self.app_id, version=version,
|
||||
is_essential=is_essential)
|
||||
is_essential=True)
|
||||
self.add(info)
|
||||
|
||||
menu_item = menu.Menu('menu-help', _('Documentation'), None, 'fa-book',
|
||||
|
||||
@@ -25,8 +25,6 @@ from . import components, manifest
|
||||
|
||||
version = 3
|
||||
|
||||
is_essential = True
|
||||
|
||||
depends = ['names']
|
||||
|
||||
_description = [
|
||||
@@ -61,7 +59,7 @@ class LetsEncryptApp(app_module.App):
|
||||
super().__init__()
|
||||
|
||||
info = app_module.Info(app_id=self.app_id, version=version,
|
||||
is_essential=is_essential, depends=depends,
|
||||
is_essential=True, depends=depends,
|
||||
name=_('Let\'s Encrypt'), icon='fa-lock',
|
||||
short_description=_('Certificates'),
|
||||
description=_description,
|
||||
|
||||
@@ -17,8 +17,6 @@ from . import components, manifest
|
||||
|
||||
version = 1
|
||||
|
||||
is_essential = True
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
_description = [
|
||||
@@ -42,9 +40,8 @@ class NamesApp(app_module.App):
|
||||
"""Create components for the app."""
|
||||
super().__init__()
|
||||
info = app_module.Info(app_id=self.app_id, version=version,
|
||||
is_essential=is_essential,
|
||||
name=_('Name Services'), icon='fa-tags',
|
||||
description=_description,
|
||||
is_essential=True, name=_('Name Services'),
|
||||
icon='fa-tags', description=_description,
|
||||
manual_page='NameServices')
|
||||
self.add(info)
|
||||
|
||||
|
||||
@@ -16,8 +16,6 @@ from plinth.package import Packages
|
||||
|
||||
version = 1
|
||||
|
||||
is_essential = True
|
||||
|
||||
first_boot_steps = [
|
||||
{
|
||||
'id': 'network_topology_wizard',
|
||||
@@ -58,7 +56,7 @@ class NetworksApp(app_module.App):
|
||||
super().__init__()
|
||||
|
||||
info = app_module.Info(app_id=self.app_id, version=version,
|
||||
is_essential=is_essential, name=_('Networks'),
|
||||
is_essential=True, name=_('Networks'),
|
||||
icon='fa-signal', description=_description,
|
||||
manual_page='Networks')
|
||||
self.add(info)
|
||||
|
||||
@@ -12,8 +12,6 @@ from . import manifest
|
||||
|
||||
version = 1
|
||||
|
||||
is_essential = True
|
||||
|
||||
_description = [_('Restart or shut down the system.')]
|
||||
|
||||
app = None
|
||||
@@ -29,7 +27,7 @@ class PowerApp(app_module.App):
|
||||
super().__init__()
|
||||
|
||||
info = app_module.Info(app_id=self.app_id, version=version,
|
||||
is_essential=is_essential, name=_('Power'),
|
||||
is_essential=True, name=_('Power'),
|
||||
description=_description, manual_page='Power')
|
||||
self.add(info)
|
||||
|
||||
|
||||
@@ -21,8 +21,6 @@ from . import manifest
|
||||
|
||||
version = 1
|
||||
|
||||
is_essential = False
|
||||
|
||||
_description = [
|
||||
_('Privoxy is a non-caching web proxy with advanced filtering '
|
||||
'capabilities for enhancing privacy, modifying web page data and '
|
||||
|
||||
@@ -20,8 +20,6 @@ from . import manifest
|
||||
|
||||
version = 7
|
||||
|
||||
is_essential = True
|
||||
|
||||
ACCESS_CONF_FILE = '/etc/security/access.d/50freedombox.conf'
|
||||
ACCESS_CONF_FILE_OLD = '/etc/security/access.conf'
|
||||
ACCESS_CONF_SNIPPET = '-:ALL EXCEPT root fbx plinth (admin) (sudo):ALL'
|
||||
@@ -41,7 +39,7 @@ class SecurityApp(app_module.App):
|
||||
super().__init__()
|
||||
|
||||
info = app_module.Info(app_id=self.app_id, version=version,
|
||||
is_essential=is_essential, name=_('Security'),
|
||||
is_essential=True, name=_('Security'),
|
||||
icon='fa-lock', manual_page='Security')
|
||||
self.add(info)
|
||||
|
||||
|
||||
@@ -20,8 +20,6 @@ from . import manifest
|
||||
|
||||
version = 4
|
||||
|
||||
is_essential = True
|
||||
|
||||
_description = [
|
||||
_('Snapshots allows creating and managing btrfs file system snapshots. '
|
||||
'These can be used to roll back the system to a previously known '
|
||||
@@ -53,8 +51,8 @@ class SnapshotApp(app_module.App):
|
||||
super().__init__()
|
||||
|
||||
info = app_module.Info(app_id=self.app_id, version=version,
|
||||
name=_('Storage Snapshots'), icon='fa-film',
|
||||
description=_description,
|
||||
is_essential=True, name=_('Storage Snapshots'),
|
||||
icon='fa-film', description=_description,
|
||||
manual_page='Snapshots')
|
||||
self.add(info)
|
||||
|
||||
|
||||
@@ -21,8 +21,6 @@ from . import manifest
|
||||
|
||||
version = 1
|
||||
|
||||
is_essential = True
|
||||
|
||||
_description = [
|
||||
_('A Secure Shell server uses the secure shell protocol to accept '
|
||||
'connections from remote computers. An authorized remote computer '
|
||||
@@ -43,7 +41,7 @@ class SSHApp(app_module.App):
|
||||
super().__init__()
|
||||
|
||||
info = app_module.Info(app_id=self.app_id, version=version,
|
||||
is_essential=is_essential,
|
||||
is_essential=True,
|
||||
name=_('Secure Shell (SSH) Server'),
|
||||
icon='fa-terminal', description=_description)
|
||||
self.add(info)
|
||||
|
||||
@@ -11,8 +11,6 @@ from plinth.package import Packages
|
||||
|
||||
version = 1
|
||||
|
||||
is_essential = True
|
||||
|
||||
depends = ['security', 'apache']
|
||||
|
||||
app = None
|
||||
@@ -27,7 +25,7 @@ class SSOApp(app_module.App):
|
||||
super().__init__()
|
||||
|
||||
info = app_module.Info(app_id=self.app_id, version=version,
|
||||
is_essential=is_essential, depends=depends,
|
||||
is_essential=True, depends=depends,
|
||||
name=_('Single Sign On'))
|
||||
self.add(info)
|
||||
|
||||
|
||||
@@ -33,8 +33,6 @@ _description = [
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
is_essential = True
|
||||
|
||||
app = None
|
||||
|
||||
|
||||
@@ -50,7 +48,7 @@ class StorageApp(app_module.App):
|
||||
super().__init__()
|
||||
|
||||
info = app_module.Info(app_id=self.app_id, version=version,
|
||||
is_essential=is_essential, name=_('Storage'),
|
||||
is_essential=True, name=_('Storage'),
|
||||
icon='fa-hdd-o', description=_description,
|
||||
manual_page='Storage')
|
||||
self.add(info)
|
||||
|
||||
@@ -24,8 +24,6 @@ from . import manifest
|
||||
|
||||
version = 9
|
||||
|
||||
is_essential = True
|
||||
|
||||
first_boot_steps = [
|
||||
{
|
||||
'id': 'backports_wizard',
|
||||
@@ -73,7 +71,7 @@ class UpgradesApp(app_module.App):
|
||||
super().__init__()
|
||||
|
||||
info = app_module.Info(app_id=self.app_id, version=version,
|
||||
is_essential=is_essential, name=_('Update'),
|
||||
is_essential=True, name=_('Update'),
|
||||
icon='fa-refresh', description=_description,
|
||||
manual_page='Upgrades')
|
||||
self.add(info)
|
||||
|
||||
@@ -19,8 +19,6 @@ from .components import UsersAndGroups
|
||||
|
||||
version = 3
|
||||
|
||||
is_essential = True
|
||||
|
||||
first_boot_steps = [
|
||||
{
|
||||
'id': 'users_firstboot',
|
||||
@@ -56,9 +54,9 @@ class UsersApp(app_module.App):
|
||||
super().__init__()
|
||||
|
||||
info = app_module.Info(app_id=self.app_id, version=version,
|
||||
is_essential=is_essential,
|
||||
name=_('Users and Groups'), icon='fa-users',
|
||||
description=_description, manual_page='Users')
|
||||
is_essential=True, name=_('Users and Groups'),
|
||||
icon='fa-users', description=_description,
|
||||
manual_page='Users')
|
||||
self.add(info)
|
||||
|
||||
menu_item = menu.Menu('menu-users', info.name, None, info.icon,
|
||||
|
||||
Reference in new issue
Block a user