diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/DataQuality/DataQualityClassBase.ts b/openmetadata-ui/src/main/resources/ui/src/pages/DataQuality/DataQualityClassBase.ts index 61b549ef4a4..70b535dca9c 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/DataQuality/DataQualityClassBase.ts +++ b/openmetadata-ui/src/main/resources/ui/src/pages/DataQuality/DataQualityClassBase.ts @@ -10,6 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +import { ItemType } from 'antd/lib/menu/hooks/useItems'; import { ReactComponent as TestCaseIcon } from '../../assets/svg/all-activity-v2.svg'; import { ReactComponent as TableIcon } from '../../assets/svg/ic-table.svg'; import { ReactComponent as TestSuiteIcon } from '../../assets/svg/icon-test-suite.svg'; @@ -105,6 +106,10 @@ class DataQualityClassBase { public getDefaultActiveTab(): DataQualityPageTabs { return DataQualityPageTabs.TABLES; } + + public getManageExtraOptions(_activeTab: DataQualityPageTabs): ItemType[] { + return []; + } } const dataQualityClassBase = new DataQualityClassBase(); diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/DataQuality/DataQualityPage.test.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/DataQuality/DataQualityPage.test.tsx index 8598c7f21cc..f3c22a788b1 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/DataQuality/DataQualityPage.test.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/DataQuality/DataQualityPage.test.tsx @@ -52,6 +52,7 @@ jest.mock('./DataQualityClassBase', () => { }, ]), getDefaultActiveTab: jest.fn().mockReturnValue('tables'), + getManageExtraOptions: jest.fn().mockReturnValue([]), }; }); jest.mock('../../components/common/ResizablePanels/ResizableLeftPanels', () => { diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/DataQuality/DataQualityPage.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/DataQuality/DataQualityPage.tsx index 17dd01658d6..fb5eb7c45db 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/DataQuality/DataQualityPage.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/DataQuality/DataQualityPage.tsx @@ -12,6 +12,7 @@ */ import { Card, Col, Menu, MenuProps, Row, Typography } from 'antd'; +import { isEmpty } from 'lodash'; import React, { useMemo } from 'react'; import { useTranslation } from 'react-i18next'; import { @@ -21,10 +22,12 @@ import { useHistory, useParams, } from 'react-router-dom'; +import ManageButton from '../../components/common/EntityPageInfos/ManageButton/ManageButton'; import LeftPanelCard from '../../components/common/LeftPanelCard/LeftPanelCard'; import ResizableLeftPanels from '../../components/common/ResizablePanels/ResizableLeftPanels'; import TabsLabel from '../../components/common/TabsLabel/TabsLabel.component'; import { ROUTES } from '../../constants/constants'; +import { EntityType } from '../../enums/entity.enum'; import { withPageLayout } from '../../hoc/withPageLayout'; import i18n from '../../utils/i18next/LocalUtil'; import { getDataQualityPagePath } from '../../utils/RouterUtils'; @@ -61,6 +64,11 @@ const DataQualityPage = () => { return DataQualityClassBase.getDataQualityTab(); }, []); + const extraDropdownContent = useMemo( + () => DataQualityClassBase.getManageExtraOptions(activeTab), + [activeTab] + ); + const handleTabChange: MenuProps['onClick'] = (event) => { const activeKey = event.key; if (activeKey !== activeTab) { @@ -97,7 +105,7 @@ const DataQualityPage = () => { - + { {t('message.page-sub-header-for-data-quality')} + {isEmpty(extraDropdownContent) ? null : ( + + + + )} {tabDetailsComponent.map((tab) => (