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

@ -22,10 +22,13 @@ ${header}
<a class="btn btn-secondary" href="settings/sdr">SDR device settings</a> <a class="btn btn-secondary" href="settings/sdr">SDR device settings</a>
</div> </div>
<div class="col-4"> <div class="col-4">
<a class="btn btn-secondary" href="settings/reporting">Spotting and reporting</a> <a class="btn btn-secondary" href="settings/bookmarks">Bookmark editor</a>
</div> </div>
<div class="col-4"> <div class="col-4">
<a class="btn btn-secondary" href="settings/bookmarks">Bookmark editor</a> <a class="btn btn-secondary" href="settings/backgrounddecoding">Background decoding</a>
</div>
<div class="col-4">
<a class="btn btn-secondary" href="settings/reporting">Spotting and reporting</a>
</div> </div>
<div class="col-4"> <div class="col-4">
<a class="btn btn-secondary" href="features">Feature report</a> <a class="btn btn-secondary" href="features">Feature report</a>

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