mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 23:49:33 +00:00
add recipient for endpoint notifications
This commit is contained in:
parent
78a6f4f8d4
commit
db9f3ecc03
10 changed files with 449 additions and 2 deletions
41
scripts/lua/admin/endpoint_recipients_list.lua
Normal file
41
scripts/lua/admin/endpoint_recipients_list.lua
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
--
|
||||
-- (C) 2019-20 - ntop.org
|
||||
--
|
||||
local dirs = ntop.getDirs()
|
||||
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
|
||||
|
||||
require "lua_utils"
|
||||
|
||||
local page_utils = require("page_utils")
|
||||
local template = require "template_utils"
|
||||
local json = require "dkjson"
|
||||
local plugins_utils = require("plugins_utils")
|
||||
local notification_endpoints = require("notification_endpoints")
|
||||
|
||||
local endpoints = notification_endpoints.get_configs()
|
||||
|
||||
sendHTTPContentTypeHeader('text/html')
|
||||
|
||||
page_utils.set_active_menu_entry(page_utils.menu_entries.endpoint_recipients)
|
||||
|
||||
-- append the menu above the page
|
||||
dofile(dirs.installdir .. "/scripts/lua/inc/menu.lua")
|
||||
page_utils.print_page_title(i18n("endpoint_notifications.recipient_list"))
|
||||
|
||||
-- Prepare the response
|
||||
local context = {
|
||||
notifications = {
|
||||
endpoints = notification_endpoints.get_types(),
|
||||
endpoint_list = endpoints
|
||||
},
|
||||
template_utils = template,
|
||||
page_utils = page_utils,
|
||||
json = json,
|
||||
info = ntop.getInfo()
|
||||
}
|
||||
|
||||
-- print config_list.html template
|
||||
print(template.gen("pages/recipients_endpoint.template", context))
|
||||
|
||||
-- append the menu below the page
|
||||
dofile(dirs.installdir .. "/scripts/lua/inc/footer.lua")
|
||||
Loading…
Add table
Add a link
Reference in a new issue