mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Fixed top talkers hosts
This commit is contained in:
parent
116ffda7c8
commit
34dee98540
5 changed files with 38 additions and 42 deletions
|
|
@ -156,9 +156,14 @@ end
|
|||
-- ##########################################
|
||||
|
||||
function aggregateHostsStats(hostStats)
|
||||
local h = hostStats.hosts
|
||||
local tot = #h
|
||||
return h,tot
|
||||
if(hostStats == nil) then
|
||||
return nil,0
|
||||
else
|
||||
local h = hostStats.hosts
|
||||
|
||||
local tot = #h
|
||||
return h,tot
|
||||
end
|
||||
end
|
||||
|
||||
function _aggregateHostsStats(hostStats)
|
||||
|
|
@ -1086,7 +1091,7 @@ end
|
|||
|
||||
-- Return the first 'howmany' hosts
|
||||
function getTopInterfaceHosts(howmany, localHostsOnly)
|
||||
hosts_stats,total = aggregateHostsStats(interface.getHostsInfo())
|
||||
hosts_stats = interface.getHostsInfo()
|
||||
ret = {}
|
||||
sortTable = {}
|
||||
n = 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue