mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-03 01:10:10 +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
|
|
@ -6,7 +6,6 @@ local flow_consts = require("flow_consts")
|
|||
local user_scripts = require("user_scripts")
|
||||
local alerts_api = require "alerts_api"
|
||||
local alert_severities = require "alert_severities"
|
||||
local alert_consts = require("alert_consts")
|
||||
|
||||
-- #################################################################
|
||||
|
||||
|
|
@ -27,11 +26,9 @@ local script = {
|
|||
|
||||
function script.hooks.protocolDetected(now)
|
||||
if(flow.getnDPICategoryName() == "Mining") then
|
||||
local alert = alert_consts.alert_types.alert_web_mining.new()
|
||||
local web_mining_detected_type = flow_consts.status_types.status_web_mining_detected.create()
|
||||
|
||||
alert:set_severity(alert_severities.error)
|
||||
|
||||
alert:trigger_status(50, 10, 50)
|
||||
alerts_api.trigger_status(web_mining_detected_type, alert_severities.error, 50, 10, 50)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue