mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-15 18:33:40 +00:00
fixed migration issue
This commit is contained in:
parent
744cbbb4e4
commit
d222da9995
@ -523,6 +523,22 @@ const AuthenticatedAppRouter: FunctionComponent = () => {
|
||||
}
|
||||
path={ROUTES.TEST_SUITES_EDIT_INGESTION}
|
||||
/>
|
||||
<Route
|
||||
element={
|
||||
<AdminProtectedRoute
|
||||
hasPermission={userPermissions.hasViewPermissions(
|
||||
ResourceEntity.TEST_SUITE,
|
||||
permissions
|
||||
)}>
|
||||
<DataQualityPage
|
||||
pageTitle={t('label.add-entity', {
|
||||
entity: t('label.data-quality'),
|
||||
})}
|
||||
/>
|
||||
</AdminProtectedRoute>
|
||||
}
|
||||
path={ROUTES.DATA_QUALITY_WITH_SUB_TAB}
|
||||
/>
|
||||
<Route
|
||||
element={
|
||||
<AdminProtectedRoute
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { Col, Row } from 'antd';
|
||||
import React, { useMemo } from 'react';
|
||||
import { useMemo } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import {
|
||||
BLUE_2,
|
||||
|
||||
@ -12,7 +12,6 @@
|
||||
*/
|
||||
import { Card, Space, Typography } from 'antd';
|
||||
import classNames from 'classnames';
|
||||
import React from 'react';
|
||||
import { Cell, Pie, PieChart, ResponsiveContainer, Tooltip } from 'recharts';
|
||||
import { formatNumberWithComma } from '../../../../utils/CommonUtils';
|
||||
import { SummaryPieChartCardProps } from '../SummaryPanel.interface';
|
||||
|
||||
@ -271,9 +271,7 @@ export const TestSuites = () => {
|
||||
};
|
||||
|
||||
const handleSubTabChange = (e: RadioChangeEvent) => {
|
||||
history.replace(
|
||||
getDataQualityPagePath(tab, e.target.value as DataQualitySubTabs)
|
||||
);
|
||||
navigate(getDataQualityPagePath(tab, e.target.value as DataQualitySubTabs));
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@ -25,9 +25,7 @@ const testSuitePermission = {
|
||||
EditDisplayName: true,
|
||||
EditCustomFields: true,
|
||||
};
|
||||
const mockUseParam = { tab: DataQualityPageTabs.TEST_CASES } as {
|
||||
tab?: DataQualityPageTabs;
|
||||
};
|
||||
|
||||
const mockLocation = {
|
||||
search: '',
|
||||
};
|
||||
|
||||
@ -15,7 +15,7 @@ import { Button, Card, Col, Row, Tabs } from 'antd';
|
||||
import { isEmpty } from 'lodash';
|
||||
import { useMemo } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Navigate, useNavigate } from 'react-router-dom';
|
||||
import { Link, useNavigate } from 'react-router-dom';
|
||||
import ManageButton from '../../components/common/EntityPageInfos/ManageButton/ManageButton';
|
||||
import TabsLabel from '../../components/common/TabsLabel/TabsLabel.component';
|
||||
import PageHeader from '../../components/PageHeader/PageHeader.component';
|
||||
@ -31,10 +31,8 @@ import { DataQualityPageTabs } from './DataQualityPage.interface';
|
||||
import DataQualityProvider from './DataQualityProvider';
|
||||
|
||||
const DataQualityPage = () => {
|
||||
const {
|
||||
tab: activeTab = (DataQualityClassBase.getDefaultActiveTab() =
|
||||
DataQualityClassBase.getDefaultActiveTab()),
|
||||
} = useRequiredParams<{ tab: DataQualityPageTabs }>();
|
||||
const { tab: activeTab = DataQualityClassBase.getDefaultActiveTab() } =
|
||||
useRequiredParams<{ tab: DataQualityPageTabs }>();
|
||||
const navigate = useNavigate();
|
||||
const { t } = useTranslation();
|
||||
const { permissions } = usePermissionProvider();
|
||||
@ -64,27 +62,6 @@ const DataQualityPage = () => {
|
||||
}
|
||||
};
|
||||
|
||||
const renderTabComponent = useMemo(() => {
|
||||
const currentTab = DataQualityClassBase.getDataQualityTab().find(
|
||||
(tabItem) => tabItem.key === activeTab
|
||||
);
|
||||
|
||||
if (!currentTab) {
|
||||
return (
|
||||
<Navigate
|
||||
replace
|
||||
to={getDataQualityPagePath(
|
||||
DataQualityClassBase.getDefaultActiveTab()
|
||||
)}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
const TabComponent = currentTab.component;
|
||||
|
||||
return <TabComponent />;
|
||||
}, [activeTab]);
|
||||
|
||||
return (
|
||||
<DataQualityProvider>
|
||||
<Row data-testid="data-insight-container" gutter={[0, 16]}>
|
||||
|
||||
@ -37,9 +37,10 @@ export const DataQualityContext = createContext<DataQualityContextInterface>(
|
||||
);
|
||||
|
||||
const DataQualityProvider = ({ children }: { children: React.ReactNode }) => {
|
||||
const { tab: activeTab = DataQualityPageTabs.TABLES } = useRequiredParams<{
|
||||
tab: DataQualityPageTabs;
|
||||
}>();
|
||||
const { tab: activeTab = DataQualityPageTabs.TEST_CASES } =
|
||||
useRequiredParams<{
|
||||
tab: DataQualityPageTabs;
|
||||
}>();
|
||||
const location = useCustomLocation();
|
||||
const params = useMemo(() => {
|
||||
const search = location.search;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user