mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 16:09:32 +00:00
Added traceback in case of nil score
This commit is contained in:
parent
3db8cc6cc8
commit
3f214341ea
18 changed files with 31 additions and 19 deletions
|
|
@ -507,7 +507,7 @@ end
|
|||
|
||||
local function dt_format_score(score)
|
||||
local score = tonumber(score)
|
||||
local severity_id = ntop.mapScoreToSeverity(score or 0)
|
||||
local severity_id = map_score_to_severity(score or 0)
|
||||
local severity = {}
|
||||
|
||||
if severity_id ~= 0 then
|
||||
|
|
@ -792,7 +792,7 @@ local function dt_format_flow(processed_record, record)
|
|||
flow["srv_port"] = processed_record["srv_port"]["value"]
|
||||
end
|
||||
|
||||
local severity_id = ntop.mapScoreToSeverity(tonumber(record["SCORE"]))
|
||||
local severity_id = map_score_to_severity(tonumber(record["SCORE"]))
|
||||
local severity = alert_consts.alertSeverityById(severity_id)
|
||||
|
||||
flow["highlight"] = severity.color
|
||||
|
|
@ -860,7 +860,7 @@ local function format_flow_score(score, flow)
|
|||
local score = tonumber(score)
|
||||
local label = format_utils.formatValue(score)
|
||||
|
||||
local severity_id = ntop.mapScoreToSeverity(score or 0)
|
||||
local severity_id = map_score_to_severity(score or 0)
|
||||
if severity_id ~= 0 then
|
||||
local severity = alert_consts.alertSeverityById(severity_id)
|
||||
label = "<span style='color: "..severity.color.."'>"..label.."</span>"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue