Skip to content

Commit

Permalink
setting augmented viz loader and importing as plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
amitgalitz committed Mar 16, 2023
1 parent 797f73d commit f5d07b7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/plugins/visualizations/opensearch_dashboards.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "opensearchDashboards",
"server": true,
"ui": true,
"requiredPlugins": ["data", "expressions", "uiActions", "embeddable", "inspector", "dashboard"],
"requiredPlugins": ["data", "expressions", "uiActions", "embeddable", "inspector", "dashboard", "visAugmenter"],
"optionalPlugins": ["usageCollection"],
"requiredBundles": ["opensearchDashboardsUtils", "discover", "savedObjects", "visAugmenter"]
}
6 changes: 5 additions & 1 deletion src/plugins/visualizations/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

import './index.scss';

import { VisAugmenterStart } from 'src/plugins/vis_augmenter/public';
import {
PluginInitializerContext,
CoreSetup,
Expand Down Expand Up @@ -60,6 +61,7 @@ import {
setOverlays,
setSavedSearchLoader,
setEmbeddable,
setSavedAugmentVisLoader,
} from './services';
import {
VISUALIZE_EMBEDDABLE_TYPE,
Expand Down Expand Up @@ -128,6 +130,7 @@ export interface VisualizationsStartDeps {
dashboard: DashboardStart;
getAttributeService: DashboardStart['getAttributeService'];
savedObjectsClient: SavedObjectsClientContract;
visAugmenter: VisAugmenterStart;
}

/**
Expand Down Expand Up @@ -174,7 +177,7 @@ export class VisualizationsPlugin

public start(
core: CoreStart,
{ data, expressions, uiActions, embeddable, dashboard }: VisualizationsStartDeps
{ data, expressions, uiActions, embeddable, dashboard, visAugmenter }: VisualizationsStartDeps
): VisualizationsStart {
const types = this.types.start();
setI18n(core.i18n);
Expand All @@ -193,6 +196,7 @@ export class VisualizationsPlugin
setAggs(data.search.aggs);
setOverlays(core.overlays);
setChrome(core.chrome);
setSavedAugmentVisLoader(visAugmenter.savedAugmentVisLoader);
const savedVisualizationsLoader = createSavedVisLoader({
savedObjectsClient: core.savedObjects.client,
indexPatterns: data.indexPatterns,
Expand Down

0 comments on commit f5d07b7

Please sign in to comment.