mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 16:09:32 +00:00
Fixes empty timeseries seen in the charts
This commit is contained in:
parent
d48e4005c1
commit
63bba504e8
2 changed files with 15 additions and 8 deletions
|
|
@ -197,6 +197,7 @@ end
|
|||
|
||||
-- Add layout information
|
||||
local layout = graph_utils.get_timeseries_layout(ts_schema)
|
||||
local filtered_serie = {}
|
||||
|
||||
for _, serie in pairs(res.series or {}) do
|
||||
|
||||
|
|
@ -206,8 +207,18 @@ for _, serie in pairs(res.series or {}) do
|
|||
end
|
||||
end
|
||||
|
||||
local ts_tot_value = 0
|
||||
for _, ts_value in pairs(serie.data or {}) do
|
||||
ts_tot_value = ts_tot_value + tonumber(ts_value or 0)
|
||||
end
|
||||
|
||||
if ts_tot_value > 0 then
|
||||
filtered_serie[#filtered_serie + 1] = serie
|
||||
end
|
||||
end
|
||||
|
||||
res.series = filtered_serie
|
||||
|
||||
if extended_times then
|
||||
if res.series and res.step then
|
||||
for k, serie in pairs(res.series) do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue