NEWDEV IP filter + dark pach for overlay #539 🆕
This commit is contained in:
@@ -723,3 +723,6 @@ input[type="password"]::-webkit-caps-lock-indicator {
|
|||||||
top: 0.01em;
|
top: 0.01em;
|
||||||
font-size: 3.25em;
|
font-size: 3.25em;
|
||||||
}
|
}
|
||||||
|
.pa_semitransparent-panel{
|
||||||
|
background-color: #000 !important;
|
||||||
|
}
|
||||||
@@ -38,7 +38,27 @@
|
|||||||
"description": [
|
"description": [
|
||||||
{
|
{
|
||||||
"language_code": "en_us",
|
"language_code": "en_us",
|
||||||
"string": "List of MACs to ignore. Use <code>%</code> as a wildcard. <br/><br/>For example <code>02:42:ac:%</code> to filter out docker containers."
|
"string": "List of MACs to ignore. Use <code>%</code> as a wildcard. Ignored devices will not be shown anywhere in the UI or notifications. <br/><br/>For example <code>02:42:ac:%</code> to filter out docker containers."
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"function": "ignored_IPs",
|
||||||
|
"type": "list",
|
||||||
|
"default_value": [
|
||||||
|
],
|
||||||
|
"options": [],
|
||||||
|
"localized": ["name", "description"],
|
||||||
|
"name": [
|
||||||
|
{
|
||||||
|
"language_code": "en_us",
|
||||||
|
"string": "Ignored IPs"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": [
|
||||||
|
{
|
||||||
|
"language_code": "en_us",
|
||||||
|
"string": "List of IPs to ignore. Use <code>%</code> as a wildcard. Ignored devices will not be shown anywhere in the UI or notifications. <br/><br/>For example <code>192.168.3.%</code> to filter out a subnet."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -135,6 +135,7 @@ def create_new_devices (db):
|
|||||||
WHERE NOT EXISTS (SELECT 1 FROM Devices
|
WHERE NOT EXISTS (SELECT 1 FROM Devices
|
||||||
WHERE dev_MAC = cur_MAC)
|
WHERE dev_MAC = cur_MAC)
|
||||||
{list_to_where('OR', 'cur_MAC', 'NOT LIKE', get_setting_value('NEWDEV_ignored_MACs'))}
|
{list_to_where('OR', 'cur_MAC', 'NOT LIKE', get_setting_value('NEWDEV_ignored_MACs'))}
|
||||||
|
{list_to_where('OR', 'cur_IP', 'NOT LIKE', get_setting_value('NEWDEV_ignored_IPs'))}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
@@ -151,6 +152,7 @@ def create_new_devices (db):
|
|||||||
WHERE NOT EXISTS (SELECT 1 FROM Sessions
|
WHERE NOT EXISTS (SELECT 1 FROM Sessions
|
||||||
WHERE ses_MAC = cur_MAC)
|
WHERE ses_MAC = cur_MAC)
|
||||||
{list_to_where('OR', 'cur_MAC', 'NOT LIKE', get_setting_value('NEWDEV_ignored_MACs'))}
|
{list_to_where('OR', 'cur_MAC', 'NOT LIKE', get_setting_value('NEWDEV_ignored_MACs'))}
|
||||||
|
{list_to_where('OR', 'cur_IP', 'NOT LIKE', get_setting_value('NEWDEV_ignored_IPs'))}
|
||||||
""")
|
""")
|
||||||
|
|
||||||
# Create new devices from CurrentScan
|
# Create new devices from CurrentScan
|
||||||
@@ -203,6 +205,7 @@ def create_new_devices (db):
|
|||||||
FROM CurrentScan
|
FROM CurrentScan
|
||||||
WHERE 1=1
|
WHERE 1=1
|
||||||
{list_to_where('OR', 'cur_MAC', 'NOT LIKE', get_setting_value('NEWDEV_ignored_MACs'))}
|
{list_to_where('OR', 'cur_MAC', 'NOT LIKE', get_setting_value('NEWDEV_ignored_MACs'))}
|
||||||
|
{list_to_where('OR', 'cur_IP', 'NOT LIKE', get_setting_value('NEWDEV_ignored_IPs'))}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user