diff --git a/openmetadata-ui/src/main/resources/ui/src/components/DataInsightDetail/DescriptionInsight.tsx b/openmetadata-ui/src/main/resources/ui/src/components/DataInsightDetail/DescriptionInsight.tsx index 8453fbfca65..55c12188623 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/DataInsightDetail/DescriptionInsight.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/DataInsightDetail/DescriptionInsight.tsx @@ -25,7 +25,6 @@ import { ResponsiveContainer, Tooltip, XAxis, - YAxis, } from 'recharts'; import { getAggregateChartData } from '../../axiosAPIs/DataInsightAPI'; import { @@ -114,8 +113,6 @@ const DescriptionInsight: FC = ({ chartFilter }) => { - - } /> = ({ chartFilter }) => { - } /> { const { tab } = useParams<{ tab: DataInsightTabs }>(); @@ -47,7 +47,7 @@ const DataInsightLeftPanel = () => { ]; const handleMenuClick: MenuProps['onClick'] = (e) => { - history.push(`${ROUTES.DATA_INSIGHT}/${e.key}`); + history.push(getDataInsightPathWithFqn(e.key)); }; return ( diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/DataInsightPage/DataInsightPage.component.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/DataInsightPage/DataInsightPage.component.tsx index 8b2b048ad77..f984268b282 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/DataInsightPage/DataInsightPage.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/DataInsightPage/DataInsightPage.component.tsx @@ -54,7 +54,10 @@ import { ChartFilter, DataInsightTabs, } from '../../interface/data-insight.interface'; -import { getTeamFilter } from '../../utils/DataInsightUtils'; +import { + getDataInsightPathWithFqn, + getTeamFilter, +} from '../../utils/DataInsightUtils'; import { getCurrentDateTimeMillis, getFormattedDateFromMilliSeconds, @@ -136,9 +139,9 @@ const DataInsightPage = () => { const handleScrollToChart = (chartType: DataInsightChartType) => { if (ENTITIES_CHARTS.includes(chartType)) { - history.push(DataInsightTabs.DATA_ASSETS); + history.push(getDataInsightPathWithFqn(DataInsightTabs.DATA_ASSETS)); } else { - history.push(DataInsightTabs.APP_ANALYTICS); + history.push(getDataInsightPathWithFqn(DataInsightTabs.APP_ANALYTICS)); } setSelectedChart(chartType); }; diff --git a/openmetadata-ui/src/main/resources/ui/src/utils/DataInsightUtils.tsx b/openmetadata-ui/src/main/resources/ui/src/utils/DataInsightUtils.tsx index ab065f47039..e156ea03368 100644 --- a/openmetadata-ui/src/main/resources/ui/src/utils/DataInsightUtils.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/utils/DataInsightUtils.tsx @@ -28,6 +28,7 @@ import moment from 'moment'; import React from 'react'; import { ListItem, ListValues } from 'react-awesome-query-builder'; import { LegendProps, Surface } from 'recharts'; +import { PLACEHOLDER_ROUTE_TAB, ROUTES } from '../constants/constants'; import { ENTITIES_SUMMARY_LIST, KPI_DATE_PICKER_FORMAT, @@ -519,3 +520,6 @@ export const getKpiResultFeedback = (day: number, isTargetMet: boolean) => { return t('label.day-left', { day: pluralize(day, 'day') }); } }; + +export const getDataInsightPathWithFqn = (fqn: string) => + ROUTES.DATA_INSIGHT_WITH_TAB.replace(PLACEHOLDER_ROUTE_TAB, fqn);