Fixes hostVisualization function incorrect behavior (#5632)

This commit is contained in:
MatteoBiscosi 2021-07-07 16:44:06 +02:00
parent 9b0d01122d
commit 7589447432
5 changed files with 12 additions and 28 deletions

View file

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