[7.x] [Uptime] Remove hard coded value for monitor states histograms (#64396) (#64895)

This commit is contained in:
Shahzad 2020-05-04 12:09:02 +02:00 committed by GitHub
parent d4467a73e9
commit c0d021a8ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 10 deletions

View file

@ -11,6 +11,6 @@ export { CONTEXT_DEFAULTS } from './context_defaults';
export * from './capabilities';
export * from './settings_defaults';
export { PLUGIN } from './plugin';
export { QUERY, STATES } from './query';
export { QUERY } from './query';
export * from './ui';
export * from './rest_api';

View file

@ -25,10 +25,3 @@ export const QUERY = {
'error.type',
],
};
export const STATES = {
// Number of results returned for a states query
LEGACY_STATES_QUERY_SIZE: 10,
// The maximum number of monitors that should be supported
MAX_MONITORS: 35000,
};

View file

@ -6,7 +6,7 @@
import { get, sortBy } from 'lodash';
import { QueryContext } from './query_context';
import { QUERY, STATES } from '../../../../common/constants';
import { QUERY } from '../../../../common/constants';
import {
Check,
Histogram,
@ -314,7 +314,7 @@ const getHistogramForMonitors = async (
by_id: {
terms: {
field: 'monitor.id',
size: STATES.LEGACY_STATES_QUERY_SIZE,
size: queryContext.size,
},
aggs: {
histogram: {