mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 07:59:35 +00:00
Fixes various charts issues (#7629)
This commit is contained in:
parent
9bd15085be
commit
7f8e1c3a5b
3 changed files with 17 additions and 7 deletions
|
|
@ -915,10 +915,13 @@ function driver:timeseries_top(options, top_tags)
|
|||
local snmp_utils = require "snmp_utils"
|
||||
local snmp_cached_dev = require "snmp_cached_dev"
|
||||
local cached_device = snmp_cached_dev:create(options.tags.device)
|
||||
local ifindex = available_tags[top_item][1].if_index
|
||||
local ifindex = available_tags[top_item][1].if_index or available_tags[top_item][1].port
|
||||
local ext_label = nil
|
||||
if cached_device then
|
||||
ext_label = shortenString(snmp_utils.get_snmp_interface_label(cached_device["interfaces"][ifindex]), 64)
|
||||
ext_label = shortenString(snmp_utils.get_snmp_interface_label(cached_device["interfaces"][ifindex]), 32)
|
||||
if isEmptyString(ext_label) then
|
||||
ext_label = ifindex
|
||||
end
|
||||
end
|
||||
|
||||
count = table.len(available_series[top_item].data)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue