mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Added tab pane for traffic profiles
This commit is contained in:
parent
714352b25e
commit
4a5948ff27
8 changed files with 131 additions and 216 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue