mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-06 03:45:26 +00:00
Fix invalid upsampling due to missing points in composed charts
This commit is contained in:
parent
bea63668b8
commit
4628ad3bcd
2 changed files with 5 additions and 2 deletions
|
|
@ -496,7 +496,9 @@ local function influx2Series(schema, tstart, tend, tags, options, data, time_ste
|
|||
|
||||
-- Fill the missing points at the end
|
||||
while((tend - next_t) >= 0) do
|
||||
if(next_t > last_ts) then
|
||||
-- NOTE: fill_series is required for composed charts. In such case,
|
||||
-- not filling the serie would result into an incorrect upsampling
|
||||
if((not options.fill_series) and (next_t > last_ts)) then
|
||||
-- skip values exceeding the last point
|
||||
break
|
||||
end
|
||||
|
|
|
|||
|
|
@ -282,6 +282,7 @@ function ts_utils.getQueryOptions(overrides)
|
|||
initial_point = false, -- add an extra initial point, not accounted in statistics but useful for drawing graphs
|
||||
with_series = false, -- in topk query, if true, also get top items series data
|
||||
no_timeout = true, -- do not abort queries automatically by default
|
||||
fill_series = false, -- if true, filling missing points is required
|
||||
}, overrides or {})
|
||||
end
|
||||
|
||||
|
|
@ -480,7 +481,7 @@ function ts_utils.queryTopk(schema_name, tags, tstart, tend, options)
|
|||
top_items.series = {}
|
||||
|
||||
-- Query the top items data
|
||||
local options = table.merge(query_options, {calculate_stats = false})
|
||||
local options = table.merge(query_options, {calculate_stats = false, fill_series = true})
|
||||
local count = 0
|
||||
local step = nil
|
||||
local raw_step = nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue