From 19b4a96ae033923b367da5bdf59147b46dfac0d3 Mon Sep 17 00:00:00 2001 From: "Qingyang(Abby) Hu" Date: Thu, 15 Sep 2022 02:56:28 -0700 Subject: [PATCH] Add index pattern info when loading embeddable (#2363) 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 Signed-off-by: abbyhu2000 Signed-off-by: Sergey V. Osipov --- .../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