mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Initial implementation of lua flow callback scripts and blacklisted alerts
Partially implements #2842
This commit is contained in:
parent
6f62989869
commit
b3d595653e
14 changed files with 476 additions and 10 deletions
|
|
@ -240,6 +240,14 @@ end
|
|||
|
||||
-- ##############################################
|
||||
|
||||
function alerts_api.storeFlowAlert(alert_type, alert_severity, flow_info)
|
||||
if flow then
|
||||
-- flow.storeAlert(alert_type.alert_id, alert_severity.severity_id, json.encode(flow_info))
|
||||
end
|
||||
end
|
||||
|
||||
-- ##############################################
|
||||
|
||||
--! @brief Trigger an alert of given type on the entity
|
||||
--! @param entity_info data returned by one of the entity_info building functions
|
||||
--! @param type_info data returned by one of the type_info building functions
|
||||
|
|
@ -1148,6 +1156,13 @@ function alerts_api.threshold_cross_input_builder(gui_conf, input_id, value)
|
|||
)
|
||||
end
|
||||
|
||||
|
||||
-- ##############################################
|
||||
|
||||
function alerts_api.no_input_input_builder(gui_conf, input_id, value)
|
||||
return string.format("<i>%s.</i>", i18n("flow_callbacks_config.no_input"))
|
||||
end
|
||||
|
||||
-- ##############################################
|
||||
|
||||
function alerts_api.checkbox_input_builder(gui_conf, input_id, value)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue