Removes command line disable alerts (leaves the UI toggle)

Implements #1490
This commit is contained in:
Simone Mainardi 2017-10-02 19:28:23 +02:00
parent 01f1435244
commit 76153395c4
4 changed files with 7 additions and 32 deletions

View file

@ -641,14 +641,11 @@ function alertEntityRaw(entity_idx)
end
function areAlertsEnabled()
return ((not ntop.getPrefs().has_cmdl_disable_alerts) and
(ntop.getPref("ntopng.prefs.disable_alerts_generation") ~= "1"))
return (ntop.getPref("ntopng.prefs.disable_alerts_generation") ~= "1")
end
function hasAlertsDisabled()
local prefs = ntop.getPrefs()
return (prefs.has_cmdl_disable_alerts == true) or
((_POST["disable_alerts_generation"] ~= nil) and (_POST["disable_alerts_generation"] == "1")) or
return ((_POST["disable_alerts_generation"] ~= nil) and (_POST["disable_alerts_generation"] == "1")) or
((_POST["disable_alerts_generation"] == nil) and (ntop.getPref("ntopng.prefs.disable_alerts_generation") == "1"))
end