Skip to content

Commit

Permalink
[ML] Add indexPatternField editor plugin as opt dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
qn895 committed Jun 8, 2021
1 parent 15abdec commit 63f0434
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
3 changes: 2 additions & 1 deletion x-pack/plugins/data_visualizer/kibana.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"security",
"maps",
"home",
"lens"
"lens",
"indexPatternFieldEditor"
],
"requiredBundles": [
"kibanaReact",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,16 @@ export const DataVisualizerUrlStateContextProvider: FC<DataVisualizerUrlStateCon

export const IndexDataVisualizer: FC = () => {
const coreStart = getCoreStart();
const { data, maps, embeddable, share, security, fileUpload, lens } = getPluginsStart();
const {
data,
maps,
embeddable,
share,
security,
fileUpload,
lens,
indexPatternFieldEditor,
} = getPluginsStart();
const services = {
data,
maps,
Expand All @@ -187,6 +196,7 @@ export const IndexDataVisualizer: FC = () => {
security,
fileUpload,
lens,
indexPatternFieldEditor,
...coreStart,
};

Expand Down
2 changes: 2 additions & 0 deletions x-pack/plugins/data_visualizer/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import type { FileUploadPluginStart } from '../../file_upload/public';
import type { MapsStartApi } from '../../maps/public';
import type { SecurityPluginSetup } from '../../security/public';
import type { LensPublicStart } from '../../lens/public';
import type { IndexPatternFieldEditorStart } from '../../../../src/plugins/index_pattern_field_editor/public';
import { getFileDataVisualizerComponent, getIndexDataVisualizerComponent } from './api';
import { getMaxBytesFormatted } from './application/common/util/get_max_bytes';
import { registerHomeAddData } from './register_home';
Expand All @@ -32,6 +33,7 @@ export interface DataVisualizerStartDependencies {
security?: SecurityPluginSetup;
share: SharePluginStart;
lens?: LensPublicStart;
indexPatternFieldEditor?: IndexPatternFieldEditorStart;
}

export type DataVisualizerPluginSetup = ReturnType<DataVisualizerPlugin['setup']>;
Expand Down

0 comments on commit 63f0434

Please sign in to comment.