From 0eb7e63fd60c214f77d39bbb750343a05e231350 Mon Sep 17 00:00:00 2001 From: abbyhu2000 Date: Thu, 15 Sep 2022 02:05:41 +0000 Subject: [PATCH] Add index pattern info when loading embeddable Since index pattern is not included in the visualization state anymore, need to add the index pattern information so the embeddable can be loaded correctly. Signed-off-by: abbyhu2000 --- .../wizard/common/wizard_saved_object_attributes.ts | 3 +++ .../wizard/public/embeddable/wizard_embeddable.tsx | 9 ++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/plugins/wizard/common/wizard_saved_object_attributes.ts b/src/plugins/wizard/common/wizard_saved_object_attributes.ts index 1dc740d68637..e0e1e1cb6de7 100644 --- a/src/plugins/wizard/common/wizard_saved_object_attributes.ts +++ b/src/plugins/wizard/common/wizard_saved_object_attributes.ts @@ -13,4 +13,7 @@ export interface WizardSavedObjectAttributes extends SavedObjectAttributes { visualizationState?: string; styleState?: string; version: number; + searchSourceFields?: { + index?: string; + }; } diff --git a/src/plugins/wizard/public/embeddable/wizard_embeddable.tsx b/src/plugins/wizard/public/embeddable/wizard_embeddable.tsx index bc2d4548dda1..1acbd295e43a 100644 --- a/src/plugins/wizard/public/embeddable/wizard_embeddable.tsx +++ b/src/plugins/wizard/public/embeddable/wizard_embeddable.tsx @@ -116,8 +116,15 @@ export class WizardEmbeddable extends Embeddable