mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-06 03:45:26 +00:00
Possible fix related to empty timeseries chart
This commit is contained in:
parent
996ea35acd
commit
b2fe708dbc
6 changed files with 29 additions and 20 deletions
|
|
@ -3573,7 +3573,7 @@ function timeseries_info.retrieve_community_timeseries()
|
|||
end
|
||||
-- #################################
|
||||
|
||||
function timeseries_info.retrieve_specific_timeseries(tags, prefix)
|
||||
function timeseries_info.retrieve_specific_timeseries(tags, prefix, include_empty_ts)
|
||||
local timeseries_list = community_timeseries
|
||||
local timeseries = {}
|
||||
|
||||
|
|
@ -3631,15 +3631,17 @@ function timeseries_info.retrieve_specific_timeseries(tags, prefix)
|
|||
goto skip
|
||||
end
|
||||
|
||||
-- Remove empty timeseries but exclude the ones starting with top: from the check
|
||||
if not (info.schema:match("^top:")) then
|
||||
local tmp_tags = table.clone(tags)
|
||||
if not include_empty_ts then
|
||||
-- Remove empty timeseries but exclude the ones starting with top: from the check
|
||||
if not (info.schema:match("^top:")) then
|
||||
local tmp_tags = table.clone(tags)
|
||||
|
||||
local tot = 0
|
||||
local tot_serie = ts_utils.queryTotal(info.schema,
|
||||
tags.epoch_begin,
|
||||
tags.epoch_end, tmp_tags)
|
||||
if not tot_serie then goto skip end
|
||||
local tot = 0
|
||||
local tot_serie = ts_utils.queryTotal(info.schema,
|
||||
tags.epoch_begin,
|
||||
tags.epoch_end, tmp_tags)
|
||||
if not tot_serie then goto skip end
|
||||
end
|
||||
end
|
||||
|
||||
timeseries[#timeseries + 1] = info
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue