mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 23:49:33 +00:00
Implement new user scripts configsets API
This commit is contained in:
parent
0ebc64cf71
commit
c1cb3b38ca
5 changed files with 242 additions and 0 deletions
16
scripts/lua/get_scripts_configsets.lua
Normal file
16
scripts/lua/get_scripts_configsets.lua
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
--
|
||||
-- (C) 2019 - ntop.org
|
||||
--
|
||||
|
||||
local dirs = ntop.getDirs()
|
||||
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
|
||||
|
||||
require "lua_utils"
|
||||
local json = require("dkjson")
|
||||
local user_scripts = require("user_scripts")
|
||||
|
||||
local rv = user_scripts.getConfigsets()
|
||||
|
||||
sendHTTPContentTypeHeader('application/json')
|
||||
|
||||
print(json.encode(rv))
|
||||
Loading…
Add table
Add a link
Reference in a new issue