mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 07:59:35 +00:00
Fix various bugs and add ports in the host scan modal. (#7698)
This commit is contained in:
parent
a7c49205ef
commit
a93201e42f
20 changed files with 540 additions and 109 deletions
|
|
@ -14,9 +14,12 @@ local vs_utils = require "vs_utils"
|
|||
|
||||
local host = _GET["host"]
|
||||
local scan_type = _GET["scan_type"]
|
||||
local delete_all_scan_hosts = _GET["delete_all_scan_hosts"]
|
||||
|
||||
if isEmptyString(host) or isEmptyString(scan_type) then
|
||||
rest_utils.answer(rest_utils.consts.err.bad_content)
|
||||
if not delete_all_scan_hosts then
|
||||
if isEmptyString(host) or isEmptyString(scan_type) then
|
||||
rest_utils.answer(rest_utils.consts.err.bad_content)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
|
@ -24,7 +27,16 @@ local function delete_host_to_scan(ip, scan_type)
|
|||
return vs_utils.delete_host_to_scan(ip, scan_type)
|
||||
end
|
||||
|
||||
local del_result = delete_host_to_scan(host,scan_type)
|
||||
local function delete_all_hosts_to_scan()
|
||||
return vs_utils.delete_host_to_scan(nil, nil, true)
|
||||
end
|
||||
|
||||
local del_result = 0
|
||||
if not delete_all_scan_hosts then
|
||||
del_result = delete_host_to_scan(host,scan_type)
|
||||
else
|
||||
del_result = delete_all_hosts_to_scan()
|
||||
end
|
||||
|
||||
if del_result == 1 then
|
||||
rest_utils.answer(rest_utils.consts.success.ok)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue