From 8190b1f1cbd055f0022580f9a284bd8a9e198880 Mon Sep 17 00:00:00 2001 From: Shenoy Pratik Date: Fri, 11 Oct 2024 09:59:17 -0700 Subject: [PATCH] fix workbench routes to support modal mounting (#401) Signed-off-by: Shenoy Pratik --- 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, '')} />