_meta unbound #519

This commit is contained in:
Jokob-sk
2023-12-18 07:55:41 +11:00
parent 8e0eb6a480
commit 47a3f7073b
3 changed files with 11 additions and 3 deletions

View File

@@ -125,7 +125,7 @@
{
"function": "alert_down_time",
"type": "integer",
"default_value": 8,
"default_value": 5,
"options": [],
"localized": ["name", "description"],
"name": [

View File

@@ -250,6 +250,11 @@ class Notification_obj:
def construct_notifications(JSON, section):
jsn = JSON[section]
# Return if empty
if jsn == []:
return '',''
tableTitle = JSON[section + "_meta"]["title"]
headers = JSON[section + "_meta"]["columnNames"]

View File

@@ -36,10 +36,13 @@ def get_notifications (db):
# prepare variables for JSON construction
json_new_devices = []
json_new_devices_meta = {}
json_down_devices = []
json_events = []
json_ports = []
json_down_devices_meta = {}
json_events = []
json_events_meta = {}
json_plugins = []
json_plugins_meta = {}
# Disable reporting on events for devices where reporting is disabled based on the MAC address
sql.execute ("""UPDATE Events SET eve_PendingAlertEmail = 0