Skip to content

Commit

Permalink
Merge branch 'resolver/ecs-username-fix' of https://github.com/bkimme…
Browse files Browse the repository at this point in the history
…l/kibana into resolver/ecs-username-fix
  • Loading branch information
Brent Kimmel committed Jul 28, 2020
2 parents e5a1b9a + dd30072 commit 0d128f0
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions x-pack/plugins/infra/common/http_api/snapshot_api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ export const SnapshotRequestRT = rt.intersection([
region: rt.string,
filterQuery: rt.union([rt.string, rt.null]),
includeTimeseries: rt.boolean,
overrideCompositeSize: rt.number,
}),
]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ describe('Metrics UI Observability Homepage Functions', () => {
groupBy: [],
nodeType: 'host',
includeTimeseries: true,
overrideCompositeSize: 5,
timerange: {
from: startTime.valueOf(),
to: endTime.valueOf(),
Expand Down
1 change: 1 addition & 0 deletions x-pack/plugins/infra/public/metrics_overview_fetchers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ export const createMetricsFetchData = (
groupBy: [],
nodeType: 'host',
includeTimeseries: true,
overrideCompositeSize: 5,
timerange: {
from: start,
to: end,
Expand Down
4 changes: 2 additions & 2 deletions x-pack/plugins/infra/server/lib/snapshot/snapshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ const requestGroupedNodes = async (
aggregations: {
nodes: {
composite: {
size: SNAPSHOT_COMPOSITE_REQUEST_SIZE,
size: options.overrideCompositeSize || SNAPSHOT_COMPOSITE_REQUEST_SIZE,
sources: getGroupedNodesSources(options),
},
aggs: {
Expand Down Expand Up @@ -142,7 +142,7 @@ const requestNodeMetrics = async (
aggregations: {
nodes: {
composite: {
size: SNAPSHOT_COMPOSITE_REQUEST_SIZE,
size: options.overrideCompositeSize || SNAPSHOT_COMPOSITE_REQUEST_SIZE,
sources: getMetricsSources(options),
},
aggregations: {
Expand Down
2 changes: 2 additions & 0 deletions x-pack/plugins/infra/server/routes/snapshot/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export const initSnapshotRoute = (libs: InfraBackendLibs) => {
accountId,
region,
includeTimeseries,
overrideCompositeSize,
} = pipe(
SnapshotRequestRT.decode(request.body),
fold(throwErrors(Boom.badRequest), identity)
Expand All @@ -59,6 +60,7 @@ export const initSnapshotRoute = (libs: InfraBackendLibs) => {
metrics,
timerange,
includeTimeseries,
overrideCompositeSize,
};

const searchES = <Hit = {}, Aggregation = undefined>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@
import React from 'react';
import { PingHistogramComponent, PingHistogramComponentProps } from '../ping_histogram';
import { renderWithRouter, shallowWithRouter, MountWithReduxProvider } from '../../../../lib';
import moment from 'moment';

describe('PingHistogram component', () => {
beforeAll(() => {
moment.prototype.fromNow = jest.fn(() => 'a year ago');
});

const props: PingHistogramComponentProps = {
absoluteStartDate: 1548697920000,
absoluteEndDate: 1548700920000,
Expand Down

0 comments on commit 0d128f0

Please sign in to comment.