mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 16:09:32 +00:00
Set ntopng.prefs.beta_score redis key to enable score supprot (beta)
This commit is contained in:
parent
8637573838
commit
3fcded57fa
5 changed files with 21 additions and 10 deletions
|
|
@ -10,6 +10,8 @@ local custom_column_utils = require "custom_column_utils"
|
|||
local json = require "dkjson"
|
||||
local have_nedge = ntop.isnEdge()
|
||||
|
||||
local debug_score = (ntop.getPref("ntopng.prefs.beta_score") == "1")
|
||||
|
||||
sendHTTPContentTypeHeader('text/html')
|
||||
|
||||
-- Table parameters
|
||||
|
|
@ -294,8 +296,10 @@ for _key, _value in pairsByKeys(vals, funct) do
|
|||
column_name = column_name .. " <i class='fa fa-ban fa-lg' title='"..i18n("hosts_stats.blocking_traffic_policy_popup_msg").."'></i>"
|
||||
end
|
||||
|
||||
if(value["score"] > 0) then
|
||||
column_name = column_name .. string.format(" [<b>score: %u</b>]", value["score"])
|
||||
if debug_score then
|
||||
if(value["score"] > 0) then
|
||||
column_name = column_name .. string.format(" [<b>score: %u</b>]", value["score"])
|
||||
end
|
||||
end
|
||||
|
||||
record["column_name"] = column_name
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue