mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-03 01:10:10 +00:00
Fixed active scan issues (#9616)
* Changed vulnerability scan to active scan * Fixed active scan issues
This commit is contained in:
parent
5d0c256207
commit
6fa1473fab
2 changed files with 15 additions and 7 deletions
|
|
@ -36,6 +36,14 @@ local scan_date = _GET["scan_date"]
|
|||
local ifid = _GET["ifid"]
|
||||
local epoch = tonumber(_GET["epoch"] or 0)
|
||||
|
||||
local navbar_title = i18n("scan_hosts")
|
||||
|
||||
if host_ip ~= nil then
|
||||
navbar_title = "<a href='" .. base_url .. "'>" .. navbar_title .. ": " .. "</a>" .. host_ip
|
||||
end
|
||||
|
||||
local is_host_defined = host_ip ~= nil
|
||||
|
||||
if isEmptyString(ifid) then
|
||||
ifid = interface.getId()
|
||||
end
|
||||
|
|
@ -43,24 +51,24 @@ end
|
|||
if not printable then
|
||||
dofile(dirs.installdir .. "/scripts/lua/inc/menu.lua")
|
||||
|
||||
page_utils.print_navbar(i18n("scan_hosts"), base_url .. "?", {{
|
||||
page_utils.print_navbar(navbar_title, base_url .. "?", {{
|
||||
active = page == "overview" or page == nil,
|
||||
page_name = "overview",
|
||||
label = "<i class=\"fas fa-lg fa-home\"></i>"
|
||||
},{
|
||||
hidden = not areAlertsEnabled() or not auth.has_capability(auth.capabilities.alerts),
|
||||
hidden = not areAlertsEnabled() or not auth.has_capability(auth.capabilities.alerts) or is_host_defined,
|
||||
active = page == "alerts",
|
||||
page_name = "alerts",
|
||||
label = "<i class='fas fa-lg fa-exclamation-triangle' title='" .. i18n("alerts_dashboard.alerts") .. "'></i>",
|
||||
url = ntop.getHttpPrefix() .."/lua/alert_stats.lua?page=am_host&alert_id=4184%3Beq&is_va=true"
|
||||
}, {
|
||||
hidden = not ntop.isPro(),--not charts_available or page == "overview" or page == nil,
|
||||
hidden = not ntop.isPro() or is_host_defined,--not charts_available or page == "overview" or page == nil,
|
||||
active = page == "va_historical",
|
||||
page_name = "va_historical",
|
||||
label = "<i class='fas fa-lg fa-chart-area' title='" .. i18n("historical") .. "'></i>"
|
||||
}, {
|
||||
active = page == "open_ports",
|
||||
hidden = not ntop.isEnterpriseL(), -- disable the entry when the user is in the overview page
|
||||
hidden = not ntop.isEnterpriseL() or is_host_defined, -- disable the entry when the user is in the overview page
|
||||
page_name = "open_ports",
|
||||
label = i18n('hosts_stats.page_scan_hosts.num_open_ports')
|
||||
},
|
||||
|
|
@ -73,13 +81,13 @@ if not printable then
|
|||
{
|
||||
active = page == "report",
|
||||
page_name = "report",
|
||||
hidden = not(ntop.isEnterpriseL() and not ntop.isClickHouseEnabled()),
|
||||
hidden = not(ntop.isEnterpriseL() and not ntop.isClickHouseEnabled()) or not is_host_defined,
|
||||
url = ntop.getHttpPrefix() .."/lua/vulnerability_scan.lua?page=report&report_template=vs_result&ifid="..ifid,
|
||||
label = i18n('hosts_stats.page_scan_hosts.download_page')
|
||||
},
|
||||
{
|
||||
active = page == "reports",
|
||||
hidden = not(ntop.isEnterpriseL() and ntop.isClickHouseEnabled()),
|
||||
hidden = not(ntop.isEnterpriseL() and ntop.isClickHouseEnabled()) or is_host_defined,
|
||||
page_name = "reports",
|
||||
label = i18n('hosts_stats.page_scan_hosts.reports_page.reports')
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue