diff --git a/htdocs/admin.html b/htdocs/admin.html
new file mode 100644
index 0000000..d9b8c66
--- /dev/null
+++ b/htdocs/admin.html
@@ -0,0 +1,15 @@
+
+
+
+ OpenWebRX Settings
+
+
+
+
+
+
+${header}
+
+ Admin-only area!
+
+
\ No newline at end of file
diff --git a/htdocs/gfx/openwebrx-panel-settings.png b/htdocs/gfx/openwebrx-panel-settings.png
new file mode 100644
index 0000000..b209b87
Binary files /dev/null and b/htdocs/gfx/openwebrx-panel-settings.png differ
diff --git a/htdocs/include/header.include.html b/htdocs/include/header.include.html
index 8bba3c8..13591cc 100644
--- a/htdocs/include/header.include.html
+++ b/htdocs/include/header.include.html
@@ -19,6 +19,7 @@
Log
Receiver
Map
+ Settings
diff --git a/owrx/controllers/settings.py b/owrx/controllers/admin.py
similarity index 81%
rename from owrx/controllers/settings.py
rename to owrx/controllers/admin.py
index 748c646..a775068 100644
--- a/owrx/controllers/settings.py
+++ b/owrx/controllers/admin.py
@@ -1,4 +1,4 @@
-from . import Controller
+from .template import WebpageController
from .session import SessionStorage
@@ -10,7 +10,7 @@ class Authentication(object):
return False
-class SettingsController(Controller):
+class AdminController(WebpageController):
def __init__(self, handler, request, options):
self.authentication = Authentication()
super().__init__(handler, request, options)
@@ -22,4 +22,4 @@ class SettingsController(Controller):
self.send_redirect("/login")
def indexAction(self):
- self.send_response("actual content here")
+ self.serve_template("admin.html", **self.template_variables())
diff --git a/owrx/controllers/session.py b/owrx/controllers/session.py
index bb40bd4..7ebd1b1 100644
--- a/owrx/controllers/session.py
+++ b/owrx/controllers/session.py
@@ -47,7 +47,7 @@ class SessionController(WebpageController):
key = SessionStorage.getSharedInstance().startSession({"user": data["user"]})
cookie = SimpleCookie()
cookie["owrx-session"] = key
- self.send_redirect("/settings", cookies=cookie)
+ self.send_redirect("/admin", cookies=cookie)
else:
self.send_redirect("/login")
else:
diff --git a/owrx/http.py b/owrx/http.py
index 07d7867..86fa8f1 100644
--- a/owrx/http.py
+++ b/owrx/http.py
@@ -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
+from owrx.controllers.admin import AdminController
from owrx.controllers.session import SessionController
from http.server import BaseHTTPRequestHandler
from urllib.parse import urlparse, parse_qs
@@ -100,7 +100,7 @@ class Router(object):
StaticRoute("/features", FeatureController),
StaticRoute("/api/features", ApiController),
StaticRoute("/metrics", MetricsController),
- StaticRoute("/settings", SettingsController),
+ StaticRoute("/admin", AdminController),
StaticRoute("/login", SessionController, options={"action": "loginAction"}),
StaticRoute("/login", SessionController, method="POST", options={"action": "processLoginAction"}),
StaticRoute("/logout", SessionController, options={"action": "logoutAction"}),