mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 18:51:07 -04:00
Upgrade RxJS to 7 (#129087)
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
5ee7c3d25a
commit
9d5aca591b
260 changed files with 11471 additions and 16589 deletions
|
@ -32,6 +32,7 @@ import {
|
|||
EuiTabbedContentTab,
|
||||
} from '@elastic/eui';
|
||||
|
||||
import { lastValueFrom } from 'rxjs';
|
||||
import { CoreStart } from '../../../../src/core/public';
|
||||
import { mountReactNode } from '../../../../src/core/public/utils';
|
||||
import { NavigationPublicPluginStart } from '../../../../src/plugins/navigation/public';
|
||||
|
@ -306,9 +307,9 @@ export const SearchExamplesApp = ({
|
|||
const abortController = new AbortController();
|
||||
setAbortController(abortController);
|
||||
setIsLoading(true);
|
||||
const { rawResponse: res } = await searchSource
|
||||
.fetch$({ abortSignal: abortController.signal })
|
||||
.toPromise();
|
||||
const { rawResponse: res } = await lastValueFrom(
|
||||
searchSource.fetch$({ abortSignal: abortController.signal })
|
||||
);
|
||||
setRawResponse(res);
|
||||
|
||||
const message = <EuiText>Searched {res.hits.total} documents.</EuiText>;
|
||||
|
|
|
@ -30,7 +30,7 @@ import {
|
|||
EuiTitle,
|
||||
} from '@elastic/eui';
|
||||
import { catchError, map, tap } from 'rxjs/operators';
|
||||
import { of } from 'rxjs';
|
||||
import { lastValueFrom, of } from 'rxjs';
|
||||
|
||||
import { CoreStart } from '../../../../src/core/public';
|
||||
import { mountReactNode } from '../../../../src/core/public/utils';
|
||||
|
@ -693,9 +693,8 @@ function doSearch(
|
|||
const startTs = performance.now();
|
||||
|
||||
// Submit the search request using the `data.search` service.
|
||||
return data.search
|
||||
.search(req, { sessionId })
|
||||
.pipe(
|
||||
return lastValueFrom(
|
||||
data.search.search(req, { sessionId }).pipe(
|
||||
tap((res) => {
|
||||
if (isCompleteResponse(res)) {
|
||||
const avgResult: number | undefined = res.rawResponse.aggregations
|
||||
|
@ -724,7 +723,7 @@ function doSearch(
|
|||
return of({ request: req, response: e });
|
||||
})
|
||||
)
|
||||
.toPromise();
|
||||
);
|
||||
}
|
||||
|
||||
function getNumeric(fields?: DataViewField[]) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue