mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Add local_explorer flag to alert format callback
This commit is contained in:
parent
89ddabd3ad
commit
b24905747c
4 changed files with 18 additions and 12 deletions
|
|
@ -57,8 +57,9 @@ end
|
|||
-- @param ifid The integer interface id of the generated alert
|
||||
-- @param alert The alert description table, including alert data such as the generating entity, timestamp, granularity, type
|
||||
-- @param alert_type_params Table `alert_type_params` as built in the `:init` method
|
||||
-- @param local_explorer Table `alert_type_params` as built in the `:init` method
|
||||
-- @return A human-readable string
|
||||
function alert_vulnerability_scan.format(ifid, alert, alert_type_params)
|
||||
function alert_vulnerability_scan.format(ifid, alert, alert_type_params, local_explorer)
|
||||
local msg = ""
|
||||
|
||||
if (alert_type_params.scan_type == "tcp_portscan" or alert_type_params.scan_type == "tcp_openports") then
|
||||
|
|
@ -118,7 +119,6 @@ function alert_vulnerability_scan.format(ifid, alert, alert_type_params)
|
|||
|
||||
local url = string.format("%s/lua/vulnerability_scan.lua?host=%s&scan_type=%s&scan_return_result=true&page=show_result&scan_date=%s",ntop.getHttpPrefix(),alert_type_params.host,scan_type,alert_type_params.date)
|
||||
|
||||
|
||||
local alert_descr = i18n('vulnerability_scan.host_alert', { host = host, msg = msg, url = url, scan_type = scan_type_label })
|
||||
|
||||
return alert_descr
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue