add option to filter ssids
This commit is contained in:
parent
06797a99b8
commit
0aa96f3b9c
2 changed files with 4 additions and 0 deletions
|
@ -145,6 +145,8 @@ class LocatorPoint(namedtuple('LocatorPoint', ('x', 'y', 'values'))):
|
||||||
def convert_scan(cls, scan, stations: LocatorStations, create=False):
|
def convert_scan(cls, scan, stations: LocatorStations, create=False):
|
||||||
values = {}
|
values = {}
|
||||||
for scan_value in scan:
|
for scan_value in scan:
|
||||||
|
if settings.WIFI_SSIDS and scan_value['ssid'] not in settings.WIFI_SSIDS:
|
||||||
|
continue
|
||||||
station_id = stations.get(bssid=scan_value['bssid'], ssid=scan_value['ssid'],
|
station_id = stations.get(bssid=scan_value['bssid'], ssid=scan_value['ssid'],
|
||||||
frequency=scan_value['frequency'], create=create)
|
frequency=scan_value['frequency'], create=create)
|
||||||
if station_id is not None:
|
if station_id is not None:
|
||||||
|
|
|
@ -333,6 +333,8 @@ HEADER_BACKGROUND_COLOR = config.get('c3nav', 'header_background_color', fallbac
|
||||||
HEADER_TEXT_COLOR = config.get('c3nav', 'header_text_color', fallback='')
|
HEADER_TEXT_COLOR = config.get('c3nav', 'header_text_color', fallback='')
|
||||||
HEADER_TEXT_HOVER_COLOR = config.get('c3nav', 'header_text_hover_color', fallback='')
|
HEADER_TEXT_HOVER_COLOR = config.get('c3nav', 'header_text_hover_color', fallback='')
|
||||||
|
|
||||||
|
WIFI_SSIDS = [n for n in config.get('c3nav', 'wifi_ssids', fallback='').split(',') if n]
|
||||||
|
|
||||||
|
|
||||||
LIBSASS_CUSTOM_FUNCTIONS = {
|
LIBSASS_CUSTOM_FUNCTIONS = {
|
||||||
'primary_color': lambda: PRIMARY_COLOR,
|
'primary_color': lambda: PRIMARY_COLOR,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue