mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 15:39:33 +00:00
Add back end autorefresh support. (#7733)
This commit is contained in:
parent
e019554856
commit
e752919067
4 changed files with 63 additions and 10 deletions
|
|
@ -320,6 +320,27 @@ end
|
|||
|
||||
-- **********************************************************
|
||||
|
||||
-- Function to retrieve hosts list to scan just for status_info
|
||||
function vs_utils.check_in_progress_status()
|
||||
local res_string = ntop.getCache(host_to_scan_key)
|
||||
if not isEmptyString(res_string) and res_string ~= "[[]]" and res_string ~= "[]" then
|
||||
local hosts_to_scan_details = json.decode(res_string) or {}
|
||||
if hosts_to_scan_details then
|
||||
for _,value in ipairs(hosts_to_scan_details) do
|
||||
|
||||
-- Check IN PROGRESS --> FIX ME with enums
|
||||
if value.is_ok_last_scan == 4 then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return false
|
||||
end
|
||||
|
||||
-- **********************************************************
|
||||
|
||||
-- Function to retrieve last host scan result
|
||||
function vs_utils.retrieve_hosts_scan_result(scan_type, host)
|
||||
local path = get_report_path(scan_type, host)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue