Added vlan to each host reference (#5595)

This commit is contained in:
MatteoBiscosi 2021-07-02 13:13:00 +02:00
parent 08e4c16375
commit 744a5e53c3
5 changed files with 27 additions and 18 deletions

View file

@ -1650,14 +1650,17 @@ function hostinfo2label(host_info, show_vlan)
-- Try to get the resolved name
local hostname = ntop.getResolvedName(ip)
local rname = hostVisualization(ip, hostname, host_info["vlan"])
local rname = ""
if not isEmptyString(hostname) then
rname = hostVisualization(hostname, hostname, host_info["vlan"])
end
if not isEmptyString(rname) then
return rname
end
-- Fallback: just the IP and VLAN
return(hostinfo2hostkey(host_info))
return(hostinfo2hostkey(host_info, true))
end
-- ##############################################