mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Fixes host names not alwais shown
This commit is contained in:
parent
e7b8a1d8d4
commit
0be795156f
2 changed files with 18 additions and 3 deletions
|
|
@ -2341,10 +2341,20 @@ end
|
|||
-- ##############################################
|
||||
|
||||
function flow2hostinfo(host_info, host_type)
|
||||
local host_name
|
||||
|
||||
if host_type == "cli" then
|
||||
return({host = host_info["cli.ip"], vlan = host_info["cli.vlan"]})
|
||||
if not host_info["cli.host"] then
|
||||
host_name = interface.getHostMinInfo(host_info["cli.ip"])["name"]
|
||||
end
|
||||
|
||||
return({host = host_info["cli.ip"], vlan = host_info["cli.vlan"], name = host_name})
|
||||
elseif host_type == "srv" then
|
||||
return({host = host_info["srv.ip"], vlan = host_info["srv.vlan"]})
|
||||
if not host_info["srv.host"] then
|
||||
host_name = interface.getHostMinInfo(host_info["srv.ip"])["name"]
|
||||
end
|
||||
|
||||
return({host = host_info["srv.ip"], vlan = host_info["srv.vlan"], name = host_name})
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue