components: Introduce new component - Packages

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil: isort all files]
[sunil: Remove component in datetime component as managed_packages is empty]
[sunil: Minor refactor in minidlna for consistency]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
Joseph Nuthalapati authored and Sunil Mohan Adapa committed 2021-11-08 16:03:42 -08:00
1 parent ff0dc01023
commit cd4bd17173
55 files changed
+272 -15

No files matched your search

+5
View File
@@ -17,6 +17,7 @@ from django.utils.translation import gettext_noop
from plinth import actions
from plinth import app as app_module
from plinth import cfg, glib, menu
from plinth.package import Packages
from . import api
@@ -49,6 +50,7 @@ class BackupsApp(app_module.App):
def __init__(self):
"""Create components for the app."""
super().__init__()
info = app_module.Info(
app_id=self.app_id, version=version, depends=depends,
name=_('Backups'), icon='fa-files-o', description=_description,
@@ -60,6 +62,9 @@ class BackupsApp(app_module.App):
'backups:index', parent_url_name='system')
self.add(menu_item)
packages = Packages('packages-backups', managed_packages)
self.add(packages)
# Check every hour (every 3 minutes in debug mode) to perform scheduled
# backups.
interval = 180 if cfg.develop else 3600