From 7dcd463b72a8a01349c0e655dade26dbb3ff6d7f Mon Sep 17 00:00:00 2001 From: saimedhi Date: Thu, 8 Aug 2024 02:24:51 -0700 Subject: [PATCH] Fixing MDS Support Signed-off-by: saimedhi --- public/app.tsx | 29 +++++++++---------- .../pages/workflow_detail/workflow_detail.tsx | 1 - .../pages/workflows/workflow_list/columns.tsx | 9 +++--- public/pages/workflows/workflows.test.tsx | 7 ++--- public/pages/workflows/workflows.tsx | 6 +--- public/utils/constants.ts | 2 +- public/utils/utils.ts | 5 ++-- 7 files changed, 26 insertions(+), 33 deletions(-) diff --git a/public/app.tsx b/public/app.tsx index de205a60..78e29ef1 100644 --- a/public/app.tsx +++ b/public/app.tsx @@ -4,7 +4,12 @@ */ import React from 'react'; -import { Route, RouteComponentProps, Switch } from 'react-router-dom'; +import { + Route, + RouteComponentProps, + Switch, + useLocation, +} from 'react-router-dom'; import { EuiPageSideBar, EuiSideNav, @@ -19,8 +24,10 @@ import { WorkflowsRouterProps, } from './pages'; import { MountPoint } from '../../../src/core/public'; -import queryString from 'query-string'; -import { constructHrefWithDataSourceId } from './utils/utils'; +import { + constructHrefWithDataSourceId, + getDataSourceFromURL, +} from './utils/utils'; // styling import './global-styles.scss'; @@ -31,9 +38,8 @@ interface Props extends RouteComponentProps { export const FlowFrameworkDashboardsApp = (props: Props) => { const { setHeaderActionMenu } = props; - const queryParams = queryString.parse(location.search) as { - [key: string]: string; - }; + const location = useLocation(); + const queryParams = getDataSourceFromURL(location); const dataSourceId = queryParams.dataSourceId; const sidebar = (