Alerts DB housekeeping

This commit is contained in:
Alfredo Cardigliano 2021-04-29 19:31:49 +02:00
parent 2620b189fd
commit 92b4ae4828
11 changed files with 42 additions and 72 deletions

View file

@ -228,7 +228,7 @@ function printAlerts()
showElements = false
end
local elementToSwitch = { "dont_emit_flow_alerts", "max_num_alerts_per_entity", "max_num_flow_alerts",
local elementToSwitch = { "dont_emit_flow_alerts", "max_num_alerts_per_entity",
"row_alerts_retention_header", "row_alerts_settings_header", "row_alerts_security_header",
"row_alerts_informative_header",
"row_toggle_device_first_seen_alert", "row_toggle_device_activation_alert", "row_toggle_pool_activation_alert", "row_toggle_quota_exceeded_alert",
@ -282,9 +282,6 @@ function printAlerts()
prefsInputFieldPrefs(subpage_active.entries["max_num_alerts_per_entity"].title, subpage_active.entries["max_num_alerts_per_entity"].description,
"ntopng.prefs.", "max_num_alerts_per_entity", prefs.max_num_alerts_per_entity, "number", showElements, false, nil, {min=1, --[[ TODO check min/max ]]})
prefsInputFieldPrefs(subpage_active.entries["max_num_flow_alerts"].title, subpage_active.entries["max_num_flow_alerts"].description,
"ntopng.prefs.", "max_num_flow_alerts", prefs.max_num_flow_alerts, "number", showElements, false, nil, {min=1, --[[ TODO check min/max ]]})
prefsInputFieldPrefs(subpage_active.entries["max_num_days_before_delete_alert"].title, subpage_active.entries["max_num_days_before_delete_alert"].description,
"ntopng.prefs.", "max_num_days_before_delete_alert", prefs.max_num_days_before_delete_alert, "number", showElements, false, nil, {min=1, tformat="d"--[[ TODO check min/max ]]})