mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 16:09:32 +00:00
tmp
This commit is contained in:
parent
d3b97fdaaf
commit
52e9fcf8a2
3 changed files with 24 additions and 29 deletions
|
|
@ -17,20 +17,12 @@ end
|
|||
local host = _GET["host"]
|
||||
local scan_type = _GET["scan_type"]
|
||||
|
||||
tprint("HERE1")
|
||||
|
||||
|
||||
if isEmptyString(host) or isEmptyString(scan_type) then
|
||||
rest_utils.answer(rest_utils.consts.err.invalid_args)
|
||||
end
|
||||
|
||||
local result = retrieve_host_scan_result(host, scan_type)
|
||||
if result == {} then
|
||||
tprint("HERE2")
|
||||
rest_utils.answer(rest_utils.consts.success.ok, result )
|
||||
else
|
||||
local extra_headers = {}
|
||||
tprint("HERE3")
|
||||
extra_headers["Content-Disposition"] = "attachment;filename=\"scan_result_export_"..os.time()..".txt\""
|
||||
rest_utils.vanilla_payload_response(rest_utils.consts.success.ok, result, "application/octet-stream", extra_headers)
|
||||
end
|
||||
|
||||
local extra_headers = {}
|
||||
extra_headers["Content-Disposition"] = "attachment;filename=\"scan_result_export_"..os.time()..".txt\""
|
||||
rest_utils.vanilla_payload_response(rest_utils.consts.success.ok, result, "application/octet-stream", extra_headers)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue