Skip to content

Commit

Permalink
[Metrics UI] Use bucketSize from request options for overview query (#…
Browse files Browse the repository at this point in the history
…145032)

## Summary

This PR fixes #145030 by using the `options.bucketSize` in the
`date_histogram` for the Overview query.
  • Loading branch information
simianhacker authored Nov 14, 2022
1 parent 20e2fb5 commit 1cea029
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export const createTopNodesQuery = (
timeseries: {
date_histogram: {
field: '@timestamp',
fixed_interval: '1m',
fixed_interval: options.bucketSize,
extended_bounds: {
min: options.timerange.from,
max: options.timerange.to,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export default function ({ getService }: FtrProviderContext) {

expect(series.length).to.be(1);
expect(series[0].id).to.be('demo-stack-mysql-01');
expect(series[0].timeseries[1].timestamp - series[0].timeseries[0].timestamp).to.be(300_000);
});
});
}

0 comments on commit 1cea029

Please sign in to comment.