mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 23:49:33 +00:00
Generalize alerts external report
This commit is contained in:
parent
3d6af7a740
commit
d4bbeb10a2
19 changed files with 398 additions and 309 deletions
|
|
@ -611,7 +611,7 @@ function alertSeverity(v)
|
|||
end
|
||||
|
||||
function alertSeverityRaw(sev_idx)
|
||||
sev_idx = sev_idx + 1
|
||||
sev_idx = sev_idx + 2 -- -1 and 0
|
||||
if sev_idx <= #alert_level_keys then
|
||||
return alert_level_keys[sev_idx][3]
|
||||
end
|
||||
|
|
@ -644,6 +644,14 @@ function alertEngineLabel(v)
|
|||
return _handleArray(alert_engine_keys, tonumber(v))
|
||||
end
|
||||
|
||||
function alertEngineRaw(idx)
|
||||
idx = idx + 1
|
||||
if idx <= #alert_engine_keys then
|
||||
return alert_engine_keys[idx][3]
|
||||
end
|
||||
return nil
|
||||
end
|
||||
|
||||
function alertLevel(v)
|
||||
local leveltable = {}
|
||||
|
||||
|
|
@ -693,6 +701,7 @@ function mustScanAlerts(ifstats)
|
|||
end
|
||||
|
||||
function hasAlertsDisabled()
|
||||
_POST = _POST or {}
|
||||
return ((_POST["disable_alerts_generation"] ~= nil) and (_POST["disable_alerts_generation"] == "1")) or
|
||||
((_POST["disable_alerts_generation"] == nil) and (ntop.getPref("ntopng.prefs.disable_alerts_generation") == "1"))
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue