mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-02 00:40:10 +00:00
Fixes local networks aggregation functions
Local networks are aggregated on the basis of their string representation rather than their id which may change between ntopng restarts.
This commit is contained in:
parent
97c45aef96
commit
6c5f665a73
1 changed files with 2 additions and 2 deletions
|
|
@ -60,7 +60,7 @@ local function topNetworksSectionInTableOP(tblarray, arithOp)
|
|||
local found = false
|
||||
if (ret[outer_cnt][key] == nil) then ret[outer_cnt][key] = {} end
|
||||
for _,el in pairs(ret[outer_cnt][key]) do
|
||||
if (found == false and el["address"] == record["address"]) then
|
||||
if (found == false and el["label"] == record["label"]) then
|
||||
el["value"] = arithOp(el["value"], record["value"])
|
||||
found = true
|
||||
end
|
||||
|
|
@ -209,7 +209,7 @@ end
|
|||
top_networks_intf.name = "Networks"
|
||||
top_networks_intf.infoScript = "hosts_stats.lua"
|
||||
top_networks_intf.infoScriptKey = "network"
|
||||
top_networks_intf.key = "local_network_id"
|
||||
top_networks_intf.key = "network"
|
||||
top_networks_intf.JSONkey = "networks"
|
||||
top_networks_intf.uniqueKey = "top_local_nets"
|
||||
top_networks_intf.getTop = getTopNetworks
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue