mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 16:09:32 +00:00
Improve top talkers visualization
This commit is contained in:
parent
a98b8d847e
commit
d5e7ef7cfc
2 changed files with 12 additions and 2 deletions
|
|
@ -185,7 +185,7 @@ end
|
|||
-- ########################################################
|
||||
|
||||
-- Computes label and url during visualization
|
||||
function top_talkers_utils.enrichRecordInformation(class_key, rec)
|
||||
function top_talkers_utils.enrichRecordInformation(class_key, rec, show_vlan)
|
||||
local url = ""
|
||||
local label = rec.label or rec.address
|
||||
|
||||
|
|
@ -196,6 +196,16 @@ function top_talkers_utils.enrichRecordInformation(class_key, rec)
|
|||
local alt_name = getHostAltName(rec.address)
|
||||
if not isEmptyString(alt_name) and (alt_name ~= rec.address) then
|
||||
label = alt_name
|
||||
else
|
||||
local hinfo = hostkey2hostinfo(rec.address)
|
||||
if not show_vlan then hinfo.vlan = 0 end
|
||||
alt_name = host2name(hinfo.host, hinfo.vlan)
|
||||
|
||||
if not isEmptyString(alt_name) and (alt_name ~= rec.address) then
|
||||
label = alt_name
|
||||
else
|
||||
label = rec.address
|
||||
end
|
||||
end
|
||||
elseif class_key == "asn" then
|
||||
url = ntop.getHttpPrefix()..'/lua/hosts_stats.lua?asn='
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue