Upgrade RxJS to 7 (#129087)

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Alejandro Fernández Haro 2022-04-12 21:40:55 +02:00 committed by GitHub
parent 5ee7c3d25a
commit 9d5aca591b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
260 changed files with 11471 additions and 16589 deletions

View file

@ -6,6 +6,7 @@
*/
import React, { useState, Fragment, useEffect, useCallback } from 'react';
import { firstValueFrom } from 'rxjs';
import { i18n } from '@kbn/i18n';
import { FormattedMessage } from '@kbn/i18n-react';
@ -147,8 +148,8 @@ export const EsQueryExpression = ({
const timeWindow = parseDuration(window);
const parsedQuery = JSON.parse(esQuery);
const now = Date.now();
const { rawResponse } = await data.search
.search({
const { rawResponse } = await firstValueFrom(
data.search.search({
params: buildSortedEventsQuery({
index,
from: new Date(now - timeWindow).toISOString(),
@ -160,7 +161,7 @@ export const EsQueryExpression = ({
track_total_hits: true,
}),
})
.toPromise();
);
const hits = rawResponse.hits;
setTestQueryResult(