Added granularity to AlertableEntity

This commit is contained in:
Luca 2019-07-08 17:07:26 +02:00
parent 8ad9e6b336
commit 3e223849ba
9 changed files with 164 additions and 92 deletions

View file

@ -3651,5 +3651,14 @@ function notify_ntopng_stop()
notify_ntopng_status(false)
end
-- See NetworkInterface::checkHostsAlerts()
function granularity2id(granularity)
if(granularity == "min") then return(0)
elseif(granularity == "5mins") then return(1)
elseif(granularity == "hour") then return(2)
elseif(granularity == "day") then return(3)
end
end
-- DEBUG: uncomment this to test
--~ scanAlerts("min", "wlan0")