Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Move agg_types into data shim plugin #53744

Closed
wants to merge 21 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
cdd9705
Move ui/public/courier files to core_plugins/data/public
lukeelmers Dec 3, 2019
ae3e232
Add search service definition to shim.
lukeelmers Dec 5, 2019
6bd2b1c
Fix internal imports.
lukeelmers Dec 5, 2019
6128be3
Update SASS import.
lukeelmers Dec 6, 2019
1908425
Update ui/public imports & add missing ones.
lukeelmers Dec 6, 2019
127dd06
Finish cleaning up data plugin imports.
lukeelmers Dec 6, 2019
f9b38c9
Make sure agg_types are using SearchSourceContract.
lukeelmers Dec 6, 2019
89b715b
Revert bad IndexPatterns interface changes.
lukeelmers Dec 6, 2019
6eae078
Update translation IDs.
lukeelmers Dec 10, 2019
ac1403b
Add default search strategy.
lukeelmers Dec 10, 2019
ca64402
Fix jest tests.
lukeelmers Dec 10, 2019
5ae213e
Add comment on legacy mock.
lukeelmers Dec 10, 2019
0efa388
Rename SearchSourceContract -> ISearchSource.
lukeelmers Dec 11, 2019
0202d03
Add all public agg_type items to agg_types/index
lukeelmers Dec 11, 2019
661b861
Copy entire ui/agg_types directory to legacy data plugin's search ser…
lukeelmers Dec 12, 2019
55b0100
Update agg_type imports.
lukeelmers Dec 12, 2019
baf2ce8
Export static code and types from data plugin.
lukeelmers Dec 12, 2019
f86aa0f
Export runtime services from data plugin start.
lukeelmers Dec 12, 2019
2feb69a
Re-export public contract from ui/agg_types.
lukeelmers Dec 12, 2019
4a04087
Delete old ui/agg_types files, and re-export contracts where needed.
lukeelmers Dec 13, 2019
436b33c
Update translation IDs.
lukeelmers Dec 13, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions src/legacy/core_plugins/data/public/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,20 @@ export { DataStart };

export { Field, FieldType, IFieldList, IndexPattern } from './index_patterns';
export { SearchBar, SearchBarProps } from './search';
export {
// agg_types
AggParam,
AggParamOption,
DateRangeKey,
IpRangeKey,
OptionedParamEditorProps,
OptionedValueProp,
// search_source
EsQuerySortValue,
FetchOptions,
ISearchSource,
SortDirection,
} from './search/types';
export {
SavedQueryAttributes,
SavedQuery,
Expand All @@ -41,3 +55,22 @@ export {
export * from '../common';
export { FilterStateManager } from './filter/filter_manager';
export { getFromSavedObject, getRoutes, flattenHitWrapper } from './index_patterns';
export {
// agg_types
AggParamType,
aggTypeFilters,
CidrMask,
convertDateRangeToString,
convertIPRangeToString,
intervalOptions, // only used in Discover
isDateHistogramBucketAggConfig,
isStringType,
isType,
isValidInterval,
isValidJson,
OptionedParamType,
propFilter,
// search_source
getRequestInspectorStats,
getResponseInspectorStats,
} from './search';
9 changes: 7 additions & 2 deletions src/legacy/core_plugins/data/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

import { CoreSetup, CoreStart, Plugin } from 'kibana/public';
import { createSearchBar, StatetfulSearchBarProps } from './search';
import { createSearchBar, StatetfulSearchBarProps, SearchService, SearchStart } from './search';
import { Storage, IStorageWrapper } from '../../../../../src/plugins/kibana_utils/public';
import { DataPublicPluginStart } from '../../../../plugins/data/public';
import { initLegacyModule } from './shim/legacy_module';
Expand All @@ -36,6 +36,7 @@ export interface DataPluginStartDependencies {
* @public
*/
export interface DataStart {
search: SearchStart;
ui: {
SearchBar: React.ComponentType<StatetfulSearchBarProps>;
};
Expand All @@ -54,6 +55,7 @@ export interface DataStart {
*/

export class DataPlugin implements Plugin<void, DataStart, {}, DataPluginStartDependencies> {
private readonly search: SearchService = new SearchService();
private storage!: IStorageWrapper;

public setup(core: CoreSetup) {
Expand All @@ -72,11 +74,14 @@ export class DataPlugin implements Plugin<void, DataStart, {}, DataPluginStartDe
});

return {
search: this.search.start(core),
ui: {
SearchBar,
},
};
}

public stop() {}
public stop() {
this.search.stop();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import expect from '@kbn/expect';
import ngMock from 'ng_mock';
import { buildOtherBucketAgg, mergeOtherBucketAggResponse, updateMissingBucket } from '../../buckets/_terms_other_bucket_helper';
import { Vis } from '../../../vis';
import { Vis } from 'ui/vis';
import FixturesStubbedLogstashIndexPatternProvider from 'fixtures/stubbed_logstash_index_pattern';

const visConfigSingleTerm = {
Expand Down
Loading