mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Cleanup of unused host label function now standardized
This commit is contained in:
parent
d31f07b0d7
commit
13f53a1fa1
1 changed files with 1 additions and 27 deletions
|
|
@ -1312,32 +1312,6 @@ end
|
|||
|
||||
-- #################################
|
||||
|
||||
function hostVisualization(ip, name, vlan, short_version, short_name)
|
||||
local res = ip
|
||||
|
||||
if not isEmptyString(name) then
|
||||
res = name
|
||||
end
|
||||
|
||||
if short_name and (short_name == true) then
|
||||
res = shortenString(res)
|
||||
end
|
||||
|
||||
if vlan ~= nil and tonumber(vlan) > 0 then
|
||||
res = res .. "@" .. getFullVlanName(vlan, short_version)
|
||||
end
|
||||
|
||||
if not isEmptyString(name) and ip ~= name then
|
||||
if isIPv6(ip) then
|
||||
res = res.." [IPv6]"
|
||||
end
|
||||
end
|
||||
|
||||
return res
|
||||
end
|
||||
|
||||
-- #################################
|
||||
|
||||
-- This function actively resolves an host if there is not information about it.
|
||||
-- NOTE: prefer the host2name on this function
|
||||
function resolveAddress(hostinfo, allow_empty)
|
||||
|
|
@ -1358,7 +1332,7 @@ function resolveAddress(hostinfo, allow_empty)
|
|||
return hostinfo2label(hostinfo)
|
||||
end
|
||||
end
|
||||
return hostVisualization(hostinfo["host"], hostname, hostinfo["vlan"])
|
||||
return hostinfo2label(hostinfo)
|
||||
end
|
||||
|
||||
-- #################################
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue