Skip to content

Commit

Permalink
Format to match mocks
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
  • Loading branch information
ohltyler committed Mar 22, 2023
1 parent 9de59d4 commit d46024c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -407,11 +407,15 @@ export class VisualizeEmbeddable

// TODO: remove after testing
const { toasts } = getNotifications();
toasts.addError(new Error('some test error details'), {
title: i18n.translate('visualizations.renderVisTitle', {
defaultMessage: 'Some test error',
}),
});
toasts.addError(
new Error(
'The following plugin resources failed to load: <plugin-resource-1>, <plugin-resource-2>'
),
{
title: `Some of the plugin resources failed to load for ${this.vis.title} chart`,
toastMessage: ' ',
}
);

const visLayers = await this.fetchVisLayers(expressionParams, abortController);

Expand Down
9 changes: 9 additions & 0 deletions src/plugins/visualizations/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ import {
setEmbeddable,
setSavedAugmentVisLoader,
setNotifications,
setSavedAugmentVisLoader,
} from './services';
import {
VISUALIZE_EMBEDDABLE_TYPE,
Expand Down Expand Up @@ -223,6 +224,14 @@ export class VisualizationsPlugin
overlays: core.overlays,
});
setSavedSearchLoader(savedSearchLoader);
const savedAugmentVisLoader = createSavedAugmentVisLoader({
savedObjectsClient: core.savedObjects.client,
indexPatterns: data.indexPatterns,
search: data.search,
chrome: core.chrome,
overlays: core.overlays,
});
setSavedAugmentVisLoader(savedAugmentVisLoader);
setNotifications(core.notifications);
return {
...types,
Expand Down

0 comments on commit d46024c

Please sign in to comment.