mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 23:49:33 +00:00
Adds L7 protocol information to displayed flow alerts
This commit is contained in:
parent
87db0755e0
commit
75abbd6181
1 changed files with 4 additions and 7 deletions
|
|
@ -665,18 +665,15 @@ function formatRawFlow(record, flow_json)
|
|||
["vlan"] = record["vlan_id"]}
|
||||
flow = "["..i18n("flow")..": "..(getFlowLabel(flow, false, add_links, time_bounds) or "").."] "
|
||||
|
||||
local l4_proto_label, l4_proto = l4_proto_to_string(record["proto"] or 0) or ""
|
||||
local l4_proto_label = l4_proto_to_string(record["proto"] or 0) or ""
|
||||
|
||||
if not isEmptyString(l4_proto_label) then
|
||||
flow = flow.."[" .. i18n("protocol") .. ": " .. l4_proto_label .. "] "
|
||||
end
|
||||
|
||||
if (l4_proto == "tcp") or (l4_proto =="udp") then
|
||||
local l7proto_name = interface.getnDPIProtoName(tonumber(record["l7_proto"]) or 0)
|
||||
|
||||
if not isEmptyString(l7proto_name) then
|
||||
flow = flow.."["..i18n("application")..": <A HREF='"..ntop.getHttpPrefix().."/lua/hosts_stats.lua?protocol="..record["l7_proto"].."'> " ..l7proto_name.."</A>] "
|
||||
end
|
||||
local l7proto_name = interface.getnDPIProtoName(tonumber(record["l7_proto"]) or 0)
|
||||
if not isEmptyString(l7proto_name) then
|
||||
flow = flow.."["..i18n("application")..": " ..l7proto_name.."] "
|
||||
end
|
||||
|
||||
local decoded = json.decode(flow_json)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue