break out reporting into its own settings page
This commit is contained in:
parent
49640b5e33
commit
d998ab5c61
@ -21,6 +21,9 @@ ${header}
|
||||
<div class="col-4">
|
||||
<a class="btn btn-secondary" href="settings/sdr">SDR device settings</a>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<a class="btn btn-secondary" href="settings/reporting">Spotting and reporting</a>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<a class="btn btn-secondary" href="settings/bookmarks">Bookmark editor</a>
|
||||
</div>
|
||||
|
@ -13,9 +13,7 @@ from owrx.form import (
|
||||
Js8ProfileCheckboxInput,
|
||||
MultiCheckboxInput,
|
||||
)
|
||||
from owrx.form.converter import OptionalConverter
|
||||
from owrx.form.receiverid import ReceiverKeysConverter
|
||||
from owrx.form.aprs import AprsBeaconSymbols, AprsAntennaDirections
|
||||
from owrx.form.wfm import WfmTauValues
|
||||
from owrx.form.wsjt import Q65ModeMatrix
|
||||
from owrx.form.gfx import AvatarInput, TopPhotoInput
|
||||
@ -214,84 +212,6 @@ class GeneralSettingsController(SettingsFormController):
|
||||
),
|
||||
ServicesCheckboxInput("services_decoders", "Enabled services"),
|
||||
),
|
||||
Section(
|
||||
"APRS settings",
|
||||
TextInput(
|
||||
"aprs_callsign",
|
||||
"APRS callsign",
|
||||
infotext="This callsign will be used to send data to the APRS-IS network",
|
||||
),
|
||||
CheckboxInput(
|
||||
"aprs_igate_enabled",
|
||||
"APRS I-Gate",
|
||||
checkboxText="Send received APRS data to APRS-IS",
|
||||
),
|
||||
TextInput("aprs_igate_server", "APRS-IS server"),
|
||||
TextInput("aprs_igate_password", "APRS-IS network password"),
|
||||
CheckboxInput(
|
||||
"aprs_igate_beacon",
|
||||
"APRS beacon",
|
||||
checkboxText="Send the receiver position to the APRS-IS network",
|
||||
infotext="Please check that your receiver location is setup correctly before enabling the beacon",
|
||||
),
|
||||
DropdownInput(
|
||||
"aprs_igate_symbol",
|
||||
"APRS beacon symbol",
|
||||
AprsBeaconSymbols,
|
||||
),
|
||||
TextInput(
|
||||
"aprs_igate_comment",
|
||||
"APRS beacon text",
|
||||
infotext="This text will be sent as APRS comment along with your beacon",
|
||||
converter=OptionalConverter(),
|
||||
),
|
||||
NumberInput(
|
||||
"aprs_igate_height",
|
||||
"Antenna height",
|
||||
infotext="Antenna height above average terrain (HAAT)",
|
||||
append="m",
|
||||
converter=OptionalConverter(),
|
||||
),
|
||||
NumberInput(
|
||||
"aprs_igate_gain",
|
||||
"Antenna gain",
|
||||
append="dBi",
|
||||
converter=OptionalConverter(),
|
||||
),
|
||||
DropdownInput("aprs_igate_dir", "Antenna direction", AprsAntennaDirections),
|
||||
),
|
||||
Section(
|
||||
"pskreporter settings",
|
||||
CheckboxInput(
|
||||
"pskreporter_enabled",
|
||||
"Reporting",
|
||||
checkboxText="Enable sending spots to pskreporter.info",
|
||||
),
|
||||
TextInput(
|
||||
"pskreporter_callsign",
|
||||
"pskreporter callsign",
|
||||
infotext="This callsign will be used to send spots to pskreporter.info",
|
||||
),
|
||||
TextInput(
|
||||
"pskreporter_antenna_information",
|
||||
"Antenna information",
|
||||
infotext="Antenna description to be sent along with spots to pskreporter",
|
||||
converter=OptionalConverter(),
|
||||
),
|
||||
),
|
||||
Section(
|
||||
"WSPRnet settings",
|
||||
CheckboxInput(
|
||||
"wsprnet_enabled",
|
||||
"Reporting",
|
||||
checkboxText="Enable sending spots to wsprnet.org",
|
||||
),
|
||||
TextInput(
|
||||
"wsprnet_callsign",
|
||||
"wsprnet callsign",
|
||||
infotext="This callsign will be used to send spots to wsprnet.org",
|
||||
),
|
||||
),
|
||||
]
|
||||
|
||||
def handle_image(self, data, image_id):
|
||||
|
91
owrx/controllers/settings/reporting.py
Normal file
91
owrx/controllers/settings/reporting.py
Normal file
@ -0,0 +1,91 @@
|
||||
from owrx.controllers.settings import SettingsFormController, Section
|
||||
from owrx.form.converter import OptionalConverter
|
||||
from owrx.form.aprs import AprsBeaconSymbols, AprsAntennaDirections
|
||||
from owrx.form import TextInput, CheckboxInput, DropdownInput, NumberInput
|
||||
|
||||
|
||||
class ReportingController(SettingsFormController):
|
||||
def getTitle(self):
|
||||
return "Spotting and Reporting"
|
||||
|
||||
def getSections(self):
|
||||
return [
|
||||
Section(
|
||||
"APRS-IS reporting",
|
||||
CheckboxInput(
|
||||
"aprs_igate_enabled",
|
||||
"APRS I-Gate",
|
||||
checkboxText="Send received APRS data to APRS-IS",
|
||||
),
|
||||
TextInput(
|
||||
"aprs_callsign",
|
||||
"APRS callsign",
|
||||
infotext="This callsign will be used to send data to the APRS-IS network",
|
||||
),
|
||||
TextInput("aprs_igate_server", "APRS-IS server"),
|
||||
TextInput("aprs_igate_password", "APRS-IS network password"),
|
||||
CheckboxInput(
|
||||
"aprs_igate_beacon",
|
||||
"APRS beacon",
|
||||
checkboxText="Send the receiver position to the APRS-IS network",
|
||||
infotext="Please check that your receiver location is setup correctly before enabling the beacon",
|
||||
),
|
||||
DropdownInput(
|
||||
"aprs_igate_symbol",
|
||||
"APRS beacon symbol",
|
||||
AprsBeaconSymbols,
|
||||
),
|
||||
TextInput(
|
||||
"aprs_igate_comment",
|
||||
"APRS beacon text",
|
||||
infotext="This text will be sent as APRS comment along with your beacon",
|
||||
converter=OptionalConverter(),
|
||||
),
|
||||
NumberInput(
|
||||
"aprs_igate_height",
|
||||
"Antenna height",
|
||||
infotext="Antenna height above average terrain (HAAT)",
|
||||
append="m",
|
||||
converter=OptionalConverter(),
|
||||
),
|
||||
NumberInput(
|
||||
"aprs_igate_gain",
|
||||
"Antenna gain",
|
||||
append="dBi",
|
||||
converter=OptionalConverter(),
|
||||
),
|
||||
DropdownInput("aprs_igate_dir", "Antenna direction", AprsAntennaDirections),
|
||||
),
|
||||
Section(
|
||||
"pskreporter settings",
|
||||
CheckboxInput(
|
||||
"pskreporter_enabled",
|
||||
"Reporting",
|
||||
checkboxText="Enable sending spots to pskreporter.info",
|
||||
),
|
||||
TextInput(
|
||||
"pskreporter_callsign",
|
||||
"pskreporter callsign",
|
||||
infotext="This callsign will be used to send spots to pskreporter.info",
|
||||
),
|
||||
TextInput(
|
||||
"pskreporter_antenna_information",
|
||||
"Antenna information",
|
||||
infotext="Antenna description to be sent along with spots to pskreporter",
|
||||
converter=OptionalConverter(),
|
||||
),
|
||||
),
|
||||
Section(
|
||||
"WSPRnet settings",
|
||||
CheckboxInput(
|
||||
"wsprnet_enabled",
|
||||
"Reporting",
|
||||
checkboxText="Enable sending spots to wsprnet.org",
|
||||
),
|
||||
TextInput(
|
||||
"wsprnet_callsign",
|
||||
"wsprnet callsign",
|
||||
infotext="This callsign will be used to send spots to wsprnet.org",
|
||||
),
|
||||
),
|
||||
]
|
@ -7,6 +7,7 @@ from owrx.controllers.metrics import MetricsController
|
||||
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.bookmarks import BookmarksController
|
||||
from owrx.controllers.session import SessionController
|
||||
from owrx.controllers.profile import ProfileController
|
||||
@ -118,6 +119,10 @@ class Router(object):
|
||||
StaticRoute("/settings/bookmarks", BookmarksController, method="POST", options={"action": "new"}),
|
||||
RegexRoute("/settings/bookmarks/(.+)", BookmarksController, method="POST", options={"action": "update"}),
|
||||
RegexRoute("/settings/bookmarks/(.+)", BookmarksController, method="DELETE", options={"action": "delete"}),
|
||||
StaticRoute("/settings/reporting", ReportingController),
|
||||
StaticRoute(
|
||||
"/settings/reporting", ReportingController, 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"}),
|
||||
|
Loading…
Reference in New Issue
Block a user