mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2025-10-27 08:49:27 +00:00
Start adding filters #7
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user