Skip to content

Commit dd30072

Browse files
Merge branch 'master' into resolver/ecs-username-fix
2 parents 3628568 + 2d8a41d commit dd30072

File tree

6 files changed

+12
-2
lines changed

6 files changed

+12
-2
lines changed

x-pack/plugins/infra/common/http_api/snapshot_api.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ export const SnapshotRequestRT = rt.intersection([
107107
region: rt.string,
108108
filterQuery: rt.union([rt.string, rt.null]),
109109
includeTimeseries: rt.boolean,
110+
overrideCompositeSize: rt.number,
110111
}),
111112
]);
112113

x-pack/plugins/infra/public/metrics_overview_fetchers.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ describe('Metrics UI Observability Homepage Functions', () => {
7575
groupBy: [],
7676
nodeType: 'host',
7777
includeTimeseries: true,
78+
overrideCompositeSize: 5,
7879
timerange: {
7980
from: startTime.valueOf(),
8081
to: endTime.valueOf(),

x-pack/plugins/infra/public/metrics_overview_fetchers.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ export const createMetricsFetchData = (
8787
groupBy: [],
8888
nodeType: 'host',
8989
includeTimeseries: true,
90+
overrideCompositeSize: 5,
9091
timerange: {
9192
from: start,
9293
to: end,

x-pack/plugins/infra/server/lib/snapshot/snapshot.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ const requestGroupedNodes = async (
8686
aggregations: {
8787
nodes: {
8888
composite: {
89-
size: SNAPSHOT_COMPOSITE_REQUEST_SIZE,
89+
size: options.overrideCompositeSize || SNAPSHOT_COMPOSITE_REQUEST_SIZE,
9090
sources: getGroupedNodesSources(options),
9191
},
9292
aggs: {
@@ -142,7 +142,7 @@ const requestNodeMetrics = async (
142142
aggregations: {
143143
nodes: {
144144
composite: {
145-
size: SNAPSHOT_COMPOSITE_REQUEST_SIZE,
145+
size: options.overrideCompositeSize || SNAPSHOT_COMPOSITE_REQUEST_SIZE,
146146
sources: getMetricsSources(options),
147147
},
148148
aggregations: {

x-pack/plugins/infra/server/routes/snapshot/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export const initSnapshotRoute = (libs: InfraBackendLibs) => {
4040
accountId,
4141
region,
4242
includeTimeseries,
43+
overrideCompositeSize,
4344
} = pipe(
4445
SnapshotRequestRT.decode(request.body),
4546
fold(throwErrors(Boom.badRequest), identity)
@@ -59,6 +60,7 @@ export const initSnapshotRoute = (libs: InfraBackendLibs) => {
5960
metrics,
6061
timerange,
6162
includeTimeseries,
63+
overrideCompositeSize,
6264
};
6365

6466
const searchES = <Hit = {}, Aggregation = undefined>(

x-pack/plugins/uptime/public/components/common/charts/__tests__/ping_histogram.test.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,13 @@
77
import React from 'react';
88
import { PingHistogramComponent, PingHistogramComponentProps } from '../ping_histogram';
99
import { renderWithRouter, shallowWithRouter, MountWithReduxProvider } from '../../../../lib';
10+
import moment from 'moment';
1011

1112
describe('PingHistogram component', () => {
13+
beforeAll(() => {
14+
moment.prototype.fromNow = jest.fn(() => 'a year ago');
15+
});
16+
1217
const props: PingHistogramComponentProps = {
1318
absoluteStartDate: 1548697920000,
1419
absoluteEndDate: 1548700920000,

0 commit comments

Comments
 (0)