diff --git a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/Alerts.spec.js b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/Alerts.spec.js index ca93536d7ed..5c29663dcf6 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/Alerts.spec.js +++ b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/Alerts.spec.js @@ -256,9 +256,10 @@ describe('Alerts page should work properly', () => { .contains(TEST_CASE.testCaseAlert) .click(); // Check data asset - cy.get( - '.ant-row-middle > :nth-child(2) > :nth-child(1) > :nth-child(1) > :nth-child(3)' - ).should('contain', TEST_CASE.dataAsset); + cy.get('[data-testid="display-name-entities"]').should( + 'contain', + TEST_CASE.dataAsset + ); cy.get('div.ant-typography').should('contain', TEST_CASE.filters); }); diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Alerts/AlertsDetails/AlertDetails.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Alerts/AlertsDetails/AlertDetails.component.tsx index 1205c09b168..2b626669e2a 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Alerts/AlertsDetails/AlertDetails.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Alerts/AlertsDetails/AlertDetails.component.tsx @@ -14,6 +14,10 @@ import { CheckCircleOutlined, CloseCircleOutlined } from '@ant-design/icons'; import Icon from '@ant-design/icons/lib/components/Icon'; import { Button, Card, Col, Divider, Row, Space, Tag, Typography } from 'antd'; +import TitleBreadcrumb from 'components/common/title-breadcrumb/title-breadcrumb.component'; +import { TitleBreadcrumbProps } from 'components/common/title-breadcrumb/title-breadcrumb.interface'; +import PageHeader from 'components/header/PageHeader.component'; +import { HeaderProps } from 'components/header/PageHeader.interface'; import { isArray } from 'lodash'; import React, { Fragment } from 'react'; import { useTranslation } from 'react-i18next'; @@ -38,15 +42,13 @@ import { getFunctionDisplayName, } from '../../../utils/Alerts/AlertsUtil'; import { getHostNameFromURL } from '../../../utils/CommonUtils'; -import RichTextEditorPreviewer from '../../common/rich-text-editor/RichTextEditorPreviewer'; -import TitleBreadcrumb from '../../common/title-breadcrumb/title-breadcrumb.component'; -import { TitleBreadcrumbProps } from '../../common/title-breadcrumb/title-breadcrumb.interface'; interface AlertDetailsComponentProps { alerts: Alerts; alertActions: AlertAction[]; onDelete: () => void; - breadcrumb: TitleBreadcrumbProps['titleLinks']; + pageHeaderData?: HeaderProps['data']; + breadcrumb?: TitleBreadcrumbProps['titleLinks']; allowDelete?: boolean; allowEdit?: boolean; } @@ -55,8 +57,9 @@ export const AlertDetailsComponent = ({ alerts, alertActions, onDelete, - breadcrumb, + pageHeaderData, allowDelete = true, + breadcrumb, allowEdit = true, }: AlertDetailsComponentProps) => { const { t } = useTranslation(); @@ -65,7 +68,9 @@ export const AlertDetailsComponent = ({
- + {breadcrumb ? : null} + + {pageHeaderData ? : null} {allowEdit && ( @@ -86,13 +91,6 @@ export const AlertDetailsComponent = ({ - {alerts.description && ( - <> - - - - )} - {t('label.trigger')} @@ -103,7 +101,7 @@ export const AlertDetailsComponent = ({ )} : - + {alerts?.triggerConfig.entities ?.map(getDisplayNameForEntities) ?.join(', ')} @@ -149,7 +147,18 @@ export const AlertDetailsComponent = ({ )} ) : ( - }> + + {getAlertsActionTypeIcon(action.alertActionType)} + + {getAlertActionTypeDisplayName( + action.alertActionType ?? + AlertActionType.GenericWebhook + )} + + }> {action.alertActionType === AlertActionType.Email && ( <> diff --git a/openmetadata-ui/src/main/resources/ui/src/components/common/table-data-card-v2/TableDataCardTitle.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/common/table-data-card-v2/TableDataCardTitle.component.tsx index 3ab615ba8b9..d3aa8a7830d 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/common/table-data-card-v2/TableDataCardTitle.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/common/table-data-card-v2/TableDataCardTitle.component.tsx @@ -12,6 +12,7 @@ */ import { Button, Typography } from 'antd'; +import { toString } from 'lodash'; import React, { useMemo } from 'react'; import { Link } from 'react-router-dom'; import { ROUTES } from '../../../constants/constants'; @@ -43,23 +44,24 @@ const TableDataCardTitle = ({ }: TableDataCardTitleProps) => { const isTourRoute = location.pathname.includes(ROUTES.TOUR); - const testId = useMemo( - () => - dataTestId + const { testId, displayName } = useMemo( + () => ({ + testId: dataTestId ? dataTestId : `${getPartialNameFromTableFQN(source.fullyQualifiedName ?? '', [ FqnPart.Service, ])}-${getNameFromFQN(source.fullyQualifiedName ?? '')}`, + displayName: toString(source.displayName), + }), [dataTestId, source] ); - const title = ( ); @@ -72,7 +74,7 @@ const TableDataCardTitle = ({ ellipsis className="m-b-0 text-base" level={5} - title={source.name}> + title={displayName}> diff --git a/openmetadata-ui/src/main/resources/ui/src/components/header/PageHeader.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/header/PageHeader.component.tsx index 3ea499e69ca..75932b982a7 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/header/PageHeader.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/header/PageHeader.component.tsx @@ -13,15 +13,9 @@ import { Typography } from 'antd'; import React from 'react'; +import { HeaderProps } from './PageHeader.interface'; import './PageHeader.style.less'; -interface HeaderProps { - data: { - header: string; - subHeader: string; - }; -} - const PageHeader = ({ data: { header, subHeader } }: HeaderProps) => { return (
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/header/PageHeader.interface.ts b/openmetadata-ui/src/main/resources/ui/src/components/header/PageHeader.interface.ts new file mode 100644 index 00000000000..9f817a0ee99 --- /dev/null +++ b/openmetadata-ui/src/main/resources/ui/src/components/header/PageHeader.interface.ts @@ -0,0 +1,19 @@ +/* + * Copyright 2022 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. + */ + +export interface HeaderProps { + data: { + header: string; + subHeader: string; + }; +} diff --git a/openmetadata-ui/src/main/resources/ui/src/components/searched-data/SearchedData.interface.ts b/openmetadata-ui/src/main/resources/ui/src/components/searched-data/SearchedData.interface.ts index 466bbf80ff9..835f3823bfa 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/searched-data/SearchedData.interface.ts +++ b/openmetadata-ui/src/main/resources/ui/src/components/searched-data/SearchedData.interface.ts @@ -31,6 +31,7 @@ type Fields = | 'fullyQualifiedName' | 'description' | 'serviceType' + | 'displayName' | 'deleted'; export type SourceType = ( diff --git a/openmetadata-ui/src/main/resources/ui/src/components/searched-data/SearchedData.tsx b/openmetadata-ui/src/main/resources/ui/src/components/searched-data/SearchedData.tsx index 39ab451dc7e..6126ee0495b 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/searched-data/SearchedData.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/searched-data/SearchedData.tsx @@ -12,7 +12,7 @@ */ import classNames from 'classnames'; -import { isUndefined } from 'lodash'; +import { isUndefined, toString } from 'lodash'; import PropTypes from 'prop-types'; import React from 'react'; import { PAGE_SIZE } from '../../constants/constants'; @@ -64,7 +64,7 @@ const SearchedData: React.FC = ({ }); } - let name = table.name; + let name = toString(table.displayName); if (!isUndefined(highlight)) { name = highlight?.name?.join(' ') || name; } 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 232aaba182c..a1c8f6ce71f 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 @@ -188,6 +188,7 @@ "edit-workflow-ingestion": "Edit {{workflow}} Ingestion", "edited": "Edited", "effect": "Effect", + "elastic-search": "Elasticsearch", "elastic-search-re-index": "ElasticsearchReindex", "email": "Email", "email-plural": "Emails", @@ -658,6 +659,7 @@ "delete-team-message": "Any teams under \"{{teamName}}\" will be {{deleteType}} deleted as well.", "delete-webhook-permanently": "You want to delete webhook {{webhookName}} permanently? This action cannot be reverted.", "discover-your-data-and-unlock-the-value-of-data-assets": "Discover your data and unlock the value of data assets.", + "elastic-search-message": "Manage Elastisearch related works here. You can trigger re-create indexes or check the status of re-creating indexes", "email-is-invalid": "Invalid Email.", "enable-column-profile": "Enable column profile", "enable-debug-logging": "Enable debug logging", diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/AlertsActivityFeedPage/AlertsActivityFeedPage.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/AlertsActivityFeedPage/AlertsActivityFeedPage.tsx index b3b16b95596..fa39cb22e6a 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/AlertsActivityFeedPage/AlertsActivityFeedPage.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/AlertsActivityFeedPage/AlertsActivityFeedPage.tsx @@ -67,13 +67,11 @@ const AlertsActivityFeedPage = () => { fetchActivityFeedAlert(); }, []); - const breadcrumb = useMemo( - () => [ - { - name: getEntityName(alert), - url: '', - }, - ], + const pageHeaderData = useMemo( + () => ({ + header: getEntityName(alert), + subHeader: alert?.description || '', + }), [alert] ); @@ -86,7 +84,7 @@ const AlertsActivityFeedPage = () => { alertActions={alertActions} alerts={alert} allowDelete={false} - breadcrumb={breadcrumb} + pageHeaderData={pageHeaderData} onDelete={noop} /> ) : ( diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/AlertsPage/AlertsPage.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/AlertsPage/AlertsPage.tsx index 3f0f6e4bb4c..f3ea747fb49 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/AlertsPage/AlertsPage.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/AlertsPage/AlertsPage.tsx @@ -10,9 +10,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { Button, Col, Row, Table, Tooltip, Typography } from 'antd'; +import { Button, Col, Row, Table, Tooltip } from 'antd'; import DeleteWidgetModal from 'components/common/DeleteWidget/DeleteWidgetModal'; import NextPrevious from 'components/common/next-previous/NextPrevious'; +import PageHeader from 'components/header/PageHeader.component'; import Loader from 'components/Loader/Loader'; import { isNil } from 'lodash'; import React, { useCallback, useEffect, useMemo, useState } from 'react'; @@ -131,19 +132,20 @@ const AlertsPage = () => { [handleAlertDelete] ); + const pageHeaderData = useMemo( + () => ({ + header: t('label.alert-plural'), + subHeader: t('message.alerts-description'), + }), + [] + ); + return ( <>
-
- - {t('label.alert-plural')} - - - {t('message.alerts-description')} - -
+ { + const { t } = useTranslation(); const [batchJobData, setBatchJobData] = useState(); const [streamJobData, setStreamJobData] = useState(); @@ -128,253 +131,271 @@ const ElasticSearchIndexPage = () => { }, []); return ( -
- - - - - - } - loading={batchLoading} - size="small" - title="ElasticSearch"> - - - -
- Mode : - - {startCase(batchJobData?.runMode) || '--'} - -
- -
- Status : - - - {batchJobData?.status && ( - - )} - - {getEventPublisherStatusText(batchJobData?.status) || - '--'} + + + + + +
+ + + + + + } + loading={batchLoading} + size="small" + title="ElasticSearch"> + + + +
+ Mode : + + {startCase(batchJobData?.runMode) || '--'} - - -
- -
- Index stats : +
+ +
+ Status : + + + {batchJobData?.status && ( + + )} + + {getEventPublisherStatusText( + batchJobData?.status + ) || '--'} + + + +
+ +
+ Index stats : + + {!isEmpty(batchJobData) ? ( + + + + + + + + ) : ( + '--' + )} + +
+ +
+ Last Updated : + + {batchJobData?.timestamp + ? getDateTimeByTimeStampWithZone( + batchJobData?.timestamp + ) + : '--'} + +
+ +
+ Last Failed At: +

+ {batchJobData?.failureDetails?.lastFailedAt + ? getDateTimeByTimeStampWithZone( + batchJobData?.failureDetails?.lastFailedAt + ) + : '--'} +

+
+
+ + + Failure Context: - {!isEmpty(batchJobData) ? ( - - - - - - - + {batchJobData?.failureDetails?.context ? ( + ) : ( '--' )} -
- -
- Last Updated : + + + Last error: - {batchJobData?.timestamp - ? getDateTimeByTimeStampWithZone( - batchJobData?.timestamp - ) - : '--'} + {batchJobData?.failureDetails?.lastFailedReason ? ( + + ) : ( + '--' + )} -
- -
- Last Failed At: -

- {batchJobData?.failureDetails?.lastFailedAt - ? getDateTimeByTimeStampWithZone( - batchJobData?.failureDetails?.lastFailedAt - ) - : '--'} -

-
-
- - - Failure Context: - - {batchJobData?.failureDetails?.context ? ( - - ) : ( - '--' - )} - - - - Last error: - - {batchJobData?.failureDetails?.lastFailedReason ? ( - - ) : ( - '--' - )} - - - - - - - } + + + + + + } + size="small" + title="Refresh log" + onClick={fetchStreamReIndexedData} + /> + } + loading={streamLoading} size="small" - title="Refresh log" - onClick={fetchStreamReIndexedData} - /> - } - loading={streamLoading} - size="small" - title="ElasticSearch"> - - - -
- Mode : - - {startCase(streamJobData?.runMode) || '--'} - -
-
- Status : - - - {streamJobData?.status && ( - - )} - - {getEventPublisherStatusText(streamJobData?.status) || - '--'} + title="ElasticSearch"> + + + +
+ Mode : + + {startCase(streamJobData?.runMode) || '--'} - - -
+
+
+ Status : + + + {streamJobData?.status && ( + + )} + + {getEventPublisherStatusText( + streamJobData?.status + ) || '--'} + + + +
-
- Last Updated : +
+ Last Updated : + + {streamJobData?.timestamp + ? getDateTimeByTimeStampWithZone( + streamJobData?.timestamp + ) + : '--'} + +
+
+ Last Failed At: +

+ {streamJobData?.failureDetails?.lastFailedAt + ? getDateTimeByTimeStampWithZone( + streamJobData?.failureDetails?.lastFailedAt + ) + : '--'} +

+
+ + + + Failure Context: - {streamJobData?.timestamp - ? getDateTimeByTimeStampWithZone( - streamJobData?.timestamp - ) - : '--'} + {streamJobData?.failureDetails?.context ? ( + + ) : ( + '--' + )} -
-
- Last Failed At: -

- {streamJobData?.failureDetails?.lastFailedAt - ? getDateTimeByTimeStampWithZone( - streamJobData?.failureDetails?.lastFailedAt - ) - : '--'} -

-
-
- - - Failure Context: - - {streamJobData?.failureDetails?.context ? ( - - ) : ( - '--' - )} - - - - Last error: - - {streamJobData?.failureDetails?.lastFailedReason ? ( - - ) : ( - '--' - )} - - -
-
- - - setModalOpen(false)} - onSave={performReIndexAll} - /> -
+ + + Last error: + + {streamJobData?.failureDetails?.lastFailedReason ? ( + + ) : ( + '--' + )} + + +
+
+ +
+ setModalOpen(false)} + onSave={performReIndexAll} + /> +
+ + ); }; diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/Glossary/GlossaryLeftPanel/GlossaryLeftPanel.component.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/Glossary/GlossaryLeftPanel/GlossaryLeftPanel.component.tsx index 0753fcb9aa7..93e958ad55f 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/Glossary/GlossaryLeftPanel/GlossaryLeftPanel.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/Glossary/GlossaryLeftPanel/GlossaryLeftPanel.component.tsx @@ -87,11 +87,11 @@ const GlossaryLeftPanel = ({ glossaries }: GlossaryLeftPanelProps) => { return ( - + - + {t('label.glossary')} - + { : t('message.no-permission-for-action') }> 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 ab152f5d7ac..716f6181e4e 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 @@ -804,12 +804,11 @@ const TagsPage = () => { ) : ( - + {getEntityName(currentClassification)} - + {currentClassification.provider === ProviderType.User && ( {
)} -
+
{ return ( -
+
{heading}
diff --git a/openmetadata-ui/src/main/resources/ui/src/utils/GlobalSettingsUtils.tsx b/openmetadata-ui/src/main/resources/ui/src/utils/GlobalSettingsUtils.tsx index ca1a0c18d54..c047e1bdb2e 100644 --- a/openmetadata-ui/src/main/resources/ui/src/utils/GlobalSettingsUtils.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/utils/GlobalSettingsUtils.tsx @@ -278,7 +278,12 @@ export const getGlobalSettingMenuItem = ( icon, children: subItems, label: isBeta ? ( - + {label} ) : (