mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-23 12:22:02 +00:00
Fix custom interface speed not accounted in ts_common.getMaxPointValue
This commit is contained in:
parent
6c77655fae
commit
5cac9d0bc0
5 changed files with 9 additions and 8 deletions
|
|
@ -1848,12 +1848,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