Adds numHosts to hosts retrieval for proper pagination

numHosts was suppressed in an earlier commit but this caused
issues with pagination of results.
This commit is contained in:
Simone Mainardi 2016-08-25 19:05:35 +02:00
parent fe5c6377aa
commit 13875ec189
16 changed files with 35 additions and 21 deletions

View file

@ -112,7 +112,8 @@ hosts_stats = hosts_retrv_function(false, sortColumn, perPage, to_skip, sOrder,
country, os_, tonumber(vlan), tonumber(asn),
tonumber(network)) -- false = little details
if(hosts_stats == nil) then total = 0 else total = #hosts_stats end
if(hosts_stats == nil) then total = 0 else total = hosts_stats["numHosts"] end
hosts_stats = hosts_stats["hosts"]
-- for k,v in pairs(hosts_stats) do io.write(k.." ["..sortColumn.."]\n") end
-- io.write("->"..total.." ["..sortColumn.."]\n")