Implements user script for device connection/disconnection alerts

Addresses #4614
This commit is contained in:
Simone Mainardi 2020-10-22 14:27:26 +02:00
parent 0c7429bc2f
commit f65aa2bc19
6 changed files with 165 additions and 130 deletions

View file

@ -306,23 +306,6 @@ function printAlerts()
print('<thead class="thead-light"><tr id="row_alerts_informative_header" ')
if (showElements == false) then print(' style="display:none;"') end
print('><th colspan=2 class="info">'..i18n("prefs.status_alerts")..'</th></tr></thead>')
prefsToggleButton(subpage_active, {
field = "toggle_device_first_seen_alert",
pref = "device_first_seen_alert",
default = "0",
hidden = not showElements,
redis_prefix = "ntopng.prefs.alerts.",
})
prefsToggleButton(subpage_active, {
field = "toggle_device_activation_alert",
pref = "device_connection_alert",
default = "0",
hidden = not showElements,
redis_prefix = "ntopng.prefs.alerts.",
})
prefsToggleButton(subpage_active, {
field = "toggle_pool_activation_alert",
pref = "pool_connection_alert",