mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 23:49:33 +00:00
Adds numFlows to flows retrieval for proper pagination
numFlows was suppressed in an earlier commit but this caused issues with pagination of results.
This commit is contained in:
parent
01172f94fc
commit
fe5c6377aa
17 changed files with 48 additions and 30 deletions
|
|
@ -62,7 +62,9 @@ if(sortOrder == nil) then
|
|||
end
|
||||
|
||||
interface.select(ifname)
|
||||
flows_stats = interface.getFlowsInfo()
|
||||
local flows_stats = interface.getFlowsInfo()
|
||||
local total = flows_stats["numFlows"]
|
||||
flows_stats = flows_stats["flows"]
|
||||
|
||||
if (mode == "table") then
|
||||
print ("{ \"currentPage\" : " .. currentPage .. ",\n \"data\" : [\n")
|
||||
|
|
@ -70,12 +72,11 @@ if (mode == "table") then
|
|||
end
|
||||
|
||||
|
||||
total = 0
|
||||
processes = {}
|
||||
vals = {}
|
||||
num = 0
|
||||
|
||||
for _key, value in pairs(flows_stats) do
|
||||
for _key, value in ipairs(flows_stats) do
|
||||
p = flows_stats[_key]
|
||||
process = 1
|
||||
client_process = 1
|
||||
|
|
@ -283,7 +284,6 @@ if (mode == "table") then
|
|||
end
|
||||
end
|
||||
|
||||
total = total + 1
|
||||
end -- for
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue