mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 23:49:33 +00:00
fixed notification keys set (#4662)
This commit is contained in:
parent
27ede60ea5
commit
ee4733e2ed
8 changed files with 49 additions and 65 deletions
|
|
@ -12,8 +12,6 @@ local notification_configs = require("notification_configs")
|
|||
local rest_utils = require "rest_utils"
|
||||
local auth = require "auth"
|
||||
|
||||
local notifications_manager = require("notifications_manager");
|
||||
|
||||
-- ################################################
|
||||
|
||||
if not auth.has_capability(auth.capabilities.notifications) then
|
||||
|
|
@ -34,16 +32,6 @@ if (action == "add") then
|
|||
|
||||
local endpoint_conf_type = _POST["endpoint_conf_type"]
|
||||
response.result = notification_configs.add_config(endpoint_conf_type, endpoint_conf_name, _POST)
|
||||
|
||||
-- tell to the notification manager that an endpoint has been created
|
||||
if (response.result.status == "OK") then
|
||||
-- dismiss the notification about the endpoint creation
|
||||
local NOTIFICATION_ID = 15 -- see defined_notifications.lua
|
||||
notifications_manager.dismiss_notification(NOTIFICATION_ID)
|
||||
-- save the endpoint name
|
||||
ntop.setCache(notification_configs.LAST_ENDPOINT_NAME_CREATED_CACHE_KEY, endpoint_conf_name)
|
||||
end
|
||||
|
||||
elseif (action == "edit") then
|
||||
response.result = notification_configs.edit_config(endpoint_conf_name, _POST)
|
||||
elseif (action == "remove") then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue