mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-01 00:19:33 +00:00
traffic extraction jobs page to list and delete jobs, pcap download endpoint
This commit is contained in:
parent
7b269a28da
commit
2b565d1d63
13 changed files with 397 additions and 34 deletions
|
|
@ -139,13 +139,25 @@ function dumpInterfaceStats(interface_name)
|
|||
|
||||
res["breed"] = stats["breeds"]
|
||||
|
||||
if isAdministrator() and recording_utils.isEnabled(ifstats.id) then
|
||||
if recording_utils.isActive(ifstats.id) then
|
||||
res["traffic_recording"] = "recording"
|
||||
else
|
||||
res["traffic_recording"] = "failed"
|
||||
if recording_utils.isAvailable() then
|
||||
if recording_utils.isEnabled(ifstats.id) then
|
||||
if recording_utils.isActive(ifstats.id) then
|
||||
res["traffic_recording"] = "recording"
|
||||
else
|
||||
res["traffic_recording"] = "failed"
|
||||
end
|
||||
end
|
||||
|
||||
if recording_utils.isEnabled(ifstats.id) then
|
||||
local jobs_info = recording_utils.extractionJobsInfo(ifstats.id)
|
||||
if jobs_info.ready > 0 then
|
||||
res["traffic_extraction"] = "ready"
|
||||
elseif jobs_info.total > 0 then
|
||||
res["traffic_extraction"] = "processing"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
return res
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue