mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Fix for bringing back the top stats table for hosts graphs
This commit is contained in:
parent
5ba7aeda9a
commit
62bc62edcb
3 changed files with 25 additions and 25 deletions
|
|
@ -1552,4 +1552,27 @@ function maxRateToString(max_rate)
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function makeTopStatsScriptsArray()
|
||||
path = dirs.installdir .. "/scripts/lua/modules/top_scripts"
|
||||
path = fixPath(path)
|
||||
local files = ntop.readdir(path)
|
||||
topArray = {}
|
||||
|
||||
for k,v in pairs(files) do
|
||||
if(v ~= nil) then
|
||||
value = {}
|
||||
fn,ext = v:match("([^.]+).([^.]+)")
|
||||
mod = require("top_scripts."..fn)
|
||||
if(type(mod) ~= type(true)) then
|
||||
value["name"] = mod.name
|
||||
value["script"] = mod.infoScript
|
||||
value["key"] = mod.infoScriptKey
|
||||
value["levels"] = mod.numLevels
|
||||
topArray[fn] = value
|
||||
end
|
||||
end
|
||||
end
|
||||
return(topArray)
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue