From 79b9f506d997462d4668619c5f4857b0d83e0e36 Mon Sep 17 00:00:00 2001 From: Amit Galitzky Date: Wed, 22 Mar 2023 13:41:55 -0700 Subject: [PATCH] Setting savedAugmentVisLoader in Visualizations plugin (#3616) --- NOTICE.txt | 1 + src/plugins/visualizations/public/plugin.ts | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/NOTICE.txt b/NOTICE.txt index 170b48daa5b9..34da5d0a6f44 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -245,3 +245,4 @@ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + diff --git a/src/plugins/visualizations/public/plugin.ts b/src/plugins/visualizations/public/plugin.ts index 682e678ed584..48f1d8306345 100644 --- a/src/plugins/visualizations/public/plugin.ts +++ b/src/plugins/visualizations/public/plugin.ts @@ -60,6 +60,7 @@ import { setOverlays, setSavedSearchLoader, setEmbeddable, + setSavedAugmentVisLoader, } from './services'; import { VISUALIZE_EMBEDDABLE_TYPE, @@ -92,6 +93,7 @@ import { } from './saved_visualizations/_saved_vis'; import { createSavedSearchesLoader } from '../../discover/public'; import { DashboardStart } from '../../dashboard/public'; +import { createSavedAugmentVisLoader } from '../../vis_augmenter/public'; /** * Interface for this plugin's returned setup/start contracts. @@ -193,6 +195,14 @@ export class VisualizationsPlugin setAggs(data.search.aggs); setOverlays(core.overlays); setChrome(core.chrome); + const savedAugmentVisLoader = createSavedAugmentVisLoader({ + savedObjectsClient: core.savedObjects.client, + indexPatterns: data.indexPatterns, + search: data.search, + chrome: core.chrome, + overlays: core.overlays, + }); + setSavedAugmentVisLoader(savedAugmentVisLoader); const savedVisualizationsLoader = createSavedVisLoader({ savedObjectsClient: core.savedObjects.client, indexPatterns: data.indexPatterns,