mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 15:39:33 +00:00
Replace getFlowPeers function with getFlows and limit results to reduce memory footprint.
This commit is contained in:
parent
096db1085d
commit
1598598c47
12 changed files with 61 additions and 578 deletions
|
|
@ -2723,3 +2723,20 @@ function isCaptivePortalActive(ifstats)
|
|||
|
||||
return is_bridge_iface and is_captive_portal_enabled
|
||||
end
|
||||
|
||||
function getTopFlowPeers(hostname_vlan, max_hits, detailed)
|
||||
local detailed = detailed or false
|
||||
|
||||
local paginator_options = {
|
||||
sortColumn = "column_bytes",
|
||||
detailedResults = detailed,
|
||||
maxHits = max_hits,
|
||||
}
|
||||
|
||||
local res = interface.getFlowsInfo(hostname_vlan, paginator_options)
|
||||
if ((res ~= nil) and (res.flows ~= nil)) then
|
||||
return res.flows
|
||||
else
|
||||
return {}
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue