mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Rework alert serialization. Change alert info format (info for all triggered alerts are now generated)
This commit is contained in:
parent
88e17d53d8
commit
d8d7330f11
9 changed files with 134 additions and 123 deletions
|
|
@ -360,10 +360,9 @@ end
|
|||
|
||||
-- Return a risk info (raw text, do not return a formatted value)
|
||||
function alert_utils.get_flow_risk_info(alert_risk, alert_json)
|
||||
if (alert_json) and (alert_json.alert_generation) and (alert_json.alert_generation.flow_risk_info) then
|
||||
local flow_risk_info = json.decode(alert_json.alert_generation.flow_risk_info)
|
||||
if (flow_risk_info) and (flow_risk_info[tostring(alert_risk)]) then
|
||||
return flow_risk_info[tostring(alert_risk)]
|
||||
if alert_json and alert_json.flow_risk_info then
|
||||
if alert_json.flow_risk_info[tostring(alert_risk)] then
|
||||
return alert_json.flow_risk_info[tostring(alert_risk)]
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue