mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-03 01:10:10 +00:00
scripts/lua/host_interaction.lua: add max hosts threshold
This commit helps reducing the extent of the hosts interaction map by implementing a simple threshold as a workaround to avoid unusable maps for large networks. This is a first workaround for #42, while the map will be completely reworked shortly.
This commit is contained in:
parent
2441f9da71
commit
7d3bbc1d1a
1 changed files with 7 additions and 0 deletions
|
|
@ -339,6 +339,8 @@ ids = {}
|
|||
num = 0
|
||||
links = 0
|
||||
local host
|
||||
local max_num_hosts = 50
|
||||
local host_idx = 0
|
||||
|
||||
for key, values in pairs(hosts_stats) do
|
||||
|
||||
|
|
@ -401,6 +403,11 @@ for key, values in pairs(hosts_stats) do
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
host_idx = host_idx + 1
|
||||
if (host_idx > max_num_hosts) then
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
aggregation_ids = {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue