[Metrics UI] Use bucketSize from request options for overview query (#145032)

## Summary

This PR fixes #145030 by using the `options.bucketSize` in the
`date_histogram` for the Overview query.
This commit is contained in:
Chris Cowan 2022-11-14 12:31:22 -07:00 committed by GitHub
parent 20e2fb5e1e
commit 1cea0299ac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -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,

View file

@ -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);
});
});
}