mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 23:49:33 +00:00
Implements class Paginator to better handle results
A new Paginator class has been implemented. The class is generic in the sense that it accepts lua tables as input in order to cofigure, for exampe, the number of results per page and so on.
This commit is contained in:
parent
63879f9635
commit
5048f0d9af
11 changed files with 382 additions and 20 deletions
|
|
@ -82,7 +82,10 @@ else
|
|||
end
|
||||
local total = 0
|
||||
|
||||
local flows = interface.getFlowsInfo(host_info["host"], nil, "column_bytes", host_stats_flows_num, 0, false)
|
||||
local paginfo = {["sortColumn"]="column_bytes", ["a2zSortOrder"]=false,
|
||||
["maxHits"]=host_stats_flows_num, ["toSkip"]=0, ["detailedResults"]=true}
|
||||
--local flows = interface.getFlowsInfo(host_info["host"], nil, "column_bytes", host_stats_flows_num, 0, false)
|
||||
local flows = interface.getFlowsInfo(host_info["host"], paginfo)
|
||||
flows,total = aggregateFlowsStats(flows)
|
||||
for i, fl in ipairs(flows) do
|
||||
flows[i] = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue