mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-01 00:19:33 +00:00
Fixed IEC unexpected transition alert formatting
This commit is contained in:
parent
eaa4cbd1e8
commit
fd26a68a1f
1 changed files with 8 additions and 6 deletions
|
|
@ -43,17 +43,19 @@ end
|
|||
-- @param alert_type_params Table `alert_type_params` as built in the `:init` method
|
||||
-- @return A human-readable string
|
||||
function alert_iec_unexpected_type_id.format(ifid, alert, alert_type_params)
|
||||
local msg = json.decode(alert_type_params.error_msg)
|
||||
local rsp = "[CauseTX: "..alert_type_params.cause_tx.."][TypeId: "..alert_type_params.type_id.."][ASDU: ".. alert_type_params.asdu.."][Negative: "
|
||||
|
||||
local rsp = "[CauseTX: "..msg.cause_tx.."][TypeId: "..msg.type_id.."][ASDU: ".. msg.asdu.."][Negative: "
|
||||
|
||||
if(msg.negatiive == false) then
|
||||
-- tprint(alert_type_params)
|
||||
|
||||
if(alert_type_params.negatiive == false) then
|
||||
rsp = rsp .. "True]"
|
||||
else
|
||||
rsp = rsp .. "False]"
|
||||
end
|
||||
|
||||
-- tprint(rsp)
|
||||
|
||||
if(rsp.info ~= nil) then
|
||||
rsp = rsp .. "[".. rsp.info .."]"
|
||||
end
|
||||
|
||||
return(rsp)
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue