Decouples checks from alerts (removes unnecessary flag is_alert)

This commit is contained in:
Simone Mainardi 2021-06-17 11:43:12 +02:00
parent 394a2cc01d
commit 4a526c3cdf
34 changed files with 22 additions and 97 deletions

View file

@ -107,7 +107,7 @@ function dumpInterfaceStats(ifid)
res["flow_export_count"] = ifstats.stats_since_reset.flow_export_count
end
if prefs.are_alerts_enabled == true and auth.has_capability(auth.capabilities.alerts) then
if auth.has_capability(auth.capabilities.alerts) then
res["engaged_alerts"] = ifstats["num_alerts_engaged"] or 0
res["dropped_alerts"] = ifstats["num_dropped_alerts"] or 0