Added tab pane for traffic profiles

This commit is contained in:
Luca Deri 2015-11-07 18:28:05 +01:00
parent 714352b25e
commit 4a5948ff27
8 changed files with 131 additions and 216 deletions

View file

@ -31,6 +31,18 @@ function aggregateInterfaceStats(ifstats)
end
end
keys = { "profiles" }
for _,key in pairs(keys) do
if(_v[key] ~= nil) then
tot[key] = {}
for k,v in pairs(_v[key]) do
--io.write(k.."\n")
if(tot[key][k] == nil) then tot[key][k] = 0 end
tot[key][k] = tot[key][k] + v
end
end
end
keys = { "pktSizeDistribution" }
for _,key in pairs(keys) do
if(tot[key] == nil) then tot[key] = { } end
@ -42,7 +54,6 @@ function aggregateInterfaceStats(ifstats)
end
end
keys = { "localstats", "ndpi" }
for _,key in pairs(keys) do
-- io.write(key.."\n")
@ -1894,3 +1905,9 @@ end
function tolongint(what)
return(string.format("%u", what))
end
-- ###############################################
function trimSpace(what)
return(string.gsub(what, "%s+", ""))
end