Skip to content

Commit

Permalink
[Uptime] Fix monitor list down histogram (elastic#83411)
Browse files Browse the repository at this point in the history
  • Loading branch information
shahzad31 committed Nov 17, 2020
1 parent 3d94802 commit 08dd671
Show file tree
Hide file tree
Showing 4 changed files with 384 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export const getHistogramForMonitors = async (
},
},
};
const result = await queryContext.search(params);
const { body: result } = await queryContext.search(params);

const histoBuckets: any[] = result.aggregations?.histogram.buckets ?? [];
const simplified = histoBuckets.map((histoBucket: any): { timestamp: number; byId: any } => {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions x-pack/test/api_integration/apis/uptime/rest/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@ import {
settingsObjectId,
settingsObjectType,
} from '../../../../../plugins/uptime/server/lib/saved_objects';
import { registerMochaHooksForSnapshots } from '../../../../apm_api_integration/common/match_snapshot';

export default function ({ getService, loadTestFile }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const server = getService('kibanaServer');

describe('uptime REST endpoints', () => {
registerMochaHooksForSnapshots();

beforeEach('clear settings', async () => {
try {
await server.savedObjects.delete({
Expand Down
Loading

0 comments on commit 08dd671

Please sign in to comment.