mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-28 23:19:33 +00:00
Fixes circular dependency and lightened some modules
This commit is contained in:
parent
de03d66a73
commit
ef27b0b058
14 changed files with 1929 additions and 2045 deletions
|
|
@ -14,7 +14,6 @@ local alert_entities = require "alert_entities"
|
|||
local alert_consts = require "alert_consts"
|
||||
local recipients = require "recipients"
|
||||
local alert_entity_builders = require "alert_entity_builders"
|
||||
local alert_management = require "alert_management"
|
||||
local do_trace = false
|
||||
|
||||
local alerts_api = {}
|
||||
|
|
@ -420,9 +419,9 @@ function alerts_api.release(entity_info, type_info, when, cur_alerts)
|
|||
|
||||
if (entity_info.alert_entity.entity_id == alert_consts.alertEntity("interface")) then
|
||||
if (interface.checkContext(entity_info.entity_val) == false) then
|
||||
-- alertErrorTraceback("Invalid interface context detected for entity id " ..
|
||||
-- entity_info.alert_entity.entity_id)
|
||||
-- tprint(entity_info)
|
||||
-- alertErrorTraceback("Invalid interface context detected for entity id " ..
|
||||
-- entity_info.alert_entity.entity_id)
|
||||
-- tprint(entity_info)
|
||||
return (false)
|
||||
else
|
||||
released = interface.releaseTriggeredAlert(table.unpack(params))
|
||||
|
|
@ -464,6 +463,7 @@ end
|
|||
-- ##############################################
|
||||
|
||||
function alerts_api.releaseAllAlerts()
|
||||
local alert_management = require "alert_management"
|
||||
local alerts = interface.getEngagedAlerts()
|
||||
alert_management.releaseEntityAlerts(nil, alerts)
|
||||
end
|
||||
|
|
@ -622,8 +622,4 @@ end
|
|||
|
||||
-- ##############################################
|
||||
|
||||
if (trace_script_duration ~= nil) then
|
||||
io.write(debug.getinfo(1, 'S').source .. " executed in " .. (os.clock() - clock_start) * 1000 .. " ms\n")
|
||||
end
|
||||
|
||||
return (alerts_api)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue