Prevents deletion of alert toggle upon flush of alerts

Fixes #1488
This commit is contained in:
Simone Mainardi 2017-10-02 19:36:40 +02:00
parent 76153395c4
commit 69a7b91764

View file

@ -2045,6 +2045,7 @@ function flushAlertsData()
local selected_interface = ifname
local ifnames = interface.getIfNames()
local force_query = true
local generation_toggle_backup = ntop.getPref("ntopng.prefs.disable_alerts_generation")
if(verbose) then io.write("[Alerts] Temporary disabling alerts generation...\n") end
ntop.setAlertsTemporaryDisabled(true);
@ -2078,6 +2079,8 @@ function flushAlertsData()
interface.refreshHostsAlertsConfiguration(true --[[ with counters ]])
end)
ntop.setPref("ntopng.prefs.disable_alerts_generation", generation_toggle_backup)
if(verbose) then io.write("[Alerts] Flush done\n") end
interface.select(selected_interface)
end