Skip to content

Commit

Permalink
[7.x] [Uptime] Remove hard coded value for monitor states histograms (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
shahzad31 authored May 4, 2020
1 parent d4467a7 commit c0d021a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
2 changes: 1 addition & 1 deletion x-pack/plugins/uptime/common/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
7 changes: 0 additions & 7 deletions x-pack/plugins/uptime/common/constants/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -314,7 +314,7 @@ const getHistogramForMonitors = async (
by_id: {
terms: {
field: 'monitor.id',
size: STATES.LEGACY_STATES_QUERY_SIZE,
size: queryContext.size,
},
aggs: {
histogram: {
Expand Down

0 comments on commit c0d021a

Please sign in to comment.