Add link to the past alerts fom the host

This commit is contained in:
Alfredo Cardigliano 2021-04-27 14:54:38 +02:00
parent 04f7486f31
commit bca2040742
2 changed files with 16 additions and 5 deletions

View file

@ -1778,12 +1778,16 @@ function hostinfo2detailsurl(host_info, href_params, href_check)
if not href_check or hostdetails_exists(host_info, href_params) then
local url_params = table.tconcat(href_params or {}, "=", "&")
if href_params and href_params.page == "alerts" then
-- Alerts page for the host is under the Alerts menu
res = string.format("%s/lua/alert_stats.lua?page=host&status=engaged&ip=%s,eqC",
-- Alerts pages for the host are in alert_stats.lua (Alerts menu)
if href_params and href_params.page == "engaged-alerts" then
res = string.format("%s/lua/alert_stats.lua?page=host&status=engaged&ip=%s,eq",
ntop.getHttpPrefix(),
hostinfo2hostkey(host_info))
elseif href_params and href_params.page == "alerts" then
res = string.format("%s/lua/alert_stats.lua?page=host&status=historical&ip=%s,eq",
ntop.getHttpPrefix(),
hostinfo2hostkey(host_info))
-- All other pages are in host_details.lua
else
res = string.format("%s/lua/host_details.lua?%s%s%s",
ntop.getHttpPrefix(),