Set ntopng.prefs.beta_score redis key to enable score supprot (beta)

This commit is contained in:
Alfredo Cardigliano 2019-09-10 09:39:32 +02:00
parent 8637573838
commit 3fcded57fa
5 changed files with 21 additions and 10 deletions

View file

@ -15,6 +15,7 @@ local have_nedge = ntop.isnEdge()
sendHTTPContentTypeHeader('text/html')
local debug = false
local debug_process = false -- Show flow processed information
local debug_score = (ntop.getPref("ntopng.prefs.beta_score") == "1")
interface.select(ifname)
local ifstats = interface.getStats()
@ -486,8 +487,10 @@ for _key, value in ipairs(flows_stats) do -- pairsByValues(vals, funct) do
local info = value["info"]
if(value["score"] > 0) then
info = info .. string.format(" [<b>score: %u</b>]", value["score"])
if debug_score then
if(value["score"] > 0) then
info = info .. string.format(" [<b>score: %u</b>]", value["score"])
end
end
record["column_info"] = info