mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Fixed shell endpoint bug and added notice when executing the script (#4748)
Co-authored-by: matteo <biscosi@ntop.org>
This commit is contained in:
parent
e6bacc5b83
commit
e543b207c9
6 changed files with 93 additions and 23 deletions
|
|
@ -0,0 +1,37 @@
|
|||
--
|
||||
-- (C) 2019-20 - ntop.org
|
||||
--
|
||||
|
||||
local alert_keys = require "alert_keys"
|
||||
local alert_creators = require "alert_creators"
|
||||
|
||||
local function formatAlertShellExec(ifid, alert, info)
|
||||
return(i18n("alert_messages.shell_script_executed", {
|
||||
script_exec_comm = info.script_exec_comm,
|
||||
alert_type = info.alert_type,
|
||||
}))
|
||||
end
|
||||
|
||||
-- #######################################################
|
||||
|
||||
local function createAlertShellExec(alert_severity, script_exec_comm, alert_type)
|
||||
local shell_script_type = {
|
||||
alert_severity = alert_severity,
|
||||
alert_type_params = {
|
||||
script_exec_comm = script_exec_comm,
|
||||
alert_type = alert_type,
|
||||
}
|
||||
}
|
||||
|
||||
return shell_script_type
|
||||
end
|
||||
|
||||
-- #######################################################
|
||||
|
||||
return {
|
||||
alert_key = alert_keys.ntopng.alert_shell_script_executed,
|
||||
i18n_title = "alerts_dashboard.shell_script",
|
||||
i18n_description = formatAlertShellExec,
|
||||
icon = "fas fa-info-circle",
|
||||
creator = createAlertShellExec
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue