mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 15:39:33 +00:00
Fix page numbers in Applications and Categories when a filter is selected
This commit is contained in:
parent
53cbcc79c2
commit
4a4f40dfd3
1 changed files with 12 additions and 12 deletions
|
|
@ -89,6 +89,18 @@ for app_name, app_id in pairs(applications) do
|
|||
|
||||
local cat = interface.getnDPIProtoCategory(tonumber(app_id))
|
||||
|
||||
if not isEmptyString(proto_filter) then
|
||||
if tostring(app_id) ~= proto_filter then
|
||||
goto continue
|
||||
end
|
||||
end
|
||||
|
||||
if not isEmptyString(category_filter) then
|
||||
if tostring(cat.id) ~= category_filter then
|
||||
goto continue
|
||||
end
|
||||
end
|
||||
|
||||
applications[app_name] = {app_name = app_name, app_id = app_id, cat = cat}
|
||||
num_apps = num_apps + 1
|
||||
|
||||
|
|
@ -115,18 +127,6 @@ local cur_num = 0
|
|||
for app, _ in pairsByValues(sorter, sOrder) do
|
||||
app = applications[app]
|
||||
|
||||
if not isEmptyString(proto_filter) then
|
||||
if tostring(app["app_id"]) ~= proto_filter then
|
||||
goto continue
|
||||
end
|
||||
end
|
||||
|
||||
if not isEmptyString(category_filter) then
|
||||
if tostring(app.cat.id) ~= category_filter then
|
||||
goto continue
|
||||
end
|
||||
end
|
||||
|
||||
cur_num = cur_num + 1
|
||||
if cur_num <= to_skip then
|
||||
goto continue
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue