Score improvements

The score is now calculated differently on the client and on the server of the flow.
The hosts flow is updated every minute and charted.
It's now possible to trigger an alert when the score threshold is exceeded
This commit is contained in:
emanuele-f 2020-01-14 15:48:39 +01:00
parent 4a1d217d3a
commit d7528e1628
27 changed files with 209 additions and 114 deletions

View file

@ -504,6 +504,7 @@ function printSeries(options, tags, start_time, end_time, base_url, params)
local mac_params = nil
local mac_baseurl = ntop.getHttpPrefix() .. "/lua/mac_details.lua?page=historical"
local is_pro = ntop.isPro()
local is_enterprise = ntop.isEnterprise()
local tdiff = (end_time - start_time)
if params.tskey then
@ -522,7 +523,8 @@ function printSeries(options, tags, start_time, end_time, base_url, params)
for _, serie in ipairs(series) do
if ((have_nedge and serie.nedge_exclude) or (not have_nedge and serie.nedge_only)) or
(serie.pro_skip and is_pro) then
(serie.pro_skip and is_pro) or
(serie.enterprise_only and (not is_enterprise)) then
goto continue
end