Fixes top talkers calculation (#9222)

Fixes timeseries colors
This commit is contained in:
Matteo Biscosi 2025-06-12 11:22:22 +02:00
parent 6017dce07d
commit af37780125
20 changed files with 454 additions and 281 deletions

View file

@ -213,31 +213,6 @@ function callback_utils.foreachHost(ifname, callback)
return true
end
-- ########################################################
-- Iterates each active host on the ifname interface.
-- Each host is passed to the callback with some more information.
function callback_utils.foreachLocalHost(ifname, callback)
interface.select(ifname)
local iterator = callback_utils.getLocalHostsIterator(false --[[ no details ]])
for hostname, hoststats in iterator do
if(ntop.isShuttingDown()) then return true end
if ntop.isDeadlineApproaching() then
-- Out of time
return false
end
if callback(hostname, hoststats) == false then
return false
end
end
return true
end
-- Iterates each device on the ifname interface.
-- Each device is passed to the callback with some more information.
function callback_utils.foreachDevice(ifname, callback)