mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
This commit is contained in:
parent
9668851b9c
commit
2519a8acb2
6 changed files with 211 additions and 109 deletions
|
|
@ -237,6 +237,14 @@ local function format_epoch(value)
|
|||
end
|
||||
end
|
||||
|
||||
local function format_back_duration_epoch(value)
|
||||
if (value.last_scan ~= nil and value.last_scan.duration ~= nil) then
|
||||
return format_utils.timeToSeconds(value.last_scan.duration)
|
||||
else
|
||||
return value.last_scan.duration
|
||||
end
|
||||
end
|
||||
|
||||
-- ##################################################################
|
||||
|
||||
function vs_rest_utils.format_port_label(port, service_name, protocol)
|
||||
|
|
@ -314,6 +322,8 @@ function vs_rest_utils.format_overview_result(result, search_map, sort, port)
|
|||
end
|
||||
if (rsp[#rsp].last_scan) then
|
||||
rsp[#rsp].last_scan.time = format_epoch(value)
|
||||
rsp[#rsp].last_scan.duration_epoch = format_back_duration_epoch(value)
|
||||
|
||||
end
|
||||
else
|
||||
if (value.host == search_map or string.find(value.host, search_map) or
|
||||
|
|
@ -324,6 +334,7 @@ function vs_rest_utils.format_overview_result(result, search_map, sort, port)
|
|||
rsp[#rsp].num_open_ports = format_high_num_value_for_tables(value, "num_open_ports")
|
||||
if (rsp[#rsp].last_scan) then
|
||||
rsp[#rsp].last_scan.time = format_epoch(value)
|
||||
rsp[#rsp].last_scan.duration_epoch = format_back_duration_epoch(value)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue