mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-06 03:45:26 +00:00
VS cleaned code naming and comments (#9590)
This commit is contained in:
parent
af3f7bd952
commit
7693e05d29
2 changed files with 45 additions and 44 deletions
|
|
@ -29,7 +29,7 @@ local base_url = ntop.getHttpPrefix() .. "/lua/vulnerability_scan.lua"
|
|||
local charts_available = areHostTimeseriesEnabled(ifId, nil)
|
||||
|
||||
local page = _GET["page"] or ('overview')
|
||||
local host_result = _GET["host"]
|
||||
local host_ip = _GET["host"]
|
||||
local printable = toboolean(_GET["printable"])
|
||||
local scan_type = _GET["scan_type"]
|
||||
local scan_date = _GET["scan_date"]
|
||||
|
|
@ -66,7 +66,7 @@ if not printable then
|
|||
},
|
||||
{
|
||||
active = page == "show_result",
|
||||
hidden = page ~= "show_result", -- disable the entry when the user is in the overview page
|
||||
hidden = page ~= "show_result", -- disable the entry when the user is in the overview page, host's ip is needed to jump to this page
|
||||
page_name = "show_result",
|
||||
label = i18n('scan_details')
|
||||
},
|
||||
|
|
@ -93,7 +93,7 @@ if (page == "scan_hosts" or page == "overview") then
|
|||
csrf = ntop.getRandomCSRFValue(),
|
||||
ifid = ifid,
|
||||
is_enterprise_l = ntop.isEnterpriseL(),
|
||||
host = host_result,
|
||||
host = host_ip,
|
||||
is_clickhouse_enabled = ntop.isClickHouseEnabled()
|
||||
}
|
||||
template.render("pages/vue_page.template", { vue_page_name = "PageVulnerabilityScan", page_context = json.encode(json_context) })
|
||||
|
|
@ -101,12 +101,13 @@ if (page == "scan_hosts" or page == "overview") then
|
|||
elseif (page == "show_result") then
|
||||
|
||||
interface.select(ifid)
|
||||
local is_in_mem = interface.getHostInfo(host_result) ~= nil
|
||||
|
||||
local is_in_mem = interface.getHostInfo(host_ip) ~= nil
|
||||
|
||||
local json_context = {
|
||||
csrf = ntop.getRandomCSRFValue(),
|
||||
ifid = ifid,
|
||||
host = host_result,
|
||||
host = host_ip,
|
||||
scan_type = scan_type,
|
||||
date = scan_date,
|
||||
is_in_mem = is_in_mem,
|
||||
|
|
@ -118,7 +119,7 @@ elseif (page == "add_notification_rec") then
|
|||
local json_context = {
|
||||
csrf = ntop.getRandomCSRFValue(),
|
||||
ifid = ifid,
|
||||
host = host_result
|
||||
host = host_ip
|
||||
}
|
||||
template.render("pages/vue_page.template", { vue_page_name = "PageHostsVARecipient", page_context = json.encode(json_context) })
|
||||
elseif (page == "open_ports") then
|
||||
|
|
@ -136,7 +137,7 @@ elseif (page == "va_historical") then
|
|||
local source_value_object = {
|
||||
ifid = ifid,
|
||||
is_va = true
|
||||
--host = host_result
|
||||
--host = host_ip
|
||||
}
|
||||
|
||||
graph_utils.drawNewGraphs(source_value_object)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue