[VS] Add details on email and in report about hosts no longer down. (#8085)

This commit is contained in:
Nicolo Maio 2023-12-11 09:44:14 +01:00
parent 9c82a65568
commit ffd2c05eab
6 changed files with 115 additions and 22 deletions

View file

@ -292,11 +292,16 @@ end
-- ##################################################################
-- Function to format result
function vs_rest_utils.format_overview_result(result, search_map, sort, port)
function vs_rest_utils.format_overview_result(result, search_map, sort, port, was_down)
local rsp = {}
if result then
for _, value in ipairs(result) do
if (was_down) then
if value.was_down == false then
goto continue
end
end
local tcp_ports_string_list = value.tcp_ports_list
local udp_ports_string_list = value.udp_ports_list
@ -362,7 +367,7 @@ function vs_rest_utils.format_overview_result(result, search_map, sort, port)
end
rsp[#rsp].host_in_mem = cmp_result.host_in_mem
end
::continue::
end
if not isEmptyString(sort) and sort == 'ip' then