mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 07:59:35 +00:00
Implements flow alerts
This commit is contained in:
parent
d3eca30401
commit
0e4e4e5906
10 changed files with 479 additions and 86 deletions
|
|
@ -20,17 +20,19 @@ dofile(dirs.installdir .. "/scripts/lua/inc/menu.lua")
|
|||
|
||||
local num_alerts = interface.getNumAlerts(false --[[ NOT engaged --]])
|
||||
local num_engaged_alerts = interface.getNumAlerts(true --[[ engaged --]])
|
||||
local num_flow_alerts = interface.getNumFlowAlerts()
|
||||
|
||||
if ntop.getPrefs().are_alerts_enabled == false then
|
||||
print("<div class=\"alert alert alert-warning\"><img src=".. ntop.getHttpPrefix() .. "/img/warning.png> Alerts are disabled. Please check the preferences page to enable them.</div>")
|
||||
--return
|
||||
elseif num_alerts == 0 and num_engaged_alerts == 0 then
|
||||
elseif num_alerts == 0 and num_flow_alerts == 0 and num_engaged_alerts == 0 then
|
||||
print("<div class=\"alert alert alert-info\"><img src=".. ntop.getHttpPrefix() .. "/img/info_icon.png> No recorded alerts so far for interface "..ifname.."</div>")
|
||||
else
|
||||
|
||||
if ntop.isEnterprise() then
|
||||
drawAlertStatsCharts()
|
||||
-- drawAlertStatsCharts()
|
||||
end
|
||||
drawAlertTables(num_alerts, num_engaged_alerts)
|
||||
drawAlertTables(num_alerts, num_engaged_alerts, num_flow_alerts)
|
||||
|
||||
end -- closes if ntop.getPrefs().are_alerts_enabled == false then
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue