Replace pages' use of the options call with directly building the HTML components using templates, as the syntax is much nicer. Use a common set of data provided to all modules via pagetemplate.py instead of passing things like web_ui_options around. Closes #153

This commit is contained in:
Ian Renton
2026-09-25 21:22:31 +01:00
parent 4df00c321c
commit 8de163469b
27 changed files with 493 additions and 534 deletions
+3 -15
View File
@@ -161,11 +161,7 @@ class WebServer:
APIDxStatsHandler,
{"spots": self._data_store.spots},
),
(
r"/api/v3/options",
APIOptionsHandler,
{"status_data": self._data_store.status.get()},
),
(r"/api/v3/options", APIOptionsHandler),
(
r"/api/v3/status",
APIStatusHandler,
@@ -216,11 +212,7 @@ class WebServer:
V2APIDxStatsHandler,
{"spots": self._data_store.spots},
),
(
r"/api/v2/options",
V2APIOptionsHandler,
{"status_data": self._data_store.status.get()},
),
(r"/api/v2/options", V2APIOptionsHandler),
(
r"/api/v2/status",
V2APIStatusHandler,
@@ -271,11 +263,7 @@ class WebServer:
V1APIDxStatsHandler,
{"spots": self._data_store.spots},
),
(
r"/api/v1/options",
V1APIOptionsHandler,
{"status_data": self._data_store.status.get()},
),
(r"/api/v1/options", V1APIOptionsHandler),
(
r"/api/v1/status",
V1APIStatusHandler,