mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 16:09:32 +00:00
Fixes incorrect rest api data
This commit is contained in:
parent
6bc6b49cfa
commit
ccb2a66c19
2 changed files with 9 additions and 7 deletions
|
|
@ -110,7 +110,10 @@ elseif mode == "dhcp" then
|
|||
dhcp_hosts = true
|
||||
end
|
||||
|
||||
|
||||
if all ~= nil then
|
||||
perPage = -1
|
||||
currentPage = 0
|
||||
end
|
||||
|
||||
local hosts_stats = hosts_retrv_function(false, sortColumn, perPage, to_skip, sOrder,
|
||||
country, os_, tonumber(vlan), tonumber(asn),
|
||||
|
|
@ -131,11 +134,6 @@ if hosts_stats == nil then
|
|||
return
|
||||
end
|
||||
|
||||
if all ~= nil then
|
||||
perPage = 0
|
||||
currentPage = 0
|
||||
end
|
||||
|
||||
function get_host_name(h)
|
||||
if h["name"] == nil then
|
||||
if h["ip"] ~= nil then
|
||||
|
|
@ -232,6 +230,10 @@ for _key, _value in pairsByKeys(vals, funct) do
|
|||
|
||||
record["name"] = name
|
||||
|
||||
record["score"] = {}
|
||||
record["score"]["total"] = value["score"]
|
||||
record["score"]["as_client"] = value["score.as_client"]
|
||||
record["score"]["as_server"] = value["score.as_server"]
|
||||
record["thpt"] = {}
|
||||
record["thpt"]["pps"] = value["throughput_pps"]
|
||||
record["thpt"]["bps"] = value["throughput_bps"]*8
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue