separate background decoding

This commit is contained in:
Jakob Ketterl
2021-02-15 15:56:17 +01:00
parent d998ab5c61
commit e61dde7d0e
4 changed files with 33 additions and 11 deletions

View File

@ -0,0 +1,20 @@
from owrx.controllers.settings import SettingsFormController, Section
from owrx.form import CheckboxInput, ServicesCheckboxInput
class BackgroundDecodingController(SettingsFormController):
def getTitle(self):
return "Background decoding"
def getSections(self):
return [
Section(
"Background decoding",
CheckboxInput(
"services_enabled",
"Service",
checkboxText="Enable background decoding services",
),
ServicesCheckboxInput("services_decoders", "Enabled services"),
),
]

View File

@ -203,15 +203,6 @@ class GeneralSettingsController(SettingsFormController):
),
Q65ModeMatrix("q65_enabled_combinations", "Enabled Q65 Mode combinations"),
),
Section(
"Background decoding",
CheckboxInput(
"services_enabled",
"Service",
checkboxText="Enable background decoding services",
),
ServicesCheckboxInput("services_decoders", "Enabled services"),
),
]
def handle_image(self, data, image_id):

View File

@ -8,6 +8,7 @@ from owrx.controllers.settings import SettingsController
from owrx.controllers.settings.general import GeneralSettingsController
from owrx.controllers.settings.sdr import SdrSettingsController
from owrx.controllers.settings.reporting import ReportingController
from owrx.controllers.settings.backgrounddecoding import BackgroundDecodingController
from owrx.controllers.bookmarks import BookmarksController
from owrx.controllers.session import SessionController
from owrx.controllers.profile import ProfileController
@ -123,6 +124,13 @@ class Router(object):
StaticRoute(
"/settings/reporting", ReportingController, method="POST", options={"action": "processFormData"}
),
StaticRoute("/settings/backgrounddecoding", BackgroundDecodingController),
StaticRoute(
"/settings/backgrounddecoding",
BackgroundDecodingController,
method="POST",
options={"action": "processFormData"},
),
StaticRoute("/login", SessionController, options={"action": "loginAction"}),
StaticRoute("/login", SessionController, method="POST", options={"action": "processLoginAction"}),
StaticRoute("/logout", SessionController, options={"action": "logoutAction"}),