-- -- (C) 2013-18 - ntop.org -- local dirs = ntop.getDirs() package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path require "lua_utils" require "alert_utils" local page_utils = require("page_utils") local alerts_api = require("alerts_api") sendHTTPContentTypeHeader('text/html') page_utils.print_header(i18n("show_alerts.detected_alerts")) checkDeleteStoredAlerts() active_page = "alerts" dofile(dirs.installdir .. "/scripts/lua/inc/menu.lua") local has_engaged_alerts = hasAlerts("engaged", getTabParameters(_GET, "engaged")) local has_past_alerts = hasAlerts("historical", getTabParameters(_GET, "historical")) local has_flow_alerts = hasAlerts("historical-flows", getTabParameters(_GET, "historical-flows")) local has_disabled_alerts = alerts_api.hasEntitiesWithAlertsDisabled(interface.getId()) if ntop.getPrefs().are_alerts_enabled == false then print("