mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 07:59:35 +00:00
Updated collapsed host stats
This commit is contained in:
parent
1b0ca2c507
commit
75c3035385
1 changed files with 5 additions and 2 deletions
|
|
@ -23,6 +23,7 @@ local ifid = _GET["ifid"]
|
|||
local host_info = url2hostinfo(_GET)
|
||||
local breed = _GET["breed"]
|
||||
local ndpi_category = _GET["ndpi_category"]
|
||||
local collapse_stats = (_GET["collapse_stats"] or "true")
|
||||
|
||||
if isEmptyString(ifid) then
|
||||
rc = rest_utils.consts.err.invalid_interface
|
||||
|
|
@ -80,6 +81,8 @@ for key, value in pairsByValues(_ifstats, rev) do
|
|||
|
||||
end
|
||||
|
||||
local collapsed = stats_utils.collapse_stats(res, 1, 3 --[[ threshold ]])
|
||||
if collapse_stats == "true" then
|
||||
res = stats_utils.collapse_stats(res, 1, 3 --[[ threshold ]])
|
||||
end
|
||||
|
||||
rest_utils.answer(rc, collapsed)
|
||||
rest_utils.answer(rc, res)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue