From 3f88d7a1381e5d2ac0f3269a547e2ed79b360489 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 11 Oct 2024 16:59:30 +0000 Subject: [PATCH] fix workbench routes to support modal mounting (#401) Signed-off-by: Shenoy Pratik (cherry picked from commit 8190b1f1cbd055f0022580f9a284bd8a9e198880) Signed-off-by: github-actions[bot] --- public/components/app.tsx | 73 +++++++++++++-------------------------- 1 file changed, 24 insertions(+), 49 deletions(-) diff --git a/public/components/app.tsx b/public/components/app.tsx index 2f90332..7a2882e 100644 --- a/public/components/app.tsx +++ b/public/components/app.tsx @@ -44,6 +44,24 @@ export const WorkbenchApp = ({ const isNavGroupEnabled = coreRefs?.chrome?.navGroup.getNavGroupEnabled(); const basePath = isNavGroupEnabled ? '/opensearch-query-workbench' : ''; + const renderMain = (props: any, isAccelerationFlyoutOpen: boolean, urlDataSource: string) => { + return ( +
+ ); + }; + return ( @@ -51,62 +69,19 @@ export const WorkbenchApp = ({ - ( -
- )} - /> ( -
- )} + render={(props) => renderMain(props, false, props.match.params.dataSource)} /> ( -
- )} + render={(props) => renderMain(props, true, props.match.params.dataSource)} + /> + renderMain(props, false, '')} />