mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 23:49:33 +00:00
Fix custom interface speed not accounted in ts_common.getMaxPointValue
This commit is contained in:
parent
1dc6fce52d
commit
433cbb3142
5 changed files with 9 additions and 8 deletions
|
|
@ -1872,12 +1872,13 @@ function tablePreferences(key, value, force_set)
|
|||
end
|
||||
end
|
||||
|
||||
function getInterfaceSpeed(ifstats)
|
||||
local ifspeed = ntop.getCache('ntopng.prefs.'..ifstats.name..'.speed')
|
||||
function getInterfaceSpeed(ifid)
|
||||
local ifname = getInterfaceName(ifid)
|
||||
local ifspeed = ntop.getCache('ntopng.prefs.'..ifname..'.speed')
|
||||
if not isEmptyString(ifspeed) and tonumber(ifspeed) ~= nil then
|
||||
ifspeed = tonumber(ifspeed)
|
||||
else
|
||||
ifspeed = ifstats.speed
|
||||
ifspeed = interface.getMaxIfSpeed(ifid)
|
||||
end
|
||||
|
||||
return ifspeed
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue