mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
@@ -527,6 +527,34 @@
|
||||
"string": "All NTFY messages have a priority, which defines how urgently your phone notifies you. On Android, you can set custom notification sounds and vibration patterns on your phone to map to these priorities (see <a href=\"https://docs.ntfy.sh/subscribe/phone/\">Android config</a>)."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "VERIFY_SSL",
|
||||
"type": {
|
||||
"dataType": "boolean",
|
||||
"elements": [
|
||||
{
|
||||
"elementType": "input",
|
||||
"elementOptions": [{ "type": "checkbox" }],
|
||||
"transformers": []
|
||||
}
|
||||
]
|
||||
},
|
||||
"default_value": false,
|
||||
"options": [],
|
||||
"localized": ["name", "description"],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Verify SSL"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Enable TLS support. Disable if you are using a self-signed certificate."
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -98,6 +98,7 @@ def send(html, text):
|
||||
token = get_setting_value('NTFY_TOKEN')
|
||||
user = get_setting_value('NTFY_USER')
|
||||
pwd = get_setting_value('NTFY_PASSWORD')
|
||||
verify_ssl = get_setting_value('NTFY_VERIFY_SSL')
|
||||
|
||||
# prepare request headers
|
||||
headers = {
|
||||
@@ -121,7 +122,8 @@ def send(html, text):
|
||||
response = requests.post("{}/{}".format( get_setting_value('NTFY_HOST'),
|
||||
get_setting_value('NTFY_TOPIC')),
|
||||
data = text,
|
||||
headers = headers)
|
||||
headers = headers,
|
||||
verify = verify_ssl)
|
||||
|
||||
response_status_code = response.status_code
|
||||
|
||||
|
||||
@@ -1373,13 +1373,43 @@
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Network Node"
|
||||
"string": "Parent Node"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "The MAC address of the network node."
|
||||
"string": "The MAC address of the Parent network node."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "devParentRelType",
|
||||
"type": {
|
||||
"dataType": "string",
|
||||
"elements": [
|
||||
{ "elementType": "select", "elementOptions": [], "transformers": [] }
|
||||
]
|
||||
},
|
||||
"default_value": "default",
|
||||
"options": [
|
||||
"default",
|
||||
"child",
|
||||
"logical",
|
||||
"nic",
|
||||
"virtual"
|
||||
],
|
||||
"localized": ["name", "description"],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Relationship Type"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Defines the relationship between this device and its parent. Selecting <code>nic</code> links it as a network interface, allowing the parent’s online status to be evaluated using its <code>devReqNicsOnline</code> (“Require NICs Online”) setting. Some relationship types may hide the device from lists; see the <code>UI_hide_rel_types</code> setting for details."
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -1404,7 +1434,7 @@
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Network Node Port"
|
||||
"string": "Parent Node Port"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
@@ -1414,6 +1444,34 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "devChildrenDynamic",
|
||||
"type": {
|
||||
"dataType": "array",
|
||||
"elements": [
|
||||
{
|
||||
"elementType": "select",
|
||||
"elementOptions": [{ "multiple": "true", "ordeable": "true", "readonly": "true" }],
|
||||
"transformers": ["deviceChip"]
|
||||
}
|
||||
]
|
||||
},
|
||||
"default_value": [],
|
||||
"options": [],
|
||||
"localized": ["name", "description"],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Children Nodes"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Children nodes assigned to this device. Navigate to the child device directly to edit the relationship and details."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "devSSID",
|
||||
"type": {
|
||||
@@ -1665,6 +1723,41 @@
|
||||
"string": "Fully Qualified Domain Name - Autodetected and Uneditable. Can be auto-refreshed by enabling the <code>REFRESH_FQDN</code> setting."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "devReqNicsOnline",
|
||||
"type": {
|
||||
"dataType": "integer",
|
||||
"elements": [
|
||||
{
|
||||
"elementType": "input",
|
||||
"elementOptions": [
|
||||
{
|
||||
"type": "checkbox"
|
||||
}
|
||||
],
|
||||
"transformers": []
|
||||
}
|
||||
]
|
||||
},
|
||||
"default_value": 0,
|
||||
"options": [],
|
||||
"localized": [
|
||||
"name",
|
||||
"description"
|
||||
],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Require NICs Online"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Indicates whether this device should be considered online only if all associated NICs (devices with the <code>nic</code> relationship type) are online. If disabled, the device is considered online if any NIC is online."
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"required": [],
|
||||
|
||||
@@ -378,7 +378,9 @@
|
||||
"Device_TableHead_PresentLastScan",
|
||||
"Device_TableHead_AlertDown",
|
||||
"Device_TableHead_CustomProps",
|
||||
"Device_TableHead_FQDN"
|
||||
"Device_TableHead_FQDN",
|
||||
"Device_TableHead_ParentRelType",
|
||||
"Device_TableHead_ReqNicsOnline"
|
||||
],
|
||||
"localized": ["name", "description"],
|
||||
"name": [
|
||||
@@ -515,6 +517,43 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "hide_rel_types",
|
||||
"type": {
|
||||
"dataType": "array",
|
||||
"elements": [
|
||||
{
|
||||
"elementType": "select",
|
||||
"elementOptions": [{ "multiple": "true", "ordeable": "true" }],
|
||||
"transformers": []
|
||||
}
|
||||
]
|
||||
},
|
||||
"maxLength": 50,
|
||||
"default_value": [
|
||||
"nic",
|
||||
"virtual"
|
||||
],
|
||||
"options": [
|
||||
"child",
|
||||
"logical",
|
||||
"nic",
|
||||
"virtual"
|
||||
],
|
||||
"localized": ["name", "description"],
|
||||
"name": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Relationships to hide"
|
||||
}
|
||||
],
|
||||
"description": [
|
||||
{
|
||||
"language_code": "en_us",
|
||||
"string": "Specifies which device relationships to their parent node should be hidden from the devices lists. Devices with a matching <code>devParentRelType</code> will be excluded from most lists."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"function": "hide_empty",
|
||||
"type": {
|
||||
|
||||
Reference in New Issue
Block a user