Fixes host alerts not always reporting VLANs and names

Fixes  #5629
This commit is contained in:
Simone Mainardi 2021-07-06 18:08:48 +02:00
parent 664a201055
commit c402806d8b
2 changed files with 14 additions and 10 deletions

View file

@ -1313,17 +1313,21 @@ end
-- #################################
function hostVisualization(ip, name, vlan, short_version)
if (ip ~= name) then
if isIPv6(ip) then
name = name.." [IPv6]"
end
else
if vlan ~= nil and tonumber(vlan) > 0 then
name = name .. "@" .. getFullVlanName(vlan, short_version)
end
local res = name
if vlan ~= nil and tonumber(vlan) > 0 then
res = res .. "@" .. getFullVlanName(vlan, short_version)
end
return name
if ip ~= name then
if isIPv6(ip) then
res = res.." [IPv6]"
end
else
end
return res
end
-- #################################