mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Revert "Migrates alerts to an object-oriented implementation"
This reverts commit fbc283f12f.
This commit is contained in:
parent
fbc283f12f
commit
e24ef4ef35
108 changed files with 1741 additions and 2797 deletions
|
|
@ -2,42 +2,22 @@
|
|||
-- (C) 2019-20 - ntop.org
|
||||
--
|
||||
|
||||
-- ##############################################
|
||||
|
||||
local alert_keys = require "alert_keys"
|
||||
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
|
||||
|
||||
local status_keys = require "flow_keys"
|
||||
-- Import the classes library.
|
||||
local classes = require "classes"
|
||||
-- Make sure to import the Superclass!
|
||||
local alert = require "alert"
|
||||
-- @brief Prepare an alert table used to generate the alert
|
||||
-- @param alert_severity A severity as defined in `alert_severities`
|
||||
-- @return A table with the alert built
|
||||
local function createUDPUnidirectional()
|
||||
local built = {
|
||||
alert_type_params = {},
|
||||
}
|
||||
|
||||
-- ##############################################
|
||||
return built
|
||||
end
|
||||
|
||||
local alert_udp_unidirectional = classes.class(alert)
|
||||
|
||||
-- ##############################################
|
||||
|
||||
alert_udp_unidirectional.meta = {
|
||||
status_key = status_keys.ntopng.status_udp_unidirectional,
|
||||
return {
|
||||
alert_key = alert_keys.ntopng.alert_udp_unidirectional,
|
||||
i18n_title = "flow_details.udp_unidirectional",
|
||||
icon = "fas fa-info-circle",
|
||||
creator = createUDPUnidirectional,
|
||||
}
|
||||
|
||||
-- ##############################################
|
||||
|
||||
-- @brief Prepare an alert table used to generate the alert
|
||||
-- @return A table with the alert built
|
||||
function alert_udp_unidirectional:init()
|
||||
-- Call the parent constructor
|
||||
self.super:init()
|
||||
|
||||
self.alert_type_params = {}
|
||||
end
|
||||
|
||||
-- #######################################################
|
||||
|
||||
return alert_udp_unidirectional
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue