mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 15:39:33 +00:00
Alerts delete by type, older than, by host
This commit is contained in:
parent
0f279d17bd
commit
acb1d25bb5
10 changed files with 314 additions and 88 deletions
|
|
@ -75,25 +75,30 @@ interface.select(ifname)
|
|||
|
||||
local alerts
|
||||
local num_alerts = totalRows
|
||||
local has_host_filter = (_GET["entity"] == "host")
|
||||
|
||||
if _GET["entity"] == "host" then
|
||||
if has_host_filter then
|
||||
paginfo["entityFilter"] = alertEntity("host")
|
||||
paginfo["entityValueFilter"] = _GET["entity_val"]
|
||||
alerts = interface.getAlerts(paginfo, engaged)
|
||||
if num_alerts == nil then
|
||||
num_alerts = interface.getNumAlerts(engaged, "host", _GET["entity_val"])
|
||||
end
|
||||
end
|
||||
|
||||
elseif status == "historical-flows" then
|
||||
if status == "historical-flows" then
|
||||
alerts = interface.getFlowAlerts(paginfo)
|
||||
if num_alerts == nil then
|
||||
num_alerts = interface.getNumFlowAlerts()
|
||||
if has_host_filter then
|
||||
num_alerts = interface.getNumFlowAlerts("host", _GET["entity_val"])
|
||||
else
|
||||
num_alerts = interface.getNumFlowAlerts()
|
||||
end
|
||||
end
|
||||
|
||||
else --if status == "historical" then
|
||||
alerts = interface.getAlerts(paginfo, engaged)
|
||||
if num_alerts == nil then
|
||||
num_alerts = interface.getNumAlerts(engaged)
|
||||
if has_host_filter then
|
||||
num_alerts = interface.getNumAlerts(engaged, "host", _GET["entity_val"])
|
||||
else
|
||||
num_alerts = interface.getNumAlerts(engaged)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue