From e61dde7d0e56b99438e355e05ff27a814226ef8a Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Mon, 15 Feb 2021 15:56:17 +0100 Subject: [PATCH] separate background decoding --- htdocs/settings.html | 7 +++++-- .../settings/backgrounddecoding.py | 20 +++++++++++++++++++ owrx/controllers/settings/general.py | 9 --------- owrx/http.py | 8 ++++++++ 4 files changed, 33 insertions(+), 11 deletions(-) create mode 100644 owrx/controllers/settings/backgrounddecoding.py diff --git a/htdocs/settings.html b/htdocs/settings.html index 91eaa4b..5e4120c 100644 --- a/htdocs/settings.html +++ b/htdocs/settings.html @@ -22,10 +22,13 @@ ${header} SDR device settings
- Spotting and reporting + Bookmark editor
- Bookmark editor + Background decoding +
+
+ Spotting and reporting
Feature report diff --git a/owrx/controllers/settings/backgrounddecoding.py b/owrx/controllers/settings/backgrounddecoding.py new file mode 100644 index 0000000..9ee9596 --- /dev/null +++ b/owrx/controllers/settings/backgrounddecoding.py @@ -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"), + ), + ] diff --git a/owrx/controllers/settings/general.py b/owrx/controllers/settings/general.py index 88db5e4..827bc4d 100644 --- a/owrx/controllers/settings/general.py +++ b/owrx/controllers/settings/general.py @@ -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): diff --git a/owrx/http.py b/owrx/http.py index 24af405..685b988 100644 --- a/owrx/http.py +++ b/owrx/http.py @@ -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"}),