Start adding filters #7

This commit is contained in:
Ian Renton
2025-10-03 09:58:49 +01:00
parent 0e262f68f5
commit 222e3d9c5e
7 changed files with 89 additions and 20 deletions

View File

@@ -8,7 +8,7 @@ import pytz
from bottle import run, response, template
from core.config import MAX_SPOT_AGE
from core.constants import BANDS, ALL_MODES, MODE_TYPES, SIGS, SOURCES, CONTINENTS
from core.constants import BANDS, ALL_MODES, MODE_TYPES, SIGS, CONTINENTS
from core.utils import serialize_everything
@@ -125,6 +125,7 @@ class WebServer:
"modes": ALL_MODES,
"mode_types": MODE_TYPES,
"sigs": SIGS,
"sources": SOURCES,
# Sources are filtered for only ones that are enabled in config, no point letting the user toggle things that aren't even available.
"sources": list(map(lambda p: p["name"], filter(lambda p: p["enabled"], self.status_data["providers"]))),
"continents": CONTINENTS,
"max_spot_age": MAX_SPOT_AGE}