Skip to content

Commit 4d6eeff

Browse files
authored
Move ui/courier into data shim plugin (#52359) (#53743)
1 parent 052e347 commit 4d6eeff

File tree

84 files changed

+1035
-712
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+1035
-712
lines changed

src/legacy/core_plugins/data/public/index.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,16 @@ export function plugin() {
3030
export { DataStart };
3131

3232
export { Field, FieldType, IFieldList, IndexPattern } from './index_patterns';
33-
export { SavedQuery, SavedQueryTimeFilter } from '../../../../plugins/data/public';
33+
export { EsQuerySortValue, FetchOptions, ISearchSource, SortDirection } from './search/types';
34+
export { SearchSourceFields } from './search/types';
35+
export {
36+
SavedQueryAttributes,
37+
SavedQuery,
38+
SavedQueryTimeFilter,
39+
} from '../../../../plugins/data/public';
3440

3541
/** @public static code */
3642
export * from '../common';
3743
export { FilterStateManager } from './filter/filter_manager';
3844
export { getFromSavedObject, getRoutes, flattenHitWrapper } from './index_patterns';
45+
export { getRequestInspectorStats, getResponseInspectorStats } from './search';

src/legacy/core_plugins/data/public/plugin.ts

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
*/
1919

2020
import { CoreSetup, CoreStart, Plugin } from 'kibana/public';
21+
import { SearchService, SearchStart } from './search';
2122
import { DataPublicPluginStart } from '../../../../plugins/data/public';
2223

2324
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
@@ -32,8 +33,9 @@ export interface DataPluginStartDependencies {
3233
*
3334
* @public
3435
*/
35-
// eslint-disable-next-line @typescript-eslint/no-empty-interface
36-
export interface DataStart {}
36+
export interface DataStart {
37+
search: SearchStart;
38+
}
3739

3840
/**
3941
* Data Plugin - public
@@ -48,13 +50,20 @@ export interface DataStart {}
4850
*/
4951

5052
export class DataPlugin implements Plugin<void, DataStart, {}, DataPluginStartDependencies> {
53+
private readonly search = new SearchService();
54+
5155
public setup(core: CoreSetup) {}
5256

5357
public start(core: CoreStart, { data }: DataPluginStartDependencies): DataStart {
5458
// This is required for when Angular code uses Field and FieldList.
5559
setFieldFormats(data.fieldFormats);
56-
return {};
60+
61+
return {
62+
search: this.search.start(core),
63+
};
5764
}
5865

59-
public stop() {}
66+
public stop() {
67+
this.search.stop();
68+
}
6069
}

src/legacy/core_plugins/data/public/search/expressions/esaggs.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import {
3232
import { npStart } from 'ui/new_platform';
3333
import {
3434
SearchSource,
35-
SearchSourceContract,
35+
ISearchSource,
3636
getRequestInspectorStats,
3737
getResponseInspectorStats,
3838
} from '../../../../../ui/public/courier';
@@ -51,7 +51,7 @@ import { PersistedState } from '../../../../../ui/public/persisted_state';
5151
import { Adapters } from '../../../../../../plugins/inspector/public';
5252

5353
export interface RequestHandlerParams {
54-
searchSource: SearchSourceContract;
54+
searchSource: ISearchSource;
5555
aggs: AggConfigs;
5656
timeRange?: TimeRange;
5757
query?: Query;

src/legacy/ui/public/courier/fetch/components/__snapshots__/shard_failure_modal.test.tsx.snap renamed to src/legacy/core_plugins/data/public/search/fetch/components/__snapshots__/shard_failure_modal.test.tsx.snap

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)