mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 23:49:33 +00:00
Visualization/Retrieval of Host Alerts
This commit is contained in:
parent
031c4c4d4f
commit
dda9a2ea64
7 changed files with 336 additions and 136 deletions
|
|
@ -35,8 +35,19 @@ initial_idx = (currentPage-1)*perPage
|
|||
|
||||
interface.select(ifname)
|
||||
|
||||
alerts = interface.getAlerts(initial_idx, perPage, engaged)
|
||||
num_alerts = interface.getNumAlerts(engaged)
|
||||
local alerts
|
||||
local num_alerts
|
||||
|
||||
if _GET["entity"] == "host" then
|
||||
alerts = interface.getAlerts(initial_idx, perPage, engaged, "host", _GET["entity_val"])
|
||||
num_alerts = interface.getNumAlerts(engaged, "host", _GET["entity_val"])
|
||||
else
|
||||
alerts = interface.getAlerts(initial_idx, perPage, engaged)
|
||||
num_alerts = interface.getNumAlerts(engaged)
|
||||
end
|
||||
|
||||
-- tprint(interface.getAlerts(initial_idx, perPage, engaged, "host", "192.168.1.29@0"))
|
||||
-- tprint(interface.getNumAlerts(engaged, "host", "192.168.1.29@0"))
|
||||
|
||||
print ("{ \"currentPage\" : " .. currentPage .. ",\n \"data\" : [\n")
|
||||
total = 0
|
||||
|
|
@ -67,3 +78,4 @@ print ("\n], \"perPage\" : " .. perPage .. ",\n")
|
|||
|
||||
print ("\"sort\" : [ [ \"\", \"\" ] ],\n")
|
||||
print ("\"totalRows\" : " ..num_alerts .. " \n}")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue