* arp matrix graph and fix

* bug fix

* graph fix

* bug fix

* tests on arp graph

* merged heatmap.js and map.js

* graph dinamic resize

* minor fix

* graph dinamic width

* graph performance improvement

* clean code

* fix manual refresh

* message for empty graph

* clean code

* more clean

* update arpMap and host details

* migrate to v4.min version of d3.js
This commit is contained in:
Francesco Staccini 2019-04-17 13:23:10 +02:00 committed by simonemainardi
parent 94b143c8a3
commit 1d9b35be42
13 changed files with 1247 additions and 224 deletions

View file

@ -0,0 +1,44 @@
--
-- (C) 2013-19 - ntop.org
--
local dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
require "lua_utils"
local matrix = interface.getArpStatsMatrixInfo()
local arpMatrixModule = {}
function arpMatrixModule.arpCheck(host_ip)
if not (matrix and host_ip) then return false end
local req_num = 0;
local talkers_num = 0;
if (matrix and host_ip) then
for _, m_elem in pairs(matrix) do
for i, stats in pairs(m_elem)do
tmp = split(i,"-")
src_ip = tmp[1]
dst_ip = tmp[2]
if ((stats["src2dst.requests"] > 0) and (src_ip == host_ip)) or
((stats["dst2src.requests"] > 0) and (dst_ip == host_ip))then
return true
end
end
end
end
return false
end
return arpMatrixModule