mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-01 00:19:33 +00:00
Adjusts endpoint tests
This commit is contained in:
parent
71870f5158
commit
5d798db8fc
5 changed files with 37 additions and 37 deletions
22
scripts/lua/get_notification_configs.lua
Normal file
22
scripts/lua/get_notification_configs.lua
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
--
|
||||
-- (C) 2020 - ntop.org
|
||||
--
|
||||
|
||||
local dirs = ntop.getDirs()
|
||||
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
|
||||
|
||||
require "lua_utils"
|
||||
|
||||
local plugins_utils = require("plugins_utils")
|
||||
local notification_endpoints = require("notification_endpoints")
|
||||
local json = require "dkjson"
|
||||
|
||||
sendHTTPContentTypeHeader('application/json')
|
||||
|
||||
if not haveAdminPrivileges(true) then
|
||||
return
|
||||
end
|
||||
|
||||
local endpoints = notification_endpoints.get_configs()
|
||||
|
||||
print(json.encode(endpoints))
|
||||
Loading…
Add table
Add a link
Reference in a new issue