mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 23:49:33 +00:00
Fixes attempt to index nil value
This commit is contained in:
parent
9109cae7ae
commit
8a8740cd83
1 changed files with 3 additions and 2 deletions
|
|
@ -168,8 +168,8 @@ for _key, value in ipairs(flows_stats) do -- pairsByValues(vals, funct) do
|
|||
local src_process, dst_process = '', ''
|
||||
local src_container, dst_container = '', ''
|
||||
|
||||
local cli_tooltip = hostinfo2label({ label = info_cli.ip, vlan = info_cli.vlan }, true)
|
||||
local srv_tooltip = hostinfo2label({ label = info_srv.ip, vlan = info_srv.vlan }, true)
|
||||
local cli_tooltip = hostinfo2label({ label = info_cli.host or info_cli.ip, vlan = info_cli.vlan or 0 }, true)
|
||||
local srv_tooltip = hostinfo2label({ label = info_srv.host or info_srv.ip, vlan = info_srv.vlan or 0 }, true)
|
||||
|
||||
if((value["tcp.nw_latency.client"] ~= nil) and (value["tcp.nw_latency.client"] > 0)) then
|
||||
cli_tooltip = cli_tooltip.." nw latency: "..string.format("%.3f", value["tcp.nw_latency.client"]).." ms"
|
||||
|
|
@ -443,4 +443,5 @@ local result = {
|
|||
},
|
||||
}
|
||||
|
||||
|
||||
print(json.encode(result))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue