mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Splitted traffic directions in iface ndpi timeseries (#9137)
This commit is contained in:
parent
6fb4cdc448
commit
a5f89e6357
17 changed files with 2203 additions and 2077 deletions
|
|
@ -215,27 +215,6 @@ end
|
|||
|
||||
-- ########################################################
|
||||
|
||||
function graph_utils.getProtoVolume(ifName, start_time, end_time, ts_options)
|
||||
ifId = getInterfaceId(ifName)
|
||||
local series = ts_utils.listSeries("iface:ndpi", {ifid = ifId}, start_time)
|
||||
|
||||
ret = {}
|
||||
|
||||
for _, tags in ipairs(series or {}) do
|
||||
-- NOTE: this could be optimized via a dedicated driver call
|
||||
local data = ts_utils.query("iface:ndpi", tags, start_time, end_time,
|
||||
ts_options)
|
||||
|
||||
if (data ~= nil) and (data.statistics.total > 0) then
|
||||
ret[tags.protocol] = data.statistics.total
|
||||
end
|
||||
end
|
||||
|
||||
return (ret)
|
||||
end
|
||||
|
||||
-- ########################################################
|
||||
|
||||
function graph_utils.breakdownBar(sent, sentLabel, rcvd, rcvdLabel,
|
||||
thresholdLow, thresholdHigh)
|
||||
if ((sent + rcvd) > 0) then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue