separate page for sdr settings

This commit is contained in:
Jakob Ketterl 2020-04-25 21:55:52 +02:00
parent b874583931
commit 9942b3baf2
4 changed files with 28 additions and 2 deletions

View File

@ -14,7 +14,7 @@
${header}
<div class="container">
<div class="col-12">
<h1>Settings</h1>
<h1>General settings</h1>
</div>
${sections}
</div>

20
htdocs/sdrsettings.html Normal file
View File

@ -0,0 +1,20 @@
<!DOCTYPE HTML>
<html>
<head>
<title>OpenWebRX Settings</title>
<link rel="shortcut icon" type="image/x-icon" href="static/favicon.ico" />
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="static/css/admin.css" />
<script src="static/lib/jquery-3.2.1.min.js"></script>
<script src="https://unpkg.com/location-picker/dist/location-picker.min.js"></script>
<script src="static/settings.js"></script>
<meta charset="utf-8">
</head>
<body>
${header}
<div class="container">
<div class="col-12">
<h1>SDR device settings</h1>
</div>
</div>
</body>

View File

@ -48,6 +48,11 @@ class SettingsController(AdminController):
self.serve_template("settings.html", **self.template_variables())
class SdrSettingsController(AdminController):
def indexAction(self):
self.serve_template("sdrsettings.html", **self.template_variables())
class GeneralSettingsController(AdminController):
sections = [
Section(

View File

@ -11,7 +11,7 @@ from owrx.controllers.assets import (
from owrx.controllers.websocket import WebSocketController
from owrx.controllers.api import ApiController
from owrx.controllers.metrics import MetricsController
from owrx.controllers.settings import SettingsController, GeneralSettingsController
from owrx.controllers.settings import SettingsController, GeneralSettingsController, SdrSettingsController
from owrx.controllers.session import SessionController
from http.server import BaseHTTPRequestHandler
from urllib.parse import urlparse, parse_qs
@ -103,6 +103,7 @@ class Router(object):
StaticRoute("/settings", SettingsController),
StaticRoute("/generalsettings", GeneralSettingsController),
StaticRoute("/generalsettings", GeneralSettingsController, method="POST", options={"action": "processFormData"}),
StaticRoute("/sdrsettings", SdrSettingsController),
StaticRoute("/login", SessionController, options={"action": "loginAction"}),
StaticRoute("/login", SessionController, method="POST", options={"action": "processLoginAction"}),
StaticRoute("/logout", SessionController, options={"action": "logoutAction"}),