[Metrics UI] Increase groupBy pagination size on Metric Threshold alerts (#99683)

This commit is contained in:
Zacqary Adam Xeper 2021-05-11 17:29:07 -05:00 committed by GitHub
parent 548698bcc0
commit c328ab0145
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -13,6 +13,7 @@ import { createPercentileAggregation } from './create_percentile_aggregation';
import { calculateDateHistogramOffset } from '../../../metrics/lib/calculate_date_histogram_offset';
const MINIMUM_BUCKETS = 5;
const COMPOSITE_RESULTS_PER_PAGE = 100;
const getParsedFilterQuery: (filterQuery: string | undefined) => Record<string, any> | null = (
filterQuery
@ -83,7 +84,7 @@ export const getElasticsearchMetricQuery = (
? {
groupings: {
composite: {
size: 10,
size: COMPOSITE_RESULTS_PER_PAGE,
sources: Array.isArray(groupBy)
? groupBy.map((field, index) => ({
[`groupBy${index}`]: {