Ignored IPs not applied #836

This commit is contained in:
jokob-sk
2024-10-12 10:49:29 +11:00
parent d6164a005b
commit dcfeb51aa1
23 changed files with 159 additions and 55 deletions

View File

@@ -259,9 +259,13 @@
"function": "CMD",
"type": {
"dataType": "string",
"element": "input",
"elementOptions": ["readonly"],
"transformers": []
"elements": [
{
"elementType": "input",
"elementOptions": [{ "readonly": "true" }],
"transformers": []
}
]
},
"default_value": "python3 /app/front/plugins/<plugin folder>/rename_me.py",
"options": [],

View File

@@ -2,7 +2,7 @@
"code_name": "dhcp_servers",
"unique_prefix": "DHCPSRVS",
"plugin_type": "other",
"execution_order" : "Layer_3",
"execution_order": "Layer_3",
"enabled": true,
"data_source": "script",
"show_ui": true,
@@ -349,7 +349,11 @@
"type": {
"dataType": "string",
"elements": [
{ "elementType": "input", "elementOptions": [], "transformers": [] }
{
"elementType": "input",
"elementOptions": [{ "readonly": "true" }],
"transformers": []
}
]
},
"default_value": "python3 /app/front/plugins/dhcp_servers/script.py",

View File

@@ -125,7 +125,7 @@
"description": [
{
"language_code": "en_us",
"string": "You can specify a SQL where condition to filter out New Devices from notifications. For example <code>AND dev_LastIP NOT LIKE '192.168.3.%'</code> will always exlude New Device notifications for all devices with the IP starting with <code>192.168.3.%</code>."
"string": "You can specify a SQL where condition to filter out New Devices from notifications. For example <code>AND dev_LastIP NOT LIKE '192.168.3.%'</code> will always exclude New Device notifications for all devices with the IP starting with <code>192.168.3.%</code>."
}
]
},
@@ -149,7 +149,7 @@
"description": [
{
"language_code": "en_us",
"string": "You can specify a SQL where condition to filter out Events from notifications. For example <code>AND dev_LastIP NOT LIKE '192.168.3.%'</code> will always exlude New Device notifications for all devices with the IP starting with <code>192.168.3.%</code>."
"string": "You can specify a SQL where condition to filter out Events from notifications. For example <code>AND dev_LastIP NOT LIKE '192.168.3.%'</code> will always exclude New Device notifications for all devices with the IP starting with <code>192.168.3.%</code>."
}
]
}

View File

@@ -238,7 +238,7 @@ def get_ip(*ips: str) -> str:
for ip in ips:
if ip and ip != 'null':
return ip
return '0:0:0:0'
return '0.0.0.0'
# -----------------------------------------------------------------------------