diff --git a/openmetadata-ui/src/main/resources/ui/package.json b/openmetadata-ui/src/main/resources/ui/package.json index 34df8fd2e26..b8ba0124c1b 100644 --- a/openmetadata-ui/src/main/resources/ui/package.json +++ b/openmetadata-ui/src/main/resources/ui/package.json @@ -74,6 +74,7 @@ "react-dnd-html5-backend": "14.0.2", "react-dom": "^16.14.0", "react-error-boundary": "^3.1.4", + "react-helmet-async": "^1.3.0", "react-i18next": "^11.18.6", "react-lazylog": "^4.5.3", "react-oidc": "^1.0.3", @@ -180,8 +181,8 @@ "dotenv": "^16.0.0", "eslint": "7.32.0", "eslint-config-prettier": "8.3.0", - "eslint-plugin-i18next": "^6.0.0-2", "eslint-plugin-cypress": "^2.12.1", + "eslint-plugin-i18next": "^6.0.0-2", "eslint-plugin-jest": "24.4.0", "eslint-plugin-jest-formatting": "3.0.0", "eslint-plugin-jsonc": "2.5.0", diff --git a/openmetadata-ui/src/main/resources/ui/src/App.tsx b/openmetadata-ui/src/main/resources/ui/src/App.tsx index bd089228b64..8ee18a2e3f9 100644 --- a/openmetadata-ui/src/main/resources/ui/src/App.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/App.tsx @@ -21,6 +21,7 @@ import WebSocketProvider from 'components/web-scoket/web-scoket.provider'; import WebAnalyticsProvider from 'components/WebAnalytics/WebAnalyticsProvider'; import { TOAST_OPTIONS } from 'constants/Toasts.constants'; import React, { FunctionComponent } from 'react'; +import { HelmetProvider } from 'react-helmet-async'; import { I18nextProvider } from 'react-i18next'; import { BrowserRouter as Router } from 'react-router-dom'; import { ToastContainer } from 'react-toastify'; @@ -35,16 +36,18 @@ const App: FunctionComponent = () => { - - - - - - - - - - + + + + + + + + + + + + diff --git a/openmetadata-ui/src/main/resources/ui/src/components/AddDataQualityTest/AddDataQualityTestV1.tsx b/openmetadata-ui/src/main/resources/ui/src/components/AddDataQualityTest/AddDataQualityTestV1.tsx index 4c1881fd1b7..bf6214ed82b 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/AddDataQualityTest/AddDataQualityTestV1.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/AddDataQualityTest/AddDataQualityTestV1.tsx @@ -255,6 +255,9 @@ const AddDataQualityTestV1: React.FC = ({ classes="tw-max-w-full-hd tw-h-full tw-pt-4" header={} layout={PageLayoutType['2ColRTL']} + pageTitle={t('label.add-entity', { + entity: t('label.data-quality-test'), + })} rightPanel={ } layout={PageLayoutType['2ColRTL']} + pageTitle={t('label.add-entity', { entity: t('label.glossary') })} rightPanel={fetchRightPanel()}>
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/AddGlossary/AddGlossary.test.tsx b/openmetadata-ui/src/main/resources/ui/src/components/AddGlossary/AddGlossary.test.tsx index 31063b3953d..845fa136c49 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/AddGlossary/AddGlossary.test.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/AddGlossary/AddGlossary.test.tsx @@ -16,6 +16,10 @@ import { LoadingState } from 'Models'; import React, { forwardRef } from 'react'; import AddGlossary from './AddGlossary.component'; +jest.mock('../containers/PageLayout', () => + jest.fn().mockImplementation(({ children }) =>
{children}
) +); + jest.mock('../common/rich-text-editor/RichTextEditorPreviewer', () => { return jest.fn().mockReturnValue(

RichTextEditorPreviewer

); }); diff --git a/openmetadata-ui/src/main/resources/ui/src/components/AddGlossaryTerm/AddGlossaryTerm.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/AddGlossaryTerm/AddGlossaryTerm.component.tsx index 34fd99ee9c1..e7a49edcae9 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/AddGlossaryTerm/AddGlossaryTerm.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/AddGlossaryTerm/AddGlossaryTerm.component.tsx @@ -296,6 +296,7 @@ const AddGlossaryTerm = ({ classes="tw-max-w-full-hd tw-h-full tw-pt-4" header={} layout={PageLayoutType['2ColRTL']} + pageTitle={t('label.add-entity', { entity: t('label.glossary-term') })} rightPanel={fetchRightPanel()}>
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/AddGlossaryTerm/AddGlossaryTerm.test.tsx b/openmetadata-ui/src/main/resources/ui/src/components/AddGlossaryTerm/AddGlossaryTerm.test.tsx index 58d9b5df6e4..65d0ecae46b 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/AddGlossaryTerm/AddGlossaryTerm.test.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/AddGlossaryTerm/AddGlossaryTerm.test.tsx @@ -53,6 +53,10 @@ jest.mock('../common/rich-text-editor/RichTextEditor', () => { ); }); +jest.mock('../containers/PageLayout', () => + jest.fn().mockImplementation(({ children }) =>
{children}
) +); + const mockOnCancel = jest.fn(); const mockOnSave = jest.fn(); diff --git a/openmetadata-ui/src/main/resources/ui/src/components/AddService/AddService.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/AddService/AddService.component.tsx index 476db86cb62..6c6b5f04bbe 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/AddService/AddService.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/AddService/AddService.component.tsx @@ -320,6 +320,7 @@ const AddService = ({ classes="tw-max-w-full-hd tw-h-full tw-pt-4" header={} layout={PageLayoutType['2ColRTL']} + pageTitle={t('label.add-entity', { entity: t('label.service') })} rightPanel={fetchRightPanel()}>
{addIngestion ? ( diff --git a/openmetadata-ui/src/main/resources/ui/src/components/BotDetails/BotDetails.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/BotDetails/BotDetails.component.tsx index ada61b1d6d5..f42177e8182 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/BotDetails/BotDetails.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/BotDetails/BotDetails.component.tsx @@ -276,6 +276,7 @@ const BotDetails: FC = ({ /> } leftPanel={fetchLeftPanel()} + pageTitle={t('label.bot-detail')} rightPanel={
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/BotDetails/BotDetails.test.tsx b/openmetadata-ui/src/main/resources/ui/src/components/BotDetails/BotDetails.test.tsx index 97f5dad5d15..f14fe762de5 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/BotDetails/BotDetails.test.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/BotDetails/BotDetails.test.tsx @@ -122,6 +122,19 @@ jest.mock('./AuthMechanismForm', () => ) ); +jest.mock('../containers/PageLayout', () => + jest + .fn() + .mockImplementation(({ children, leftPanel, rightPanel, header }) => ( +
+ {header} +
{leftPanel}
+ {children} +
{rightPanel}
+
+ )) +); + describe('Test BotsDetail Component', () => { it('Should render all child elements', async () => { const { container } = render(, { diff --git a/openmetadata-ui/src/main/resources/ui/src/components/CreateUser/CreateUser.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/CreateUser/CreateUser.component.tsx index 4c037b2d91f..fb015a0cfc5 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/CreateUser/CreateUser.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/CreateUser/CreateUser.component.tsx @@ -700,7 +700,8 @@ const CreateUser = ({ } - layout={PageLayoutType['2ColRTL']}> + layout={PageLayoutType['2ColRTL']} + pageTitle={t('label.create-entity', { entity: t('label.user') })}>
{t('label.create-entity', { diff --git a/openmetadata-ui/src/main/resources/ui/src/components/CustomEntityDetail/AddCustomProperty/AddCustomProperty.tsx b/openmetadata-ui/src/main/resources/ui/src/components/CustomEntityDetail/AddCustomProperty/AddCustomProperty.tsx index bdfd15cc64a..69c0db7a8f6 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/CustomEntityDetail/AddCustomProperty/AddCustomProperty.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/CustomEntityDetail/AddCustomProperty/AddCustomProperty.tsx @@ -174,6 +174,9 @@ const AddCustomProperty = () => { }>
= ({ title }) => { + const { t } = useTranslation(); + + return ( + + {`${title} | ${t('label.open-metadata')}`} + + ); +}; + +export default DocumentTitle; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Explore/Explore.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Explore/Explore.component.tsx index 9df5b0f92a6..398ab2864ac 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Explore/Explore.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Explore/Explore.component.tsx @@ -31,6 +31,7 @@ import { toUpper, } from 'lodash'; import React, { useCallback, useEffect, useMemo, useState } from 'react'; +import { useTranslation } from 'react-i18next'; import { useParams } from 'react-router-dom'; import { ENTITY_PATH } from '../../constants/constants'; import { tabsInfo } from '../../constants/explore.constants'; @@ -76,6 +77,7 @@ const Explore: React.FC = ({ onChangePage = noop, loading, }) => { + const { t } = useTranslation(); const { tab } = useParams<{ tab: string }>(); const [showAdvanceSearchModal, setShowAdvanceSearchModal] = useState(false); @@ -268,7 +270,8 @@ const Explore: React.FC = ({ /> - }> + } + pageTitle={t('label.explore')}> { const mockFunction = jest.fn(); +jest.mock('../containers/PageLayoutV1', () => + jest.fn().mockImplementation(({ children }) =>
{children}
) +); + describe('Test Explore component', () => { it('Component should render', async () => { const { container } = render( diff --git a/openmetadata-ui/src/main/resources/ui/src/components/GlobalSetting/GlobalSetting.tsx b/openmetadata-ui/src/main/resources/ui/src/components/GlobalSetting/GlobalSetting.tsx index cd071d21b68..8c0564429fa 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/GlobalSetting/GlobalSetting.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/GlobalSetting/GlobalSetting.tsx @@ -12,6 +12,7 @@ */ import React from 'react'; +import { useTranslation } from 'react-i18next'; import PageLayoutV1 from '../containers/PageLayoutV1'; import GlobalSettingRouter from '../router/GlobalSettingRouter'; @@ -19,10 +20,13 @@ import './GlobalSetting.less'; import GlobalSettingLeftPanel from './GlobalSettingLeftPanel'; const GlobalSetting = () => { + const { t } = useTranslation(); + return ( }> + leftPanel={} + pageTitle={t('label.setting-plural')}> ); diff --git a/openmetadata-ui/src/main/resources/ui/src/components/MyData/MyData.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/MyData/MyData.component.tsx index 208bf7a4767..9a0a351ccc9 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/MyData/MyData.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/MyData/MyData.component.tsx @@ -231,7 +231,10 @@ const MyData: React.FC = ({ ); return ( - + {error ? ( ) : ( diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ProfilerDashboard/ProfilerDashboard.test.tsx b/openmetadata-ui/src/main/resources/ui/src/components/ProfilerDashboard/ProfilerDashboard.test.tsx index 87f95e09304..918cd4f3966 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/ProfilerDashboard/ProfilerDashboard.test.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/ProfilerDashboard/ProfilerDashboard.test.tsx @@ -98,6 +98,10 @@ jest.mock('components/PermissionProvider/PermissionProvider', () => { }; }); +jest.mock('../containers/PageLayoutV1', () => + jest.fn().mockImplementation(({ children }) =>
{children}
) +); + describe('Test ProfilerDashboardPage component', () => { beforeEach(() => cleanup()); @@ -107,7 +111,7 @@ describe('Test ProfilerDashboardPage component', () => { wrapper: MemoryRouter, }); }); - const pageContainer = await screen.findByTestId('page-layout-v1'); + const profilerSwitch = await screen.findByTestId('profiler-switch'); const EntityPageInfo = await screen.findByText('EntityPageInfo component'); const ProfilerTab = await screen.findByText('ProfilerTab component'); @@ -116,7 +120,6 @@ describe('Test ProfilerDashboardPage component', () => { ); const DataQualityTab = screen.queryByText('DataQualityTab component'); - expect(pageContainer).toBeInTheDocument(); expect(profilerSwitch).toBeInTheDocument(); expect(EntityPageInfo).toBeInTheDocument(); expect(ProfilerTab).toBeInTheDocument(); @@ -134,7 +137,7 @@ describe('Test ProfilerDashboardPage component', () => { wrapper: MemoryRouter, }); }); - const pageContainer = await screen.findByTestId('page-layout-v1'); + const profilerSwitch = await screen.findByTestId('profiler-switch'); const EntityPageInfo = await screen.findByText('EntityPageInfo component'); const ProfilerTab = screen.queryByText('ProfilerTab component'); @@ -144,7 +147,6 @@ describe('Test ProfilerDashboardPage component', () => { ); const statusDropdown = await screen.findByText('label.status'); - expect(pageContainer).toBeInTheDocument(); expect(profilerSwitch).toBeInTheDocument(); expect(EntityPageInfo).toBeInTheDocument(); expect(DataQualityTab).toBeInTheDocument(); @@ -163,7 +165,7 @@ describe('Test ProfilerDashboardPage component', () => { wrapper: MemoryRouter, }); }); - const pageContainer = await screen.findByTestId('page-layout-v1'); + const profilerSwitch = await screen.findByTestId('profiler-switch'); const EntityPageInfo = await screen.findByText('EntityPageInfo component'); const ProfilerTab = await screen.findByText('ProfilerTab component'); @@ -172,7 +174,6 @@ describe('Test ProfilerDashboardPage component', () => { ); const DataQualityTab = screen.queryByText('DataQualityTab component'); - expect(pageContainer).toBeInTheDocument(); expect(profilerSwitch).toBeInTheDocument(); expect(EntityPageInfo).toBeInTheDocument(); expect(ProfilerTab).toBeInTheDocument(); @@ -231,10 +232,8 @@ describe('Test ProfilerDashboardPage component', () => { }); }); - const pageContainer = await screen.findByTestId('page-layout-v1'); const addTest = await screen.findByTestId('add-test'); - expect(pageContainer).toBeInTheDocument(); expect(addTest).toBeInTheDocument(); await act(async () => { diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ProfilerDashboard/ProfilerDashboard.tsx b/openmetadata-ui/src/main/resources/ui/src/components/ProfilerDashboard/ProfilerDashboard.tsx index 0898bc1b870..f0aef5ed39a 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/ProfilerDashboard/ProfilerDashboard.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/ProfilerDashboard/ProfilerDashboard.tsx @@ -456,7 +456,7 @@ const ProfilerDashboard: React.FC = ({ }, [table]); return ( - + ({ checkValidImage: jest.fn().mockImplementation(() => Promise.resolve(true)), })); +jest.mock('../containers/PageLayoutV1', () => + jest.fn().mockImplementation(({ children, leftPanel, rightPanel }) => ( +
+ {leftPanel} + {children} + {rightPanel} +
+ )) +); + describe('Test User Component', () => { it('Should render user component', async () => { const { container } = render( diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Users/Users.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Users/Users.component.tsx index a2402da8594..672287f8ae0 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Users/Users.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Users/Users.component.tsx @@ -951,7 +951,10 @@ const Users = ({ ); return ( - +
+ jest.fn().mockImplementation(() =>
DocumentTitle
) +); + +describe('PageLayout', () => { + it('Should render with children', () => { + const { getByText } = render( + +
Test Child Element
+
+ ); + + expect(getByText('Test Child Element')).toBeInTheDocument(); + }); + + it('Should render with left panel', () => { + const { getByText } = render( + Test Left Panel
} + pageTitle="Test Page Title"> +
Test Child Element
+ + ); + + expect(getByText('Test Left Panel')).toBeInTheDocument(); + }); + + it('Should render with right panel', () => { + const { getByText } = render( + Test Right Panel
}> +
Test Child Element
+
+ ); + + expect(getByText('Test Right Panel')).toBeInTheDocument(); + }); + + it('Should render with header', () => { + const { getByText } = render( + Test Header
} pageTitle="Test Page Title"> +
Test Child Element
+
+ ); + + expect(getByText('Test Header')).toBeInTheDocument(); + }); +}); diff --git a/openmetadata-ui/src/main/resources/ui/src/components/containers/PageLayout.tsx b/openmetadata-ui/src/main/resources/ui/src/components/containers/PageLayout.tsx index 75c86831482..8e6830d3982 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/containers/PageLayout.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/containers/PageLayout.tsx @@ -12,6 +12,7 @@ */ import classNames from 'classnames'; +import DocumentTitle from 'components/DocumentTitle/DocumentTitle'; import React, { FC, Fragment, ReactNode } from 'react'; import { PageLayoutType } from '../../enums/layout.enum'; @@ -22,6 +23,7 @@ interface PageLayoutProp { children: ReactNode; layout?: PageLayoutType; classes?: string; + pageTitle: string; } export const leftPanelAntCardStyle = { @@ -40,6 +42,7 @@ const PageLayout: FC = ({ children, rightPanel, layout = PageLayoutType['3Col'], + pageTitle, classes = '', }: PageLayoutProp) => { const getLeftPanel = () => { @@ -163,7 +166,12 @@ const PageLayout: FC = ({ } }; - return getLayoutByType(layout); + return ( + + + {getLayoutByType(layout)} + + ); }; export default PageLayout; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/containers/PageLayoutV1.test.tsx b/openmetadata-ui/src/main/resources/ui/src/components/containers/PageLayoutV1.test.tsx new file mode 100644 index 00000000000..b3d5b0713eb --- /dev/null +++ b/openmetadata-ui/src/main/resources/ui/src/components/containers/PageLayoutV1.test.tsx @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Collate. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { render } from '@testing-library/react'; +import React from 'react'; +import PageLayoutV1 from './PageLayoutV1'; + +jest.mock('components/DocumentTitle/DocumentTitle', () => + jest.fn().mockImplementation(() =>
DocumentTitle
) +); + +describe('PageLayoutV1', () => { + it('Should render with the left panel, center content, and right panel', () => { + const leftPanelText = 'Left panel'; + const centerText = 'Center content'; + const rightPanelText = 'Right panel'; + const { getByText } = render( + {leftPanelText}
} + pageTitle="Test Page" + rightPanel={
{rightPanelText}
}> + {centerText} + + ); + + expect(getByText(leftPanelText)).toBeInTheDocument(); + expect(getByText(centerText)).toBeInTheDocument(); + expect(getByText(rightPanelText)).toBeInTheDocument(); + }); + + it('Should render with only the center content', () => { + const centerText = 'Center content'; + const { getByText, queryByTestId } = render( + {centerText} + ); + + expect(queryByTestId('page-layout-v1')).toBeInTheDocument(); + expect(getByText(centerText)).toBeInTheDocument(); + expect(queryByTestId('left-panelV1')).not.toBeInTheDocument(); + expect(queryByTestId('right-panelV1')).not.toBeInTheDocument(); + }); +}); diff --git a/openmetadata-ui/src/main/resources/ui/src/components/containers/PageLayoutV1.tsx b/openmetadata-ui/src/main/resources/ui/src/components/containers/PageLayoutV1.tsx index d0d74b5d4f2..c5e228f71bd 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/containers/PageLayoutV1.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/containers/PageLayoutV1.tsx @@ -13,7 +13,8 @@ import { Col, Row } from 'antd'; import classNames from 'classnames'; -import React, { FC, HTMLAttributes, ReactNode } from 'react'; +import DocumentTitle from 'components/DocumentTitle/DocumentTitle'; +import React, { FC, Fragment, HTMLAttributes, ReactNode } from 'react'; import './../../styles/layout/page-layout.less'; interface PageLayoutProp extends HTMLAttributes { @@ -21,6 +22,7 @@ interface PageLayoutProp extends HTMLAttributes { header?: ReactNode; rightPanel?: ReactNode; center?: boolean; + pageTitle: string; } export const pageContainerStyles = { @@ -35,49 +37,53 @@ const PageLayoutV1: FC = ({ children, rightPanel, className, + pageTitle, center = false, }: PageLayoutProp) => { return ( - - {leftPanel && ( - - {leftPanel} - - )} - + + + {leftPanel && ( + + {leftPanel} + )} - flex={ - leftPanel && rightPanel - ? 'calc(100% - 568px)' - : leftPanel || rightPanel - ? 'calc(100% - 284px)' - : '100%' - } - offset={center ? 3 : 0} - span={center ? 18 : 24}> - {children} - - {rightPanel && ( - {rightPanel} + className={classNames( + 'page-layout-v1-center page-layout-v1-vertical-scroll', + { + 'flex justify-center': center, + } + )} + flex={ + leftPanel && rightPanel + ? 'calc(100% - 568px)' + : leftPanel || rightPanel + ? 'calc(100% - 284px)' + : '100%' + } + offset={center ? 3 : 0} + span={center ? 18 : 24}> + {children} - )} - + {rightPanel && ( + + {rightPanel} + + )} + + ); }; diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json index 197f71349b6..cbdce851002 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json @@ -79,6 +79,7 @@ "basic-configuration": "Basic Configuration", "batch-size": "Batch Size", "bot": "Bot", + "bot-detail": "Bot detail", "bot-lowercase": "bot", "bot-plural": "Bots", "broker-plural": "Brokers", @@ -180,6 +181,7 @@ "data-insight-tier-summary": "Total Data Assets by Tier", "data-insight-top-viewed-entity-summary": "Most Viewed Data Assets", "data-insight-total-entity-summary": "Total Data Assets", + "data-quality-test": "Data Quality Test", "data-type": "Data Type", "database": "Database", "database-lowercase": "database", @@ -755,6 +757,7 @@ "test-entity": "Test {{entity}}", "test-plural": "Tests", "test-suite": "Test Suite", + "test-suite-ingestion": "Test suite ingestion", "test-suite-plural": "Test Suites", "test-suite-status": "Test Suite Status", "test-type": "Test type", diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/AddIngestionPage/AddIngestionPage.component.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/AddIngestionPage/AddIngestionPage.component.tsx index 59c21e25f41..18759075566 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/AddIngestionPage/AddIngestionPage.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/AddIngestionPage/AddIngestionPage.component.tsx @@ -233,7 +233,9 @@ const AddIngestionPage = () => { } else { 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 ce5d8ff13e3..0a4223efe6f 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 @@ -267,7 +267,9 @@ const DataInsightPage = () => { }, [tab]); return ( - }> + } + pageTitle={t('label.data-insight')}> diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/EditConnectionFormPage/EditConnectionFormPage.component.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/EditConnectionFormPage/EditConnectionFormPage.component.tsx index b8f320af793..85b2f91578e 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/EditConnectionFormPage/EditConnectionFormPage.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/EditConnectionFormPage/EditConnectionFormPage.component.tsx @@ -150,7 +150,7 @@ function EditConnectionFormPage() { {getEntityMissingError(serviceCategory, serviceFQN)} ) : ( - +
diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/EditIngestionPage/EditIngestionPage.component.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/EditIngestionPage/EditIngestionPage.component.tsx index 709f42a3c92..0c847253067 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/EditIngestionPage/EditIngestionPage.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/EditIngestionPage/EditIngestionPage.component.tsx @@ -23,6 +23,7 @@ import Loader from 'components/Loader/Loader'; import { startCase } from 'lodash'; import { ServicesUpdateRequest, ServiceTypes } from 'Models'; import React, { useEffect, useState } from 'react'; +import { useTranslation } from 'react-i18next'; import { useHistory, useParams } from 'react-router-dom'; import { deployIngestionPipelineById, @@ -60,6 +61,7 @@ import { import { showErrorToast } from '../../utils/ToastUtils'; const EditIngestionPage = () => { + const { t } = useTranslation(); const { isAirflowAvailable, fetchAirflowStatus } = useAirflowStatus(); const { ingestionFQN, ingestionType, serviceFQN, serviceCategory } = useParams<{ [key: string]: string }>(); @@ -265,7 +267,11 @@ const EditIngestionPage = () => { } else { return (
- +
diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/Glossary/GlossaryPage/GlossaryPage.component.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/Glossary/GlossaryPage/GlossaryPage.component.tsx index 2f98bc1b290..97cec9c032d 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/Glossary/GlossaryPage/GlossaryPage.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/Glossary/GlossaryPage/GlossaryPage.component.tsx @@ -252,7 +252,9 @@ const GlossaryPage = () => { return ( - }> + } + pageTitle={t('label.glossary')}> {isRightPanelLoading ? ( // Loader for right panel data diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/Glossary/GlossaryPage/GlossaryPage.test.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/Glossary/GlossaryPage/GlossaryPage.test.tsx index ffa1aeaa299..9af1e96c175 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/Glossary/GlossaryPage/GlossaryPage.test.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/Glossary/GlossaryPage/GlossaryPage.test.tsx @@ -74,6 +74,16 @@ jest.mock('rest/glossaryAPI', () => ({ .mockImplementation(() => Promise.resolve({ data: MOCK_GLOSSARY })), })); +jest.mock('components/containers/PageLayoutV1', () => + jest.fn().mockImplementation(({ children, leftPanel, rightPanel }) => ( +
+ {leftPanel} + {children} + {rightPanel} +
+ )) +); + describe('Test GlossaryComponent page', () => { it('GlossaryComponent Page Should render', async () => { render(); diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/LineagePage/LineagePage.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/LineagePage/LineagePage.tsx index af874b3cf0a..4520c100397 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/LineagePage/LineagePage.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/LineagePage/LineagePage.tsx @@ -26,6 +26,7 @@ import { LoadingNodeState, } from 'components/EntityLineage/EntityLineage.interface'; import React, { useEffect, useState } from 'react'; +import { useTranslation } from 'react-i18next'; import { useHistory, useParams } from 'react-router-dom'; import { getDashboardByFqn } from 'rest/dashboardAPI'; import { getLineageByFQN } from 'rest/lineageAPI'; @@ -65,6 +66,7 @@ import { showErrorToast } from '../../utils/ToastUtils'; import './lineagePage.style.less'; const LineagePage = () => { + const { t } = useTranslation(); const { entityType, entityFQN } = useParams<{ entityType: EntityType; entityFQN: string }>(); const history = useHistory(); @@ -336,7 +338,7 @@ const LineagePage = () => { return ( - +
diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/PoliciesPage/AddPolicyPage/AddPolicyPage.test.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/PoliciesPage/AddPolicyPage/AddPolicyPage.test.tsx index e4809b42158..14ae5968084 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/PoliciesPage/AddPolicyPage/AddPolicyPage.test.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/PoliciesPage/AddPolicyPage/AddPolicyPage.test.tsx @@ -44,6 +44,16 @@ jest.mock('../../../utils/ToastUtils', () => ({ showErrorToast: jest.fn(), })); +jest.mock('components/containers/PageLayoutV1', () => + jest.fn().mockImplementation(({ children, leftPanel, rightPanel }) => ( +
+ {leftPanel} + {children} + {rightPanel} +
+ )) +); + describe('Test Add Policy Page', () => { it('Should Render the Add Policy page component', async () => { render(, { wrapper: MemoryRouter }); diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/PoliciesPage/AddPolicyPage/AddPolicyPage.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/PoliciesPage/AddPolicyPage/AddPolicyPage.tsx index 850201b331e..a9e31428ba2 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/PoliciesPage/AddPolicyPage/AddPolicyPage.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/PoliciesPage/AddPolicyPage/AddPolicyPage.tsx @@ -103,7 +103,9 @@ const AddPolicyPage = () => { return (
- + diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/RolesPage/AddRolePage/AddRolePage.test.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/RolesPage/AddRolePage/AddRolePage.test.tsx index 2e40ebebd5b..954304b3edb 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/RolesPage/AddRolePage/AddRolePage.test.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/RolesPage/AddRolePage/AddRolePage.test.tsx @@ -45,6 +45,16 @@ jest.mock('../../../utils/ToastUtils', () => ({ showErrorToast: jest.fn(), })); +jest.mock('components/containers/PageLayoutV1', () => + jest.fn().mockImplementation(({ children, leftPanel, rightPanel }) => ( +
+ {leftPanel} + {children} + {rightPanel} +
+ )) +); + describe('Test Add Role Page', () => { it('Should Render the Add Role page component', async () => { render(, { wrapper: MemoryRouter }); diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/RolesPage/AddRolePage/AddRolePage.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/RolesPage/AddRolePage/AddRolePage.tsx index 32ed66a690a..d74dc007c87 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/RolesPage/AddRolePage/AddRolePage.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/RolesPage/AddRolePage/AddRolePage.tsx @@ -98,7 +98,9 @@ const AddRolePage = () => { return (
- + diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/TasksPage/shared/TaskPageLayout.test.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/TasksPage/shared/TaskPageLayout.test.tsx index 36a34d82ab4..3a95c7130cc 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/TasksPage/shared/TaskPageLayout.test.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/TasksPage/shared/TaskPageLayout.test.tsx @@ -18,6 +18,16 @@ const mockProps = { children:
, }; +jest.mock('components/containers/PageLayoutV1', () => + jest.fn().mockImplementation(({ children, leftPanel, rightPanel }) => ( +
+ {leftPanel} + {children} + {rightPanel} +
+ )) +); + describe('Test TaskPageLayout Component', () => { it('Should render the component', async () => { render(); diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/TasksPage/shared/TaskPageLayout.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/TasksPage/shared/TaskPageLayout.tsx index 771383b2783..9c9e2265460 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/TasksPage/shared/TaskPageLayout.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/TasksPage/shared/TaskPageLayout.tsx @@ -14,14 +14,19 @@ import PageContainerV1 from 'components/containers/PageContainerV1'; import PageLayoutV1 from 'components/containers/PageLayoutV1'; import React, { FC, HTMLAttributes } from 'react'; +import { useTranslation } from 'react-i18next'; // eslint-disable-next-line @typescript-eslint/no-empty-interface interface Props extends HTMLAttributes {} const TaskPageLayout: FC = ({ children }) => { + const { t } = useTranslation(); + return ( - {children} + + {children} + ); }; diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/TestSuiteIngestionPage/TestSuiteIngestionPage.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/TestSuiteIngestionPage/TestSuiteIngestionPage.tsx index ca657eccd1c..ebac2b37435 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/TestSuiteIngestionPage/TestSuiteIngestionPage.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/TestSuiteIngestionPage/TestSuiteIngestionPage.tsx @@ -131,6 +131,7 @@ const TestSuiteIngestionPage = () => { classes="tw-max-w-full-hd tw-h-full tw-pt-4" header={} layout={PageLayoutType['2ColRTL']} + pageTitle={t('label.test-suite-ingestion')} rightPanel={}> { } return ( - + + jest.fn().mockImplementation(({ children, leftPanel, rightPanel }) => ( +
+ {leftPanel} + {children} + {rightPanel} +
+ )) +); + describe('Test Suite Stepper Page', () => { it('Component should render', async () => { await act(async () => { diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/TestSuitePage/TestSuiteStepper.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/TestSuitePage/TestSuiteStepper.tsx index 57168b895ab..a4540eb80d8 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/TestSuitePage/TestSuiteStepper.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/TestSuitePage/TestSuiteStepper.tsx @@ -86,7 +86,7 @@ const TestSuiteStepper = () => { return (
- + {addIngestion ? ( diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/tags/index.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/tags/index.tsx index 67e26cd76a1..0ddc1cc0e50 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/tags/index.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/tags/index.tsx @@ -773,7 +773,9 @@ const TagsPage = () => { return ( - + {isLoading ? ( ) : error ? ( diff --git a/openmetadata-ui/src/main/resources/ui/yarn.lock b/openmetadata-ui/src/main/resources/ui/yarn.lock index c9b41a28883..70bdb7feefb 100644 --- a/openmetadata-ui/src/main/resources/ui/yarn.lock +++ b/openmetadata-ui/src/main/resources/ui/yarn.lock @@ -12104,6 +12104,22 @@ react-error-boundary@^3.1.4: dependencies: "@babel/runtime" "^7.12.5" +react-fast-compare@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/react-fast-compare/-/react-fast-compare-3.2.0.tgz#641a9da81b6a6320f270e89724fb45a0b39e43bb" + integrity sha512-rtGImPZ0YyLrscKI9xTpV8psd6I8VAtjKCzQDlzyDvqJA8XOW78TXYQwNRNd8g8JZnDu8q9Fu/1v4HPAVwVdHA== + +react-helmet-async@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/react-helmet-async/-/react-helmet-async-1.3.0.tgz#7bd5bf8c5c69ea9f02f6083f14ce33ef545c222e" + integrity sha512-9jZ57/dAn9t3q6hneQS0wukqC2ENOBgMNVEhb/ZG9ZSxUetzVIw4iAmEU38IaVg3QGYauQPhSeUTuIUtFglWpg== + dependencies: + "@babel/runtime" "^7.12.5" + invariant "^2.2.4" + prop-types "^15.7.2" + react-fast-compare "^3.2.0" + shallowequal "^1.1.0" + react-i18next@^11.18.6: version "11.18.6" resolved "https://registry.yarnpkg.com/react-i18next/-/react-i18next-11.18.6.tgz#e159c2960c718c1314f1e8fcaa282d1c8b167887"