mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Experimental TS code
This commit is contained in:
parent
cfcc88554d
commit
b8a870b631
13 changed files with 405 additions and 46 deletions
|
|
@ -209,4 +209,30 @@ end
|
|||
|
||||
-- ########################################################
|
||||
|
||||
function callback_utils.uploadTSdata()
|
||||
local url = ntop.getCache("ntopng.prefs.ts_post_data_url")
|
||||
|
||||
if((url == nil) or (url == "")) then
|
||||
return
|
||||
end
|
||||
|
||||
while(true) do
|
||||
local fname = ntop.lpopCache("ntopng.ts_file_queue")
|
||||
local ret
|
||||
|
||||
if((fname == nil) or (fname == "")) then
|
||||
break
|
||||
end
|
||||
|
||||
-- Delete the file after POST
|
||||
ret = ntop.postHTTPTextFile("", "", url, fname, true)
|
||||
|
||||
if(ret ~= true) then
|
||||
print("[ERROR] POST of "..fname.." failed\n")
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
-- ########################################################
|
||||
|
||||
return callback_utils
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue