ntfy disable cert #1117, initial nics work #724

This commit is contained in:
jokob-sk
2025-07-12 15:40:08 +10:00
parent 7980554924
commit 6f536f9952
35 changed files with 539 additions and 78 deletions

View File

@@ -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."
}
]
}
]
}

View File

@@ -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

View File

@@ -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 parents 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": [],

View File

@@ -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": {