mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-22 13:49:27 +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}
|
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
|
<Route
|
||||||
element={
|
element={
|
||||||
<AdminProtectedRoute
|
<AdminProtectedRoute
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
import { Col, Row } from 'antd';
|
import { Col, Row } from 'antd';
|
||||||
import React, { useMemo } from 'react';
|
import { useMemo } from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import {
|
import {
|
||||||
BLUE_2,
|
BLUE_2,
|
||||||
|
|||||||
@ -12,7 +12,6 @@
|
|||||||
*/
|
*/
|
||||||
import { Card, Space, Typography } from 'antd';
|
import { Card, Space, Typography } from 'antd';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import React from 'react';
|
|
||||||
import { Cell, Pie, PieChart, ResponsiveContainer, Tooltip } from 'recharts';
|
import { Cell, Pie, PieChart, ResponsiveContainer, Tooltip } from 'recharts';
|
||||||
import { formatNumberWithComma } from '../../../../utils/CommonUtils';
|
import { formatNumberWithComma } from '../../../../utils/CommonUtils';
|
||||||
import { SummaryPieChartCardProps } from '../SummaryPanel.interface';
|
import { SummaryPieChartCardProps } from '../SummaryPanel.interface';
|
||||||
|
|||||||
@ -271,9 +271,7 @@ export const TestSuites = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const handleSubTabChange = (e: RadioChangeEvent) => {
|
const handleSubTabChange = (e: RadioChangeEvent) => {
|
||||||
history.replace(
|
navigate(getDataQualityPagePath(tab, e.target.value as DataQualitySubTabs));
|
||||||
getDataQualityPagePath(tab, e.target.value as DataQualitySubTabs)
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|||||||
@ -25,9 +25,7 @@ const testSuitePermission = {
|
|||||||
EditDisplayName: true,
|
EditDisplayName: true,
|
||||||
EditCustomFields: true,
|
EditCustomFields: true,
|
||||||
};
|
};
|
||||||
const mockUseParam = { tab: DataQualityPageTabs.TEST_CASES } as {
|
|
||||||
tab?: DataQualityPageTabs;
|
|
||||||
};
|
|
||||||
const mockLocation = {
|
const mockLocation = {
|
||||||
search: '',
|
search: '',
|
||||||
};
|
};
|
||||||
|
|||||||
@ -15,7 +15,7 @@ import { Button, Card, Col, Row, Tabs } from 'antd';
|
|||||||
import { isEmpty } from 'lodash';
|
import { isEmpty } from 'lodash';
|
||||||
import { useMemo } from 'react';
|
import { useMemo } from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
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 ManageButton from '../../components/common/EntityPageInfos/ManageButton/ManageButton';
|
||||||
import TabsLabel from '../../components/common/TabsLabel/TabsLabel.component';
|
import TabsLabel from '../../components/common/TabsLabel/TabsLabel.component';
|
||||||
import PageHeader from '../../components/PageHeader/PageHeader.component';
|
import PageHeader from '../../components/PageHeader/PageHeader.component';
|
||||||
@ -31,10 +31,8 @@ import { DataQualityPageTabs } from './DataQualityPage.interface';
|
|||||||
import DataQualityProvider from './DataQualityProvider';
|
import DataQualityProvider from './DataQualityProvider';
|
||||||
|
|
||||||
const DataQualityPage = () => {
|
const DataQualityPage = () => {
|
||||||
const {
|
const { tab: activeTab = DataQualityClassBase.getDefaultActiveTab() } =
|
||||||
tab: activeTab = (DataQualityClassBase.getDefaultActiveTab() =
|
useRequiredParams<{ tab: DataQualityPageTabs }>();
|
||||||
DataQualityClassBase.getDefaultActiveTab()),
|
|
||||||
} = useRequiredParams<{ tab: DataQualityPageTabs }>();
|
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const { permissions } = usePermissionProvider();
|
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 (
|
return (
|
||||||
<DataQualityProvider>
|
<DataQualityProvider>
|
||||||
<Row data-testid="data-insight-container" gutter={[0, 16]}>
|
<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 DataQualityProvider = ({ children }: { children: React.ReactNode }) => {
|
||||||
const { tab: activeTab = DataQualityPageTabs.TABLES } = useRequiredParams<{
|
const { tab: activeTab = DataQualityPageTabs.TEST_CASES } =
|
||||||
tab: DataQualityPageTabs;
|
useRequiredParams<{
|
||||||
}>();
|
tab: DataQualityPageTabs;
|
||||||
|
}>();
|
||||||
const location = useCustomLocation();
|
const location = useCustomLocation();
|
||||||
const params = useMemo(() => {
|
const params = useMemo(() => {
|
||||||
const search = location.search;
|
const search = location.search;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user