mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 23:49:33 +00:00
Integrate configsets with user scripts configurations
This commit is contained in:
parent
30beb6d972
commit
b5197ba452
6 changed files with 137 additions and 36 deletions
|
|
@ -9,8 +9,17 @@ require "lua_utils"
|
|||
local json = require("dkjson")
|
||||
local user_scripts = require("user_scripts")
|
||||
|
||||
local rv = user_scripts.getConfigsets()
|
||||
|
||||
sendHTTPContentTypeHeader('application/json')
|
||||
|
||||
local config_sets = user_scripts.getConfigsets()
|
||||
local rv = {}
|
||||
|
||||
-- Only return the essential information
|
||||
for _, configset in pairs(config_sets) do
|
||||
rv[#rv + 1] = {
|
||||
id = configset.id,
|
||||
name = configset.name,
|
||||
}
|
||||
end
|
||||
|
||||
print(json.encode(rv))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue