From 307a789d90e72545fb15d4423c65e4b604dd364f Mon Sep 17 00:00:00 2001 From: Shenoy Pratik Date: Wed, 19 Apr 2023 14:22:11 -0700 Subject: [PATCH] fix panel visualization preview, new viz workflow Signed-off-by: Shenoy Pratik --- .../custom_panels/custom_panel_view_so.tsx | 2 ++ public/components/custom_panels/home.tsx | 2 ++ .../visualization_flyout_so.tsx | 23 ++++++++++++++++--- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/public/components/custom_panels/custom_panel_view_so.tsx b/public/components/custom_panels/custom_panel_view_so.tsx index 19eb6cde4..c39ef71b1 100644 --- a/public/components/custom_panels/custom_panel_view_so.tsx +++ b/public/components/custom_panels/custom_panel_view_so.tsx @@ -127,6 +127,8 @@ interface CustomPanelViewProps { appId?: string; updateAvailabilityVizId?: any; onAddClick?: any; + pplService: PPLService; + dslService: DSLService; } export const CustomPanelViewSO = (props: CustomPanelViewProps) => { diff --git a/public/components/custom_panels/home.tsx b/public/components/custom_panels/home.tsx index 6c86318e2..14de98e91 100644 --- a/public/components/custom_panels/home.tsx +++ b/public/components/custom_panels/home.tsx @@ -237,6 +237,8 @@ export const Home = ({ { - return http - .get(`${CUSTOM_PANELS_API_PREFIX}/visualizations`) + return SavedObjectsActions.getBulk({ + objectType: [SAVED_VISUALIZATION], + sortOrder: 'desc', + fromIndex: 0, + }) + .then((response) => ({ + visualizations: response.observabilityObjectList.map(parseSavedVisualizations), + })) .then((res) => { if (res.visualizations.length > 0) { setSavedVisualizations(res.visualizations);