diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Entity/Task/TaskTabIncidentManagerHeader/TasktabIncidentManagerHeaderNew.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Entity/Task/TaskTabIncidentManagerHeader/TasktabIncidentManagerHeaderNew.tsx
new file mode 100644
index 000000000000..8ba78131f9f9
--- /dev/null
+++ b/openmetadata-ui/src/main/resources/ui/src/components/Entity/Task/TaskTabIncidentManagerHeader/TasktabIncidentManagerHeaderNew.tsx
@@ -0,0 +1,225 @@
+/*
+ * 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 { Col, Row, Steps, Typography } from 'antd';
+import { last, toLower } from 'lodash';
+import React, { ReactNode, useMemo } from 'react';
+import { useTranslation } from 'react-i18next';
+import { ReactComponent as AssigneesIcon } from '../../../../assets/svg/assignees.svg';
+import { ReactComponent as UserIcon } from '../../../../assets/svg/user-profile.svg';
+import { NO_DATA_PLACEHOLDER } from '../../../../constants/constants';
+import { TEST_CASE_STATUS } from '../../../../constants/TestSuite.constant';
+import { Thread } from '../../../../generated/entity/feed/thread';
+import { TestCaseResolutionStatusTypes } from '../../../../generated/tests/testCaseResolutionStatus';
+import { formatDateTime } from '../../../../utils/date-time/DateTimeUtils';
+import { getEntityName } from '../../../../utils/EntityUtils';
+import { useActivityFeedProvider } from '../../../ActivityFeed/ActivityFeedProvider/ActivityFeedProvider';
+import { OwnerLabel } from '../../../common/OwnerLabel/OwnerLabel.component';
+import ProfilePicture from '../../../common/ProfilePicture/ProfilePicture';
+import RichTextEditorPreviewerV1 from '../../../common/RichTextEditor/RichTextEditorPreviewerV1';
+import Severity from '../../../DataQuality/IncidentManager/Severity/Severity.component';
+import './task-tab-incident-manager-header.style.less';
+
+const TaskTabIncidentManagerHeaderNew = ({ thread }: { thread: Thread }) => {
+ const { t } = useTranslation();
+ const { testCaseResolutionStatus } = useActivityFeedProvider();
+ const testCaseResolutionStepper = useMemo(() => {
+ const updatedData = [...testCaseResolutionStatus];
+ const lastStatusType = last(
+ testCaseResolutionStatus
+ )?.testCaseResolutionStatusType;
+
+ if (lastStatusType && TEST_CASE_STATUS[lastStatusType]) {
+ updatedData.push(
+ ...TEST_CASE_STATUS[lastStatusType].map((type) => ({
+ testCaseResolutionStatusType: type,
+ }))
+ );
+ }
+
+ return updatedData.map((status) => {
+ let details: ReactNode = null;
+
+ switch (status.testCaseResolutionStatusType) {
+ case TestCaseResolutionStatusTypes.ACK:
+ details = status.updatedBy ? (
+
+ {`By ${getEntityName(status.updatedBy)} on `}
+
+ ) : null;
+
+ break;
+ case TestCaseResolutionStatusTypes.Assigned:
+ details = status.testCaseResolutionStatusDetails?.assignee ? (
+
+ {`To ${getEntityName(
+ status.testCaseResolutionStatusDetails?.assignee
+ )} on `}
+
+ ) : null;
+
+ break;
+ case TestCaseResolutionStatusTypes.Resolved:
+ details = status.testCaseResolutionStatusDetails?.resolvedBy ? (
+
+ {`By ${getEntityName(
+ status.testCaseResolutionStatusDetails.resolvedBy
+ )} on `}
+
+ ) : null;
+
+ break;
+
+ default:
+ break;
+ }
+
+ return {
+ className: toLower(status.testCaseResolutionStatusType),
+ title: (
+
+
+ {status.testCaseResolutionStatusType}
+
+
+ {details}
+ {status.updatedAt && (
+
+ {formatDateTime(status.updatedAt)}
+
+ )}
+
+
+ ),
+ key: status.testCaseResolutionStatusType,
+ };
+ });
+ }, [testCaseResolutionStatus]);
+
+ const latestTestCaseResolutionStatus = useMemo(
+ () => last(testCaseResolutionStatus),
+ [testCaseResolutionStatus]
+ );
+
+ const isResolved =
+ latestTestCaseResolutionStatus?.testCaseResolutionStatusType ===
+ TestCaseResolutionStatusTypes.Resolved;
+
+ return (
+
+ {/*
+
+
+
+ */}
+
+
+
+
+
+ {t('label.created-by')}
+
+
+
+ {' '}
+
+ {thread.createdBy}
+
+
+
+
+
+ {`${t('label.assignee-plural')} `}
+
+
+
+
+
+
+
+ {/* */}
+
+ {' '}
+ {`${t('label.severity')} `}
+
+
+
+
+
+
+ {isResolved && (
+
+ {/* */}
+ {`${t(
+ 'label.failure-reason'
+ )}: `}
+
+ )}
+ {isResolved && (
+
+
+ {latestTestCaseResolutionStatus?.testCaseResolutionStatusDetails
+ ?.testCaseFailureReason ?? NO_DATA_PLACEHOLDER}
+
+
+ )}
+ {isResolved && (
+
+ {/* */}
+
+ {' '}
+ {`${t('label.failure-comment')} `}
+
+
+ )}
+ {isResolved && (
+
+
+
+ )}
+
+
+
+
+
+
+
+ );
+};
+
+export default TaskTabIncidentManagerHeaderNew;
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Entity/Task/TaskTabIncidentManagerHeader/task-tab-incident-manager-header.style.less b/openmetadata-ui/src/main/resources/ui/src/components/Entity/Task/TaskTabIncidentManagerHeader/task-tab-incident-manager-header.style.less
index 473d72ce58cc..d92c7291cbf8 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/Entity/Task/TaskTabIncidentManagerHeader/task-tab-incident-manager-header.style.less
+++ b/openmetadata-ui/src/main/resources/ui/src/components/Entity/Task/TaskTabIncidentManagerHeader/task-tab-incident-manager-header.style.less
@@ -18,3 +18,13 @@
padding: 24px;
overflow-x: auto;
}
+.incident-manager-details-label {
+ font-size: 14px;
+ font-style: normal;
+ font-weight: 400;
+ line-height: 20px;
+}
+
+.incident-manager-details-label.ant-typography {
+ color: #535862;
+}
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/APICollectionSummary/APICollectionSummary.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/APICollectionSummary/APICollectionSummary.tsx
deleted file mode 100644
index a40124e4bdad..000000000000
--- a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/APICollectionSummary/APICollectionSummary.tsx
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * 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.
- */
-
-import { Col, Divider, Row } from 'antd';
-import { get } from 'lodash';
-import React, { useCallback, useEffect, useMemo, useState } from 'react';
-import { TabSpecificField } from '../../../../enums/entity.enum';
-import { ExplorePageTabs } from '../../../../enums/Explore.enum';
-import { APICollection } from '../../../../generated/entity/data/apiCollection';
-import { getApiCollectionByFQN } from '../../../../rest/apiCollectionsAPI';
-import { getSortedTagsWithHighlight } from '../../../../utils/EntitySummaryPanelUtils';
-import {
- DRAWER_NAVIGATION_OPTIONS,
- getEntityOverview,
-} from '../../../../utils/EntityUtils';
-import { OwnerLabel } from '../../../common/OwnerLabel/OwnerLabel.component';
-import SummaryPanelSkeleton from '../../../common/Skeleton/SummaryPanelSkeleton/SummaryPanelSkeleton.component';
-import SummaryTagsDescription from '../../../common/SummaryTagsDescription/SummaryTagsDescription.component';
-import { SearchedDataProps } from '../../../SearchedData/SearchedData.interface';
-import CommonEntitySummaryInfo from '../CommonEntitySummaryInfo/CommonEntitySummaryInfo';
-
-interface APICollectionSummaryProps {
- entityDetails: APICollection;
- componentType?: DRAWER_NAVIGATION_OPTIONS;
- isLoading?: boolean;
- highlights?: SearchedDataProps['data'][number]['highlight'];
-}
-
-const APICollectionSummary = ({
- entityDetails,
- componentType = DRAWER_NAVIGATION_OPTIONS.explore,
- isLoading,
- highlights,
-}: APICollectionSummaryProps) => {
- const entityInfo = useMemo(
- () => getEntityOverview(ExplorePageTabs.API_COLLECTION, entityDetails),
- [entityDetails]
- );
- const [apiCollectionDetails, setApiCollectionDetails] =
- useState
(entityDetails);
-
- const isExplore = useMemo(
- () => componentType === DRAWER_NAVIGATION_OPTIONS.explore,
- [componentType]
- );
-
- const ownerDetails = useMemo(() => {
- const owners = entityDetails.owners;
-
- return {
- value: ,
- };
- }, [entityDetails, apiCollectionDetails]);
-
- const fetchApiCollectionDetails = useCallback(async () => {
- try {
- const res = await getApiCollectionByFQN(
- entityDetails.fullyQualifiedName ?? '',
- {
- fields: [TabSpecificField.TAGS, TabSpecificField.OWNERS],
- }
- );
-
- setApiCollectionDetails({ ...res });
- } catch (error) {
- // Error
- }
- }, [entityDetails]);
-
- useEffect(() => {
- if (entityDetails.service?.type === 'apiService') {
- fetchApiCollectionDetails();
- }
- }, [entityDetails, componentType]);
-
- return (
-
- <>
-
- {!isExplore ? (
-
- {ownerDetails.value}
-
- ) : null}
-
-
-
-
-
-
- >
-
- );
-};
-
-export default APICollectionSummary;
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/APIEndpointSummary/APIEndpointSummary.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/APIEndpointSummary/APIEndpointSummary.tsx
index eb0f1d5dbfab..7195f0d8b02d 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/APIEndpointSummary/APIEndpointSummary.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/APIEndpointSummary/APIEndpointSummary.tsx
@@ -11,71 +11,37 @@
* limitations under the License.
*/
-import { Col, Divider, Radio, RadioChangeEvent, Row, Typography } from 'antd';
-import { get, isEmpty } from 'lodash';
+import { Col, Radio, RadioChangeEvent, Row, Typography } from 'antd';
+import { isEmpty } from 'lodash';
import React, { useCallback, useEffect, useMemo, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { TabSpecificField } from '../../../../enums/entity.enum';
import { SummaryEntityType } from '../../../../enums/EntitySummary.enum';
-import { ExplorePageTabs } from '../../../../enums/Explore.enum';
import { APIEndpoint } from '../../../../generated/entity/data/apiEndpoint';
import { getApiEndPointByFQN } from '../../../../rest/apiEndpointsAPI';
-import {
- getFormattedEntityData,
- getSortedTagsWithHighlight,
-} from '../../../../utils/EntitySummaryPanelUtils';
-import {
- DRAWER_NAVIGATION_OPTIONS,
- getEntityOverview,
-} from '../../../../utils/EntityUtils';
+import { getFormattedEntityData } from '../../../../utils/EntitySummaryPanelUtils';
import { SchemaViewType } from '../../../APIEndpoint/APIEndpointSchema/APIEndpointSchema';
-import { OwnerLabel } from '../../../common/OwnerLabel/OwnerLabel.component';
-import SummaryPanelSkeleton from '../../../common/Skeleton/SummaryPanelSkeleton/SummaryPanelSkeleton.component';
-import SummaryTagsDescription from '../../../common/SummaryTagsDescription/SummaryTagsDescription.component';
import { SearchedDataProps } from '../../../SearchedData/SearchedData.interface';
-import CommonEntitySummaryInfo from '../CommonEntitySummaryInfo/CommonEntitySummaryInfo';
import SummaryList from '../SummaryList/SummaryList.component';
import { BasicEntityInfo } from '../SummaryList/SummaryList.interface';
interface APIEndpointSummaryProps {
entityDetails: APIEndpoint;
- componentType?: DRAWER_NAVIGATION_OPTIONS;
- isLoading?: boolean;
highlights?: SearchedDataProps['data'][number]['highlight'];
}
const APIEndpointSummary = ({
entityDetails,
- componentType = DRAWER_NAVIGATION_OPTIONS.explore,
- isLoading,
highlights,
}: APIEndpointSummaryProps) => {
const { t } = useTranslation();
- const entityInfo = useMemo(
- () => getEntityOverview(ExplorePageTabs.API_ENDPOINT, entityDetails),
- [entityDetails]
- );
-
const [apiEndpointDetails, setApiEndpointDetails] =
useState(entityDetails);
const [viewType, setViewType] = useState(
SchemaViewType.REQUEST_SCHEMA
);
- const isExplore = useMemo(
- () => componentType === DRAWER_NAVIGATION_OPTIONS.explore,
- [componentType]
- );
-
- const ownerDetails = useMemo(() => {
- const owners = entityDetails.owners;
-
- return {
- value: ,
- };
- }, [entityDetails, apiEndpointDetails]);
-
const { formattedSchemaFieldsData, activeSchema } = useMemo(() => {
const activeSchema =
viewType === SchemaViewType.REQUEST_SCHEMA
@@ -117,59 +83,32 @@ const APIEndpointSummary = ({
if (entityDetails.service?.type === 'apiService') {
fetchApiEndpointDetails();
}
- }, [entityDetails, componentType]);
+ }, [entityDetails]);
return (
-
- <>
-
- {!isExplore ? (
-
- {ownerDetails.value}
-
- ) : null}
-
-
-
-
-
-
-
-
-
-
-
-
- {t('label.request')}
-
-
- {t('label.response')}
-
-
-
-
- {isEmpty(activeSchema?.schemaFields) ? (
-
-
- {t('message.no-data-available')}
-
-
- ) : (
-
- )}
-
-
- >
-
+
+
+
+
+ {t('label.request')}
+
+
+ {t('label.response')}
+
+
+
+
+ {isEmpty(activeSchema?.schemaFields) ? (
+
+
+ {t('message.no-data-available')}
+
+
+ ) : (
+
+ )}
+
+
);
};
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/ChartSummary/ChartSummary.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/ChartSummary/ChartSummary.component.tsx
deleted file mode 100644
index f06ed57a66c1..000000000000
--- a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/ChartSummary/ChartSummary.component.tsx
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright 2024 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 { Col, Divider, Row, Typography } from 'antd';
-import { get } from 'lodash';
-import React, { useMemo } from 'react';
-import { useTranslation } from 'react-i18next';
-import { SummaryEntityType } from '../../../../enums/EntitySummary.enum';
-import { ExplorePageTabs } from '../../../../enums/Explore.enum';
-import { Chart } from '../../../../generated/entity/data/chart';
-import {
- getFormattedEntityData,
- getSortedTagsWithHighlight,
-} from '../../../../utils/EntitySummaryPanelUtils';
-import {
- DRAWER_NAVIGATION_OPTIONS,
- getEntityOverview,
-} from '../../../../utils/EntityUtils';
-import SummaryTagsDescription from '../../../common/SummaryTagsDescription/SummaryTagsDescription.component';
-import { SearchedDataProps } from '../../../SearchedData/SearchedData.interface';
-import CommonEntitySummaryInfo from '../CommonEntitySummaryInfo/CommonEntitySummaryInfo';
-import SummaryList from '../SummaryList/SummaryList.component';
-import { BasicEntityInfo } from '../SummaryList/SummaryList.interface';
-
-interface ChartsSummaryProps {
- entityDetails: Chart;
- highlights?: SearchedDataProps['data'][number]['highlight'];
-}
-
-const ChartSummary = ({ entityDetails, highlights }: ChartsSummaryProps) => {
- const { t } = useTranslation();
- const entityInfo = useMemo(
- () => getEntityOverview(ExplorePageTabs.CHARTS, entityDetails),
- [entityDetails]
- );
- const formattedDashboardData: BasicEntityInfo[] = useMemo(
- () =>
- getFormattedEntityData(
- SummaryEntityType.DASHBOARD,
- entityDetails.dashboards
- ),
- [entityDetails.dashboards]
- );
-
- return (
- <>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {t('label.dashboard-plural')}
-
-
-
-
-
-
- >
- );
-};
-
-export default ChartSummary;
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/ChartSummary/ChartSummary.test.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/ChartSummary/ChartSummary.test.tsx
deleted file mode 100644
index 55d4e12cefc4..000000000000
--- a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/ChartSummary/ChartSummary.test.tsx
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright 2024 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 { act, render, screen } from '@testing-library/react';
-import React from 'react';
-import { MemoryRouter } from 'react-router-dom';
-import { MOCK_CHART_DATA } from '../../../../mocks/Chart.mock';
-import ChartSummary from './ChartSummary.component';
-
-jest.mock('../SummaryList/SummaryList.component', () =>
- jest.fn().mockImplementation(() => SummaryList
)
-);
-
-jest.mock('../CommonEntitySummaryInfo/CommonEntitySummaryInfo', () =>
- jest.fn().mockImplementation(() => testCommonEntitySummaryInfo
)
-);
-
-jest.mock(
- '../../../common/SummaryTagsDescription/SummaryTagsDescription.component',
- () => jest.fn().mockImplementation(() => SummaryTagsDescription
)
-);
-
-jest.mock('../../../../utils/EntityUtils', () => ({
- getEntityOverview: jest.fn(),
- DRAWER_NAVIGATION_OPTIONS: {
- explore: 'explore',
- },
-}));
-
-jest.mock('../../../../utils/EntitySummaryPanelUtils', () => ({
- getSortedTagsWithHighlight: jest.fn(),
- getFormattedEntityData: jest.fn(),
-}));
-
-describe('ChartSummary component tests', () => {
- it('Component should render properly', async () => {
- await act(async () => {
- render(, {
- wrapper: MemoryRouter,
- });
- });
-
- expect(screen.getByTestId('charts-header')).toBeInTheDocument();
- expect(screen.getByText('SummaryList')).toBeInTheDocument();
- expect(screen.getByText('SummaryTagsDescription')).toBeInTheDocument();
- expect(screen.getByText('testCommonEntitySummaryInfo')).toBeInTheDocument();
- });
-});
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/ContainerSummary/ContainerSummary.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/ContainerSummary/ContainerSummary.component.tsx
deleted file mode 100644
index 1420e0d7411d..000000000000
--- a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/ContainerSummary/ContainerSummary.component.tsx
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * 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.
- */
-
-import { Col, Divider, Row, Typography } from 'antd';
-import { get } from 'lodash';
-import React, { useMemo } from 'react';
-import { useTranslation } from 'react-i18next';
-import { SummaryEntityType } from '../../../../enums/EntitySummary.enum';
-import { ExplorePageTabs } from '../../../../enums/Explore.enum';
-import { Container } from '../../../../generated/entity/data/container';
-import {
- getFormattedEntityData,
- getSortedTagsWithHighlight,
-} from '../../../../utils/EntitySummaryPanelUtils';
-import {
- DRAWER_NAVIGATION_OPTIONS,
- getEntityOverview,
-} from '../../../../utils/EntityUtils';
-import SummaryPanelSkeleton from '../../../common/Skeleton/SummaryPanelSkeleton/SummaryPanelSkeleton.component';
-import SummaryTagsDescription from '../../../common/SummaryTagsDescription/SummaryTagsDescription.component';
-import CommonEntitySummaryInfo from '../CommonEntitySummaryInfo/CommonEntitySummaryInfo';
-import SummaryList from '../SummaryList/SummaryList.component';
-import { BasicEntityInfo } from '../SummaryList/SummaryList.interface';
-import { ContainerSummaryProps } from './ContainerSummary.interface';
-
-function ContainerSummary({
- entityDetails,
- componentType = DRAWER_NAVIGATION_OPTIONS.explore,
- isLoading,
- highlights,
-}: ContainerSummaryProps) {
- const { t } = useTranslation();
-
- const entityInfo = useMemo(
- () => getEntityOverview(ExplorePageTabs.CONTAINERS, entityDetails),
- [entityDetails]
- );
-
- const formattedColumnsData: BasicEntityInfo[] = useMemo(
- () =>
- getFormattedEntityData(
- SummaryEntityType.COLUMN,
- (entityDetails as Container).dataModel?.columns,
- highlights
- ),
- [entityDetails]
- );
-
- return (
-
- <>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {t('label.schema')}
-
-
-
-
-
-
- >
-
- );
-}
-
-export default ContainerSummary;
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/ContainerSummary/ContainerSummary.test.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/ContainerSummary/ContainerSummary.test.tsx
deleted file mode 100644
index 7137d616e0ee..000000000000
--- a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/ContainerSummary/ContainerSummary.test.tsx
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * 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 { act, render, screen } from '@testing-library/react';
-import React from 'react';
-import {
- Constraint,
- Container,
- DataType,
- FileFormat,
- StorageServiceType,
-} from '../../../../generated/entity/data/container';
-import ContainerSummary from './ContainerSummary.component';
-
-jest.mock('../SummaryList/SummaryList.component', () =>
- jest
- .fn()
- .mockImplementation(() => SummaryList
)
-);
-
-const mockEntityDetails: Container = {
- id: '63be99e5-8ebf-44b6-8247-0f4faed00798',
- name: 'transactions',
- fullyQualifiedName: 's3_storage_sample.transactions',
- displayName: 'Company Transactions',
- description: "Bucket containing all the company's transactions",
- version: 0.1,
- updatedAt: 1678969800877,
- updatedBy: 'admin',
- href: 'http://openmetadata-server:8585/api/v1/containers/63be99e5-8ebf-44b6-8247-0f4faed00798',
- service: {
- id: '7ab99e67-b578-4361-bad2-9076a52b341d',
- type: 'storageService',
- name: 's3_storage_sample',
- fullyQualifiedName: 's3_storage_sample',
- deleted: false,
- href: 'http://openmetadata-server:8585/api/v1/services/storageServices/7ab99e67-b578-4361-bad2-9076a52b341d',
- },
- dataModel: {
- isPartitioned: true,
- columns: [
- {
- name: 'transaction_id',
- dataType: DataType.Numeric,
- dataTypeDisplay: 'numeric',
- description:
- 'The ID of the executed transaction. This column is the primary key for this table.',
- fullyQualifiedName: 's3_storage_sample.transactions.transaction_id',
- tags: [],
- constraint: Constraint.PrimaryKey,
- ordinalPosition: 1,
- },
- {
- name: 'merchant',
- dataType: DataType.Varchar,
- dataLength: 100,
- dataTypeDisplay: 'varchar',
- description: 'The merchant for this transaction.',
- fullyQualifiedName: 's3_storage_sample.transactions.merchant',
- tags: [],
- ordinalPosition: 2,
- },
- {
- name: 'transaction_time',
- dataType: DataType.Timestamp,
- dataTypeDisplay: 'timestamp',
- description: 'The time the transaction took place.',
- fullyQualifiedName: 's3_storage_sample.transactions.transaction_time',
- tags: [],
- ordinalPosition: 3,
- },
- ],
- },
- prefix: '/transactions/',
- numberOfObjects: 50,
- size: 102400,
- fileFormats: [FileFormat.Parquet],
- serviceType: StorageServiceType.S3,
- deleted: false,
- tags: [],
- followers: [],
-};
-
-describe('ContainerSummary component tests', () => {
- it('Component should render properly, when loaded in the Explore page.', async () => {
- await act(async () => {
- render();
- });
-
- const numberOfObjects = screen.getByTestId('label.object-plural-value');
- const serviceType = screen.getByTestId('label.service-type-value');
- const colsLength = screen.getByTestId('label.column-plural-value');
- const summaryList = screen.getByTestId('SummaryList');
-
- expect(numberOfObjects).toBeInTheDocument();
- expect(serviceType).toBeInTheDocument();
- expect(colsLength).toBeInTheDocument();
- expect(summaryList).toBeInTheDocument();
- });
-});
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/DashboardSummary/DashboardSummary.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/DashboardSummary/DashboardSummary.component.tsx
deleted file mode 100644
index 224b6f058a2a..000000000000
--- a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/DashboardSummary/DashboardSummary.component.tsx
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * 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.
- */
-
-import { Col, Divider, Row, Typography } from 'antd';
-import { get } from 'lodash';
-import React, { useEffect, useMemo, useState } from 'react';
-import { useTranslation } from 'react-i18next';
-import { SummaryEntityType } from '../../../../enums/EntitySummary.enum';
-import { ExplorePageTabs } from '../../../../enums/Explore.enum';
-import {
- Dashboard,
- TagLabel,
-} from '../../../../generated/entity/data/dashboard';
-import { fetchCharts } from '../../../../utils/DashboardDetailsUtils';
-import {
- getFormattedEntityData,
- getSortedTagsWithHighlight,
-} from '../../../../utils/EntitySummaryPanelUtils';
-import {
- DRAWER_NAVIGATION_OPTIONS,
- getEntityOverview,
-} from '../../../../utils/EntityUtils';
-import SummaryPanelSkeleton from '../../../common/Skeleton/SummaryPanelSkeleton/SummaryPanelSkeleton.component';
-import SummaryTagsDescription from '../../../common/SummaryTagsDescription/SummaryTagsDescription.component';
-import { ChartType } from '../../../Dashboard/DashboardDetails/DashboardDetails.interface';
-import { SearchedDataProps } from '../../../SearchedData/SearchedData.interface';
-import CommonEntitySummaryInfo from '../CommonEntitySummaryInfo/CommonEntitySummaryInfo';
-import SummaryList from '../SummaryList/SummaryList.component';
-import { BasicEntityInfo } from '../SummaryList/SummaryList.interface';
-
-interface DashboardSummaryProps {
- entityDetails: Dashboard;
- componentType?: DRAWER_NAVIGATION_OPTIONS;
- tags?: TagLabel[];
- isLoading?: boolean;
- highlights?: SearchedDataProps['data'][number]['highlight'];
-}
-
-function DashboardSummary({
- entityDetails,
- componentType = DRAWER_NAVIGATION_OPTIONS.explore,
- tags,
- isLoading,
- highlights,
-}: DashboardSummaryProps) {
- const { t } = useTranslation();
- const [charts, setCharts] = useState();
-
- const fetchChartsDetails = async () => {
- try {
- const chartDetails = await fetchCharts(entityDetails.charts);
-
- const updatedCharts = chartDetails.map((chartItem) => ({
- ...chartItem,
- sourceUrl: chartItem.sourceUrl,
- }));
-
- setCharts(updatedCharts);
- } catch (err) {
- // Error
- }
- };
-
- const entityInfo = useMemo(
- () => getEntityOverview(ExplorePageTabs.DASHBOARDS, entityDetails),
- [entityDetails]
- );
-
- useEffect(() => {
- fetchChartsDetails();
- }, [entityDetails]);
-
- const formattedChartsData: BasicEntityInfo[] = useMemo(
- () => getFormattedEntityData(SummaryEntityType.CHART, charts, highlights),
- [charts]
- );
-
- const formattedDataModelData: BasicEntityInfo[] = useMemo(
- () =>
- getFormattedEntityData(
- SummaryEntityType.COLUMN,
- entityDetails.dataModels,
- highlights
- ),
- [charts]
- );
-
- return (
-
- <>
-
-
-
-
-
-
-
-
-
-
-
-
-
- {t('label.chart-plural')}
-
-
-
-
-
-
-
-
-
-
-
-
- {t('label.data-model-plural')}
-
-
-
-
-
-
- >
-
- );
-}
-
-export default DashboardSummary;
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/DashboardSummary/DashboardSummary.test.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/DashboardSummary/DashboardSummary.test.tsx
deleted file mode 100644
index e9117e9acf99..000000000000
--- a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/DashboardSummary/DashboardSummary.test.tsx
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * 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 { act, render, screen } from '@testing-library/react';
-import React from 'react';
-import { MemoryRouter } from 'react-router-dom';
-import { DRAWER_NAVIGATION_OPTIONS } from '../../../../utils/EntityUtils';
-import {
- mockDashboardEntityDetails,
- mockFetchChartsResponse,
-} from '../mocks/DashboardSummary.mock';
-import DashboardSummary from './DashboardSummary.component';
-
-jest.mock('../SummaryList/SummaryList.component', () =>
- jest
- .fn()
- .mockImplementation(() => SummaryList
)
-);
-
-jest.mock('../CommonEntitySummaryInfo/CommonEntitySummaryInfo', () =>
- jest.fn().mockImplementation(() => testCommonEntitySummaryInfo
)
-);
-
-jest.mock('../../../../utils/DashboardDetailsUtils', () => ({
- fetchCharts: jest.fn().mockImplementation(() => mockFetchChartsResponse),
-}));
-
-describe('DashboardSummary component tests', () => {
- it('Component should render properly', async () => {
- await act(async () => {
- render(, {
- wrapper: MemoryRouter,
- });
- });
-
- const commonEntitySummaryInfo = screen.getByText(
- 'testCommonEntitySummaryInfo'
- );
- const chartsHeader = screen.getByTestId('charts-header');
- const summaryList = screen.getAllByTestId('SummaryList');
-
- expect(commonEntitySummaryInfo).toBeInTheDocument();
- expect(chartsHeader).toBeInTheDocument();
- expect(summaryList).toHaveLength(2);
- });
-
- it('Component should render properly, when loaded in the Lineage page.', async () => {
- await act(async () => {
- const { debug } = render(
- ,
- {
- wrapper: MemoryRouter,
- }
- );
-
- debug();
- });
-
- const ownerLabel = screen.queryByTestId('label.owner-label');
- const commonEntitySummaryInfo = screen.getByText(
- 'testCommonEntitySummaryInfo'
- );
- const tags = screen.getByText('label.tag-plural');
- const description = screen.getByText('label.description');
- const noDataFound = screen.getByText('label.no-data-found');
-
- expect(ownerLabel).not.toBeInTheDocument();
-
- expect(commonEntitySummaryInfo).toBeInTheDocument();
-
- expect(tags).toBeInTheDocument();
- expect(description).toBeInTheDocument();
- expect(noDataFound).toBeInTheDocument();
- });
-});
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/DataModelSummary/DataModelSummary.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/DataModelSummary/DataModelSummary.component.tsx
deleted file mode 100644
index 32d8e4145ce0..000000000000
--- a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/DataModelSummary/DataModelSummary.component.tsx
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * 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 { Col, Divider, Row, Typography } from 'antd';
-import { get, isEmpty } from 'lodash';
-import { default as React, useEffect, useMemo, useState } from 'react';
-import { useTranslation } from 'react-i18next';
-import { SummaryEntityType } from '../../../../enums/EntitySummary.enum';
-import { ExplorePageTabs } from '../../../../enums/Explore.enum';
-import { DashboardDataModel } from '../../../../generated/entity/data/dashboardDataModel';
-import {
- getFormattedEntityData,
- getSortedTagsWithHighlight,
-} from '../../../../utils/EntitySummaryPanelUtils';
-import {
- DRAWER_NAVIGATION_OPTIONS,
- getEntityOverview,
-} from '../../../../utils/EntityUtils';
-import SummaryPanelSkeleton from '../../../common/Skeleton/SummaryPanelSkeleton/SummaryPanelSkeleton.component';
-import SummaryTagsDescription from '../../../common/SummaryTagsDescription/SummaryTagsDescription.component';
-import CommonEntitySummaryInfo from '../CommonEntitySummaryInfo/CommonEntitySummaryInfo';
-import SummaryList from '../SummaryList/SummaryList.component';
-import { BasicEntityInfo } from '../SummaryList/SummaryList.interface';
-import { DataModelSummaryProps } from './DataModelSummary.interface';
-
-const DataModelSummary = ({
- entityDetails,
- componentType = DRAWER_NAVIGATION_OPTIONS.explore,
- tags,
- isLoading,
- highlights,
-}: DataModelSummaryProps) => {
- const { t } = useTranslation();
- const { columns } = entityDetails;
- const [dataModelDetails, setDataModelDetails] =
- useState(entityDetails);
-
- const entityInfo = useMemo(
- () =>
- getEntityOverview(ExplorePageTabs.DASHBOARD_DATA_MODEL, dataModelDetails),
- [dataModelDetails]
- );
-
- const formattedColumnsData: BasicEntityInfo[] = useMemo(
- () => getFormattedEntityData(SummaryEntityType.COLUMN, columns, highlights),
- [columns, dataModelDetails]
- );
-
- useEffect(() => {
- if (!isEmpty(entityDetails)) {
- setDataModelDetails(entityDetails);
- }
- }, [entityDetails]);
-
- return (
-
- <>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {t('label.column-plural')}
-
-
-
-
-
-
- >
-
- );
-};
-
-export default DataModelSummary;
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/DataModelSummary/DataModelSummary.interface.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/DataModelSummary/DataModelSummary.interface.tsx
deleted file mode 100644
index aa403d077633..000000000000
--- a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/DataModelSummary/DataModelSummary.interface.tsx
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * 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 { DashboardDataModel } from '../../../../generated/entity/data/dashboardDataModel';
-import { TagLabel } from '../../../../generated/entity/data/table';
-import { DRAWER_NAVIGATION_OPTIONS } from '../../../../utils/EntityUtils';
-import { SearchedDataProps } from '../../../SearchedData/SearchedData.interface';
-
-export interface DataModelSummaryProps {
- entityDetails: DashboardDataModel;
- componentType?: DRAWER_NAVIGATION_OPTIONS;
- tags?: TagLabel[];
- isLoading?: boolean;
- highlights?: SearchedDataProps['data'][number]['highlight'];
-}
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/DataProductSummary/DataProductSummary.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/DataProductSummary/DataProductSummary.component.tsx
index ca7c0b0e6ba0..3c28b98d01d8 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/DataProductSummary/DataProductSummary.component.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/DataProductSummary/DataProductSummary.component.tsx
@@ -10,7 +10,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-import { Col, Divider, Row, Space, Typography } from 'antd';
+import { Col, Row, Space, Typography } from 'antd';
import React, { useMemo } from 'react';
import { useTranslation } from 'react-i18next';
import { DataProduct } from '../../../../generated/entity/domains/dataProduct';
@@ -34,8 +34,8 @@ const DataProductSummary = ({
return (
- <>
-
+
+
-
-
+
-
-
-
+
-
-
-
+
-
-
- >
+
);
};
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/DatabaseSchemaSummary/DatabaseSchemaSummary.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/DatabaseSchemaSummary/DatabaseSchemaSummary.component.tsx
deleted file mode 100644
index a464e4b39e84..000000000000
--- a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/DatabaseSchemaSummary/DatabaseSchemaSummary.component.tsx
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * 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 { Col, Divider, Row } from 'antd';
-import { get } from 'lodash';
-import React, { useMemo } from 'react';
-import SummaryTagsDescription from '../../../../components/common/SummaryTagsDescription/SummaryTagsDescription.component';
-import { ExplorePageTabs } from '../../../../enums/Explore.enum';
-import { getSortedTagsWithHighlight } from '../../../../utils/EntitySummaryPanelUtils';
-import {
- DRAWER_NAVIGATION_OPTIONS,
- getEntityOverview,
-} from '../../../../utils/EntityUtils';
-import SummaryPanelSkeleton from '../../../common/Skeleton/SummaryPanelSkeleton/SummaryPanelSkeleton.component';
-import CommonEntitySummaryInfo from '../CommonEntitySummaryInfo/CommonEntitySummaryInfo';
-import { DatabaseSchemaSummaryProps } from './DatabaseSchemaSummary.interface';
-
-const DatabaseSchemaSummary = ({
- entityDetails,
- componentType = DRAWER_NAVIGATION_OPTIONS.explore,
- tags,
- isLoading,
- highlights,
-}: DatabaseSchemaSummaryProps) => {
- const entityInfo = useMemo(
- () => getEntityOverview(ExplorePageTabs.DATABASE_SCHEMA, entityDetails),
- [entityDetails]
- );
-
- return (
-
- <>
-
-
-
-
-
-
-
-
-
- >
-
- );
-};
-
-export default DatabaseSchemaSummary;
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/DatabaseSchemaSummary/DatabaseSchemaSummary.interface.ts b/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/DatabaseSchemaSummary/DatabaseSchemaSummary.interface.ts
deleted file mode 100644
index a8621fa5cebf..000000000000
--- a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/DatabaseSchemaSummary/DatabaseSchemaSummary.interface.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * 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 { DatabaseSchema } from '../../../../generated/entity/data/databaseSchema';
-import { TagLabel } from '../../../../generated/type/tagLabel';
-import { DRAWER_NAVIGATION_OPTIONS } from '../../../../utils/EntityUtils';
-import { SearchedDataProps } from '../../../SearchedData/SearchedData.interface';
-
-export interface DatabaseSchemaSummaryProps {
- entityDetails: DatabaseSchema;
- componentType?: DRAWER_NAVIGATION_OPTIONS;
- tags?: TagLabel[];
- isLoading?: boolean;
- highlights?: SearchedDataProps['data'][number]['highlight'];
-}
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/DatabaseSummary/DatabaseSummary.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/DatabaseSummary/DatabaseSummary.component.tsx
deleted file mode 100644
index 1c2ea8b27f9f..000000000000
--- a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/DatabaseSummary/DatabaseSummary.component.tsx
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * 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 { Col, Divider, Row, Typography } from 'antd';
-import { get } from 'lodash';
-import React, { useMemo } from 'react';
-import { useTranslation } from 'react-i18next';
-import SummaryTagsDescription from '../../../../components/common/SummaryTagsDescription/SummaryTagsDescription.component';
-import { SummaryEntityType } from '../../../../enums/EntitySummary.enum';
-import { ExplorePageTabs } from '../../../../enums/Explore.enum';
-import {
- getFormattedEntityData,
- getSortedTagsWithHighlight,
-} from '../../../../utils/EntitySummaryPanelUtils';
-import {
- DRAWER_NAVIGATION_OPTIONS,
- getEntityOverview,
-} from '../../../../utils/EntityUtils';
-import SummaryPanelSkeleton from '../../../common/Skeleton/SummaryPanelSkeleton/SummaryPanelSkeleton.component';
-import CommonEntitySummaryInfo from '../CommonEntitySummaryInfo/CommonEntitySummaryInfo';
-import SummaryList from '../SummaryList/SummaryList.component';
-import { BasicEntityInfo } from '../SummaryList/SummaryList.interface';
-import { DatabaseSummaryProps } from './DatabaseSummary.interface';
-
-const DatabaseSummary = ({
- entityDetails,
- componentType = DRAWER_NAVIGATION_OPTIONS.explore,
- tags,
- isLoading,
- highlights,
-}: DatabaseSummaryProps) => {
- const { t } = useTranslation();
- const entityInfo = useMemo(
- () => getEntityOverview(ExplorePageTabs.DATABASE, entityDetails),
- [entityDetails]
- );
-
- const formattedSchemaData: BasicEntityInfo[] = useMemo(
- () =>
- getFormattedEntityData(
- SummaryEntityType.SCHEMAFIELD,
- entityDetails.databaseSchemas,
- highlights
- ),
- [entityDetails]
- );
-
- return (
-
- <>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {t('label.schema')}
-
-
-
-
-
-
- >
-
- );
-};
-
-export default DatabaseSummary;
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/DatabaseSummary/DatabaseSummary.interface.ts b/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/DatabaseSummary/DatabaseSummary.interface.ts
deleted file mode 100644
index 127621a91316..000000000000
--- a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/DatabaseSummary/DatabaseSummary.interface.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * 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 { Database } from '../../../../generated/entity/data/database';
-import { TagLabel } from '../../../../generated/type/tagLabel';
-import { DRAWER_NAVIGATION_OPTIONS } from '../../../../utils/EntityUtils';
-import { SearchedDataProps } from '../../../SearchedData/SearchedData.interface';
-
-export interface DatabaseSummaryProps {
- entityDetails: Database;
- componentType?: DRAWER_NAVIGATION_OPTIONS;
- tags?: TagLabel[];
- isLoading?: boolean;
- highlights?: SearchedDataProps['data'][number]['highlight'];
-}
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/EntitySummaryPanel.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/EntitySummaryPanel.component.tsx
index 7f135fea60dc..9f597f2bd979 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/EntitySummaryPanel.component.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/EntitySummaryPanel.component.tsx
@@ -11,7 +11,8 @@
* limitations under the License.
*/
-import { Drawer, Typography } from 'antd';
+import { CloseOutlined } from '@ant-design/icons';
+import { Card, Typography } from 'antd';
import { get } from 'lodash';
import React, { useEffect, useMemo, useState } from 'react';
import { Link, useParams } from 'react-router-dom';
@@ -22,64 +23,23 @@ import {
} from '../../../context/PermissionProvider/PermissionProvider.interface';
import { ERROR_PLACEHOLDER_TYPE, SIZE } from '../../../enums/common.enum';
import { EntityType } from '../../../enums/entity.enum';
-import { ExplorePageTabs } from '../../../enums/Explore.enum';
-import { Tag } from '../../../generated/entity/classification/tag';
-import { APICollection } from '../../../generated/entity/data/apiCollection';
-import { APIEndpoint } from '../../../generated/entity/data/apiEndpoint';
-import { Chart } from '../../../generated/entity/data/chart';
-import { Container } from '../../../generated/entity/data/container';
-import { Dashboard } from '../../../generated/entity/data/dashboard';
-import { DashboardDataModel } from '../../../generated/entity/data/dashboardDataModel';
-import { Database } from '../../../generated/entity/data/database';
-import { DatabaseSchema } from '../../../generated/entity/data/databaseSchema';
-import { GlossaryTerm } from '../../../generated/entity/data/glossaryTerm';
-import { Metric } from '../../../generated/entity/data/metric';
-import { Mlmodel } from '../../../generated/entity/data/mlmodel';
-import { Pipeline } from '../../../generated/entity/data/pipeline';
-import { SearchIndex } from '../../../generated/entity/data/searchIndex';
-import { StoredProcedure } from '../../../generated/entity/data/storedProcedure';
-import { Table } from '../../../generated/entity/data/table';
-import { Topic } from '../../../generated/entity/data/topic';
-import { DataProduct } from '../../../generated/entity/domains/dataProduct';
-import { APIService } from '../../../generated/entity/services/apiService';
-import { DashboardService } from '../../../generated/entity/services/dashboardService';
-import { DatabaseService } from '../../../generated/entity/services/databaseService';
-import { MessagingService } from '../../../generated/entity/services/messagingService';
-import { MlmodelService } from '../../../generated/entity/services/mlmodelService';
-import { PipelineService } from '../../../generated/entity/services/pipelineService';
-import { SearchService } from '../../../generated/entity/services/searchService';
-import { StorageService } from '../../../generated/entity/services/storageService';
-import { getEntityLinkFromType } from '../../../utils/EntityUtils';
+import {
+ DRAWER_NAVIGATION_OPTIONS,
+ getEntityLinkFromType,
+} from '../../../utils/EntityUtils';
import { DEFAULT_ENTITY_PERMISSION } from '../../../utils/PermissionsUtils';
import searchClassBase from '../../../utils/SearchClassBase';
import { stringToHTML } from '../../../utils/StringsUtils';
import ErrorPlaceHolder from '../../common/ErrorWithPlaceholder/ErrorPlaceHolder';
import Loader from '../../common/Loader/Loader';
-import APICollectionSummary from './APICollectionSummary/APICollectionSummary';
-import APIEndpointSummary from './APIEndpointSummary/APIEndpointSummary';
-import ChartSummary from './ChartSummary/ChartSummary.component';
-import ContainerSummary from './ContainerSummary/ContainerSummary.component';
-import DashboardSummary from './DashboardSummary/DashboardSummary.component';
-import DatabaseSchemaSummary from './DatabaseSchemaSummary/DatabaseSchemaSummary.component';
-import DatabaseSummary from './DatabaseSummary/DatabaseSummary.component';
-import DataModelSummary from './DataModelSummary/DataModelSummary.component';
-import DataProductSummary from './DataProductSummary/DataProductSummary.component';
+import { DataAssetSummaryPanel } from '../../DataAssetSummaryPanel/DataAssetSummaryPanel';
import './entity-summary-panel.less';
import { EntitySummaryPanelProps } from './EntitySummaryPanel.interface';
-import GlossaryTermSummary from './GlossaryTermSummary/GlossaryTermSummary.component';
-import MetricSummary from './MetricSummary/MetricSummary';
-import MlModelSummary from './MlModelSummary/MlModelSummary.component';
-import PipelineSummary from './PipelineSummary/PipelineSummary.component';
-import SearchIndexSummary from './SearchIndexSummary/SearchIndexSummary.component';
-import ServiceSummary from './ServiceSummary/ServiceSummary.component';
-import StoredProcedureSummary from './StoredProcedureSummary/StoredProcedureSummary.component';
-import TableSummary from './TableSummary/TableSummary.component';
-import TagsSummary from './TagsSummary/TagsSummary.component';
-import TopicSummary from './TopicSummary/TopicSummary.component';
export default function EntitySummaryPanel({
entityDetails,
highlights,
+ handleClosePanel,
}: EntitySummaryPanelProps) {
const { tab } = useParams<{ tab: string }>();
const { getEntityPermission } = usePermissionProvider();
@@ -133,205 +93,19 @@ export default function EntitySummaryPanel({
}
const type = get(entityDetails, 'details.entityType') ?? EntityType.TABLE;
const entity = entityDetails.details;
- switch (type) {
- case EntityType.TABLE:
- return (
-
- );
-
- case EntityType.TOPIC:
- return (
-
- );
-
- case EntityType.DASHBOARD:
- return (
-
- );
-
- case EntityType.CHART:
- return (
-
- );
-
- case EntityType.PIPELINE:
- return (
-
- );
-
- case EntityType.MLMODEL:
- return (
-
- );
-
- case EntityType.CONTAINER:
- return (
-
- );
-
- case EntityType.STORED_PROCEDURE:
- return (
-
- );
-
- case EntityType.DASHBOARD_DATA_MODEL:
- return (
-
- );
-
- case EntityType.GLOSSARY_TERM:
- return ;
-
- case EntityType.TAG:
- return ;
-
- case EntityType.DATA_PRODUCT:
- return ;
- case EntityType.SEARCH_INDEX:
- return (
-
- );
-
- case EntityType.DATABASE:
- return (
-
- );
-
- case EntityType.DATABASE_SCHEMA:
- return (
-
- );
-
- case EntityType.DATABASE_SERVICE:
- return (
-
- );
- case EntityType.MESSAGING_SERVICE:
- return (
-
- );
- case EntityType.DASHBOARD_SERVICE:
- return (
-
- );
- case EntityType.PIPELINE_SERVICE:
- return (
-
- );
-
- case EntityType.MLMODEL_SERVICE:
- return (
-
- );
-
- case EntityType.STORAGE_SERVICE:
- return (
-
- );
-
- case EntityType.SEARCH_SERVICE:
- return (
-
- );
- case EntityType.API_SERVICE:
- return (
-
- );
- case EntityType.API_ENDPOINT:
- return (
-
- );
- case EntityType.API_COLLECTION:
- return (
-
- );
-
- case EntityType.METRIC:
- return (
-
- );
-
- default:
- return searchClassBase.getEntitySummaryComponent(entity);
- }
+ return (
+
+ );
}, [tab, entityDetails, viewPermission, isPermissionLoading]);
const entityLink = useMemo(
@@ -340,14 +114,15 @@ export default function EntitySummaryPanel({
);
return (
-
+ }
title={
viewPermission && (
)
- }
- width="100%">
+ }>
{summaryComponent}
-
+
);
}
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/GlossaryTermSummary/GlossaryTermSummary.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/GlossaryTermSummary/GlossaryTermSummary.component.tsx
index 8c3d11da14cc..266a86b72a7b 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/GlossaryTermSummary/GlossaryTermSummary.component.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/GlossaryTermSummary/GlossaryTermSummary.component.tsx
@@ -11,7 +11,7 @@
* limitations under the License.
*/
-import { Col, Divider, Row, Space, Typography } from 'antd';
+import { Col, Row, Space, Typography } from 'antd';
import { isEmpty } from 'lodash';
import React, { useCallback, useEffect, useMemo, useState } from 'react';
import { useTranslation } from 'react-i18next';
@@ -81,8 +81,11 @@ function GlossaryTermSummary({
return (
- <>
-
+
+
-
-
-
+
-
-
-
+
- >
+
);
}
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/MetricSummary/MetricSummary.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/MetricSummary/MetricSummary.tsx
deleted file mode 100644
index ee307c1071c1..000000000000
--- a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/MetricSummary/MetricSummary.tsx
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * 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.
- */
-
-import { Col, Divider, Row } from 'antd';
-import { get, isEmpty } from 'lodash';
-import React, { useCallback, useEffect, useMemo, useState } from 'react';
-import { TabSpecificField } from '../../../../enums/entity.enum';
-import { ExplorePageTabs } from '../../../../enums/Explore.enum';
-import { Metric } from '../../../../generated/entity/data/metric';
-import { getMetricByFqn } from '../../../../rest/metricsAPI';
-import { getSortedTagsWithHighlight } from '../../../../utils/EntitySummaryPanelUtils';
-import {
- DRAWER_NAVIGATION_OPTIONS,
- getEntityOverview,
-} from '../../../../utils/EntityUtils';
-import { OwnerLabel } from '../../../common/OwnerLabel/OwnerLabel.component';
-import SummaryPanelSkeleton from '../../../common/Skeleton/SummaryPanelSkeleton/SummaryPanelSkeleton.component';
-import SummaryTagsDescription from '../../../common/SummaryTagsDescription/SummaryTagsDescription.component';
-import MetricExpression from '../../../Metric/MetricExpression/MetricExpression';
-import RelatedMetrics from '../../../Metric/RelatedMetrics/RelatedMetrics';
-import { SearchedDataProps } from '../../../SearchedData/SearchedData.interface';
-import CommonEntitySummaryInfo from '../CommonEntitySummaryInfo/CommonEntitySummaryInfo';
-
-interface MetricSummaryProps {
- entityDetails: Metric;
- componentType?: DRAWER_NAVIGATION_OPTIONS;
- isLoading?: boolean;
- highlights?: SearchedDataProps['data'][number]['highlight'];
-}
-
-const MetricSummary = ({
- entityDetails,
- componentType = DRAWER_NAVIGATION_OPTIONS.explore,
- isLoading,
- highlights,
-}: MetricSummaryProps) => {
- const entityInfo = useMemo(
- () => getEntityOverview(ExplorePageTabs.METRIC, entityDetails),
- [entityDetails]
- );
-
- const [metricDetails, setMetricDetails] = useState(entityDetails);
-
- const ownerDetails = useMemo(() => {
- const owners = entityDetails.owners;
-
- return {
- value: ,
- };
- }, [entityDetails, metricDetails]);
-
- const fetchMetricDetails = useCallback(async () => {
- if (isEmpty(entityDetails.fullyQualifiedName)) {
- return;
- }
-
- try {
- const res = await getMetricByFqn(entityDetails.fullyQualifiedName ?? '', {
- fields: [TabSpecificField.TAGS, TabSpecificField.OWNERS],
- });
-
- setMetricDetails({ ...res });
- } catch (error) {
- // Error
- }
- }, [entityDetails, componentType]);
-
- useEffect(() => {
- fetchMetricDetails();
- }, [entityDetails, componentType]);
-
- return (
-
- <>
-
-
- {ownerDetails.value}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- >
-
- );
-};
-
-export default MetricSummary;
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/MlModelSummary/MlModelSummary.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/MlModelSummary/MlModelSummary.component.tsx
deleted file mode 100644
index 515c6e084b86..000000000000
--- a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/MlModelSummary/MlModelSummary.component.tsx
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * 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.
- */
-
-import { Col, Divider, Row, Typography } from 'antd';
-import { get } from 'lodash';
-import React, { useMemo } from 'react';
-import { useTranslation } from 'react-i18next';
-import { SummaryEntityType } from '../../../../enums/EntitySummary.enum';
-import { ExplorePageTabs } from '../../../../enums/Explore.enum';
-import { Mlmodel, TagLabel } from '../../../../generated/entity/data/mlmodel';
-import {
- getFormattedEntityData,
- getSortedTagsWithHighlight,
-} from '../../../../utils/EntitySummaryPanelUtils';
-import {
- DRAWER_NAVIGATION_OPTIONS,
- getEntityOverview,
-} from '../../../../utils/EntityUtils';
-import SummaryPanelSkeleton from '../../../common/Skeleton/SummaryPanelSkeleton/SummaryPanelSkeleton.component';
-import SummaryTagsDescription from '../../../common/SummaryTagsDescription/SummaryTagsDescription.component';
-import { SearchedDataProps } from '../../../SearchedData/SearchedData.interface';
-import CommonEntitySummaryInfo from '../CommonEntitySummaryInfo/CommonEntitySummaryInfo';
-import SummaryList from '../SummaryList/SummaryList.component';
-import { BasicEntityInfo } from '../SummaryList/SummaryList.interface';
-
-interface MlModelSummaryProps {
- entityDetails: Mlmodel;
- componentType?: DRAWER_NAVIGATION_OPTIONS;
- tags?: TagLabel[];
- isLoading?: boolean;
- highlights?: SearchedDataProps['data'][number]['highlight'];
-}
-
-function MlModelSummary({
- entityDetails,
- componentType = DRAWER_NAVIGATION_OPTIONS.explore,
- tags,
- isLoading,
- highlights,
-}: MlModelSummaryProps) {
- const { t } = useTranslation();
-
- const entityInfo = useMemo(
- () => getEntityOverview(ExplorePageTabs.MLMODELS, entityDetails),
- [entityDetails]
- );
-
- const formattedFeaturesData: BasicEntityInfo[] = useMemo(
- () =>
- getFormattedEntityData(
- SummaryEntityType.MLFEATURE,
- entityDetails.mlFeatures,
- highlights
- ),
- [entityDetails]
- );
-
- return (
-
- <>
-
-
-
-
-
-
-
-
-
-
-
-
-
- {t('label.feature-plural')}
-
-
-
-
-
-
- >
-
- );
-}
-
-export default MlModelSummary;
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/MlModelSummary/MlModelSummary.test.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/MlModelSummary/MlModelSummary.test.tsx
deleted file mode 100644
index 198cc54195ed..000000000000
--- a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/MlModelSummary/MlModelSummary.test.tsx
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * 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, screen } from '@testing-library/react';
-import React from 'react';
-import { MemoryRouter } from 'react-router-dom';
-import {
- mockMlModelEntityDetails,
- mockMlModelEntityDetails1,
-} from '../mocks/MlModelSummary.mock';
-import MlModelSummary from './MlModelSummary.component';
-
-jest.mock('../SummaryList/SummaryList.component', () =>
- jest
- .fn()
- .mockImplementation(() => SummaryList
)
-);
-
-describe('MlModelSummary component tests', () => {
- it('Component should render properly', () => {
- render(, {
- wrapper: MemoryRouter,
- });
-
- const algorithmLabel = screen.getByTestId('label.algorithm-label');
- const targetLabel = screen.getByTestId('label.target-label');
- const serverLabel = screen.getByTestId('label.server-label');
- const dashboardLabel = screen.getByTestId('label.dashboard-label');
- const algorithmValue = screen.getByTestId('label.algorithm-value');
- const targetValue = screen.getByTestId('label.target-value');
- const serverValue = screen.getByTestId('label.server-value');
- const dashboardValue = screen.getByTestId('label.dashboard-value');
-
- expect(algorithmLabel).toBeInTheDocument();
- expect(targetLabel).toBeInTheDocument();
- expect(serverLabel).toBeInTheDocument();
- expect(dashboardLabel).toBeInTheDocument();
- expect(algorithmValue).toContainHTML('Neural Network');
- expect(targetValue).toContainHTML('ETA_time');
- expect(serverValue).toContainHTML('http://my-server.ai');
- expect(dashboardValue).toBeInTheDocument();
- });
-
- it('Fields with no data should display "-" in value', () => {
- render(, {
- wrapper: MemoryRouter,
- });
-
- const algorithmLabel = screen.getByTestId('label.algorithm-label');
- const targetLabel = screen.queryByTestId('label.target-label');
- const serverLabel = screen.queryByTestId('label.server-label');
- const dashboardLabel = screen.queryByTestId('label.dashboard-label');
- const algorithmValue = screen.getByTestId('label.algorithm-value');
- const targetValue = screen.getByTestId('label.target-value');
- const serverValue = screen.getByTestId('label.server-value');
- const dashboardValue = screen.getByTestId('label.dashboard-value');
-
- expect(algorithmLabel).toBeInTheDocument();
- expect(targetLabel).toBeInTheDocument();
- expect(serverLabel).toBeInTheDocument();
- expect(dashboardLabel).toBeInTheDocument();
- expect(algorithmValue).toContainHTML('Time Series');
- expect(targetValue).toContainHTML('-');
- expect(serverValue).toContainHTML('-');
- expect(dashboardValue).toContainHTML('-');
- });
-});
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/PipelineSummary/PipelineSummary.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/PipelineSummary/PipelineSummary.component.tsx
deleted file mode 100644
index 225ec3beb251..000000000000
--- a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/PipelineSummary/PipelineSummary.component.tsx
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * 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.
- */
-
-import { Col, Divider, Row, Typography } from 'antd';
-import { get } from 'lodash';
-import React, { useMemo } from 'react';
-import { useTranslation } from 'react-i18next';
-import { SummaryEntityType } from '../../../../enums/EntitySummary.enum';
-import { ExplorePageTabs } from '../../../../enums/Explore.enum';
-import { Pipeline, TagLabel } from '../../../../generated/entity/data/pipeline';
-import {
- getFormattedEntityData,
- getSortedTagsWithHighlight,
-} from '../../../../utils/EntitySummaryPanelUtils';
-import {
- DRAWER_NAVIGATION_OPTIONS,
- getEntityOverview,
-} from '../../../../utils/EntityUtils';
-import SummaryPanelSkeleton from '../../../common/Skeleton/SummaryPanelSkeleton/SummaryPanelSkeleton.component';
-import SummaryTagsDescription from '../../../common/SummaryTagsDescription/SummaryTagsDescription.component';
-import { SearchedDataProps } from '../../../SearchedData/SearchedData.interface';
-import CommonEntitySummaryInfo from '../CommonEntitySummaryInfo/CommonEntitySummaryInfo';
-import SummaryList from '../SummaryList/SummaryList.component';
-import { BasicEntityInfo } from '../SummaryList/SummaryList.interface';
-
-interface PipelineSummaryProps {
- entityDetails: Pipeline;
- componentType?: DRAWER_NAVIGATION_OPTIONS;
- tags?: TagLabel[];
- isLoading?: boolean;
- highlights?: SearchedDataProps['data'][number]['highlight'];
-}
-
-function PipelineSummary({
- entityDetails,
- componentType = DRAWER_NAVIGATION_OPTIONS.explore,
- tags,
- isLoading,
- highlights,
-}: PipelineSummaryProps) {
- const { t } = useTranslation();
-
- const formattedTasksData: BasicEntityInfo[] = useMemo(
- () =>
- getFormattedEntityData(
- SummaryEntityType.TASK,
- entityDetails.tasks,
- highlights
- ),
- [entityDetails]
- );
-
- const entityInfo = useMemo(
- () => getEntityOverview(ExplorePageTabs.PIPELINES, entityDetails),
- [entityDetails]
- );
-
- return (
-
- <>
-
-
-
-
-
-
-
-
-
-
-
-
-
- {t('label.task-plural')}
-
-
-
-
-
-
- >
-
- );
-}
-
-export default PipelineSummary;
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/PipelineSummary/PipelineSummary.test.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/PipelineSummary/PipelineSummary.test.tsx
deleted file mode 100644
index c74d68abdf38..000000000000
--- a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/PipelineSummary/PipelineSummary.test.tsx
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * 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, screen } from '@testing-library/react';
-import React from 'react';
-import { MemoryRouter } from 'react-router-dom';
-import { DRAWER_NAVIGATION_OPTIONS } from '../../../../utils/EntityUtils';
-import { mockPipelineEntityDetails } from '../mocks/PipelineSummary.mock';
-import PipelineSummary from './PipelineSummary.component';
-
-jest.mock('../SummaryList/SummaryList.component', () =>
- jest
- .fn()
- .mockImplementation(() => SummaryList
)
-);
-
-jest.mock('../CommonEntitySummaryInfo/CommonEntitySummaryInfo', () =>
- jest.fn().mockImplementation(() => testCommonEntitySummaryInfo
)
-);
-
-describe('PipelineSummary component tests', () => {
- it('Component should render properly, when loaded in the Explore page.', () => {
- render(, {
- wrapper: MemoryRouter,
- });
-
- const commonEntitySummaryInfo = screen.getByText(
- 'testCommonEntitySummaryInfo'
- );
- const tasksHeader = screen.getByTestId('tasks-header');
- const summaryList = screen.getByTestId('SummaryList');
-
- expect(commonEntitySummaryInfo).toBeInTheDocument();
- expect(tasksHeader).toBeInTheDocument();
- expect(summaryList).toBeInTheDocument();
- });
-
- it('Component should render properly, when loaded in the Lineage page.', async () => {
- render(
- ,
- {
- wrapper: MemoryRouter,
- }
- );
-
- const descriptionHeader = screen.getAllByTestId('description-header');
- const tags = screen.getByText('label.tag-plural');
- const noTags = screen.getByText('label.no-tags-added');
- const commonEntitySummaryInfo = screen.getByText(
- 'testCommonEntitySummaryInfo'
- );
-
- const viewerContainer = screen.getByTestId('viewer-container');
- const summaryList = screen.getByTestId('SummaryList');
- const ownerLabel = screen.queryByTestId('label.owner-label');
-
- expect(ownerLabel).not.toBeInTheDocument();
-
- expect(descriptionHeader[0]).toBeInTheDocument();
- expect(tags).toBeInTheDocument();
- expect(commonEntitySummaryInfo).toBeInTheDocument();
- expect(noTags).toBeInTheDocument();
-
- expect(summaryList).toBeInTheDocument();
- expect(viewerContainer).toBeInTheDocument();
- });
-});
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/SearchIndexSummary/SearchIndexSummary.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/SearchIndexSummary/SearchIndexSummary.component.tsx
deleted file mode 100644
index dc69bb0b388f..000000000000
--- a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/SearchIndexSummary/SearchIndexSummary.component.tsx
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * 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 { Col, Divider, Row, Typography } from 'antd';
-import { get, isEmpty } from 'lodash';
-import { default as React, useEffect, useMemo, useState } from 'react';
-import { useTranslation } from 'react-i18next';
-import { SummaryEntityType } from '../../../../enums/EntitySummary.enum';
-import { ExplorePageTabs } from '../../../../enums/Explore.enum';
-import { SearchIndex } from '../../../../generated/entity/data/searchIndex';
-import {
- getFormattedEntityData,
- getSortedTagsWithHighlight,
-} from '../../../../utils/EntitySummaryPanelUtils';
-import {
- DRAWER_NAVIGATION_OPTIONS,
- getEntityOverview,
-} from '../../../../utils/EntityUtils';
-import SummaryPanelSkeleton from '../../../common/Skeleton/SummaryPanelSkeleton/SummaryPanelSkeleton.component';
-import SummaryTagsDescription from '../../../common/SummaryTagsDescription/SummaryTagsDescription.component';
-import CommonEntitySummaryInfo from '../CommonEntitySummaryInfo/CommonEntitySummaryInfo';
-import SummaryList from '../SummaryList/SummaryList.component';
-import { BasicEntityInfo } from '../SummaryList/SummaryList.interface';
-import { SearchIndexSummaryProps } from './SearchIndexSummary.interface';
-
-function SearchIndexSummary({
- entityDetails,
- componentType = DRAWER_NAVIGATION_OPTIONS.explore,
- tags,
- isLoading,
- highlights,
-}: SearchIndexSummaryProps) {
- const { t } = useTranslation();
- const [searchIndexDetails, setSearchIndexDetails] =
- useState(entityDetails);
-
- const isExplore = useMemo(
- () => componentType === DRAWER_NAVIGATION_OPTIONS.explore,
- [componentType]
- );
-
- const { fields } = searchIndexDetails;
-
- const formattedFieldsData: BasicEntityInfo[] = useMemo(
- () => getFormattedEntityData(SummaryEntityType.FIELD, fields, highlights),
- [fields, searchIndexDetails]
- );
-
- const entityInfo = useMemo(
- () => getEntityOverview(ExplorePageTabs.SEARCH_INDEX, searchIndexDetails),
- [searchIndexDetails]
- );
-
- useEffect(() => {
- if (!isEmpty(entityDetails)) {
- setSearchIndexDetails(entityDetails);
- }
- }, [entityDetails]);
-
- return (
-
- <>
- {!isExplore ? (
- <>
-
-
-
-
-
-
-
-
-
-
- >
- ) : null}
-
- {isExplore ? (
- <>
-
-
- >
- ) : null}
-
-
-
- {t('label.field-plural')}
-
-
-
-
-
-
- >
-
- );
-}
-
-export default SearchIndexSummary;
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/SearchIndexSummary/SearchIndexSummary.interface.ts b/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/SearchIndexSummary/SearchIndexSummary.interface.ts
deleted file mode 100644
index a3d6879e9984..000000000000
--- a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/SearchIndexSummary/SearchIndexSummary.interface.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * 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.
- */
-
-import {
- SearchIndex,
- TagLabel,
-} from '../../../../generated/entity/data/searchIndex';
-import { DRAWER_NAVIGATION_OPTIONS } from '../../../../utils/EntityUtils';
-import { SearchedDataProps } from '../../../SearchedData/SearchedData.interface';
-
-export interface SearchIndexSummaryProps {
- entityDetails: SearchIndex;
- componentType?: DRAWER_NAVIGATION_OPTIONS;
- tags?: TagLabel[];
- isLoading?: boolean;
- highlights?: SearchedDataProps['data'][number]['highlight'];
-}
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/SearchIndexSummary/SearchIndexSummary.test.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/SearchIndexSummary/SearchIndexSummary.test.tsx
deleted file mode 100644
index 676474058dba..000000000000
--- a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/SearchIndexSummary/SearchIndexSummary.test.tsx
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * 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 { act, render, screen } from '@testing-library/react';
-import React from 'react';
-import { MemoryRouter } from 'react-router-dom';
-import {
- LabelType,
- State,
- TagSource,
-} from '../../../../generated/type/tagLabel';
-import { DRAWER_NAVIGATION_OPTIONS } from '../../../../utils/EntityUtils';
-import { mockSearchIndexEntityDetails } from '../mocks/SearchIndexSummary.mock';
-import SearchIndexSummary from './SearchIndexSummary.component';
-
-jest.mock('../SummaryList/SummaryList.component', () =>
- jest
- .fn()
- .mockImplementation(() => SummaryList
)
-);
-
-describe('SearchIndexSummary component tests', () => {
- it('Component should render properly, when loaded in the Explore page.', async () => {
- await act(async () => {
- render(
- ,
- {
- wrapper: MemoryRouter,
- }
- );
- });
-
- const fieldsHeader = screen.getByTestId('fields-header');
- const tagsHeader = screen.getByTestId('tags-header');
- const summaryList = screen.getByTestId('SummaryList');
- const tag1 = screen.getByText('PersonalData.Personal');
- const tag2 = screen.getByText('PII.Sensitive');
-
- expect(fieldsHeader).toBeInTheDocument();
- expect(tagsHeader).toBeInTheDocument();
- expect(summaryList).toBeInTheDocument();
- expect(tag1).toBeInTheDocument();
- expect(tag2).toBeInTheDocument();
- });
-
- it('Component should render properly, when loaded in the Lineage page.', async () => {
- await act(async () => {
- render(
- ,
- {
- wrapper: MemoryRouter,
- }
- );
- });
-
- const descriptionHeader = screen.getByTestId('description-header');
- const fieldsHeader = screen.getByTestId('fields-header');
- const ownerLabel = screen.queryByTestId('label.owner-label');
- const tierLabel = screen.getByText('label.tier');
- const serviceLabel = screen.getByText('label.service');
- const tierValue = screen.getByTestId('label.tier-value');
- const serviceValue = screen.getByText('testES');
- const summaryList = screen.getByTestId('SummaryList');
-
- expect(ownerLabel).not.toBeInTheDocument();
- expect(descriptionHeader).toBeInTheDocument();
- expect(fieldsHeader).toBeInTheDocument();
- expect(tierLabel).toBeInTheDocument();
- expect(serviceLabel).toBeInTheDocument();
- expect(tierValue).toContainHTML('-');
- expect(serviceValue).toBeInTheDocument();
- expect(summaryList).toBeInTheDocument();
- });
-
- it('No data placeholder should be displayed in case of no tags', async () => {
- await act(async () => {
- render(
-
- );
- });
-
- const tagsHeader = screen.getByTestId('tags-header');
- const noTagsPlaceholder = screen.getByText('label.no-tags-added');
-
- expect(tagsHeader).toBeInTheDocument();
- expect(noTagsPlaceholder).toBeInTheDocument();
- });
-
- it('Tier should be displayed in tags section on explore page', async () => {
- await act(async () => {
- render(
- ,
- {
- wrapper: MemoryRouter,
- }
- );
- });
-
- const tagsHeader = screen.getByTestId('tags-header');
- const tier = screen.getByText('Tier1');
- const noTagsPlaceholder = screen.queryByText('label.no-tags-added');
-
- expect(tagsHeader).toBeInTheDocument();
- expect(tier).toBeInTheDocument();
- expect(noTagsPlaceholder).toBeNull();
- });
-
- it('Tier should not be displayed in tags section on Lineage page', async () => {
- await act(async () => {
- render(
- ,
- {
- wrapper: MemoryRouter,
- }
- );
- });
-
- const tagsHeader = screen.getByText('label.tag-plural');
- const tierLabel = screen.getByText('label.tier');
- const tierValue = screen.getByText('Tier1');
- const noTagsPlaceholder = screen.getByText('label.no-tags-added');
-
- expect(tagsHeader).toBeInTheDocument();
- expect(tierLabel).toBeInTheDocument();
- expect(tierValue).toBeInTheDocument();
- expect(noTagsPlaceholder).toBeInTheDocument();
- });
-});
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/ServiceSummary/ServiceSummary.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/ServiceSummary/ServiceSummary.component.tsx
deleted file mode 100644
index 3e2b50553e2a..000000000000
--- a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/ServiceSummary/ServiceSummary.component.tsx
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * 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 { Col, Divider, Row } from 'antd';
-import { get } from 'lodash';
-import React, { useMemo } from 'react';
-import SummaryTagsDescription from '../../../../components/common/SummaryTagsDescription/SummaryTagsDescription.component';
-import { getSortedTagsWithHighlight } from '../../../../utils/EntitySummaryPanelUtils';
-import {
- DRAWER_NAVIGATION_OPTIONS,
- getEntityOverview,
-} from '../../../../utils/EntityUtils';
-import SummaryPanelSkeleton from '../../../common/Skeleton/SummaryPanelSkeleton/SummaryPanelSkeleton.component';
-import CommonEntitySummaryInfo from '../CommonEntitySummaryInfo/CommonEntitySummaryInfo';
-import { ServiceSummaryProps } from './ServiceSummary.interface';
-
-const ServiceSummary = ({
- type,
- entityDetails,
- componentType = DRAWER_NAVIGATION_OPTIONS.explore,
- tags,
- isLoading,
- highlights,
-}: ServiceSummaryProps) => {
- const entityInfo = useMemo(
- () => getEntityOverview(type, entityDetails),
- [entityDetails]
- );
-
- return (
-
- <>
-
-
-
-
-
-
-
-
-
- >
-
- );
-};
-
-export default ServiceSummary;
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/ServiceSummary/ServiceSummary.interface.ts b/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/ServiceSummary/ServiceSummary.interface.ts
deleted file mode 100644
index 29172499782f..000000000000
--- a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/ServiceSummary/ServiceSummary.interface.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * 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 { ExplorePageTabs } from '../../../../enums/Explore.enum';
-import { TagLabel } from '../../../../generated/type/tagLabel';
-import { DRAWER_NAVIGATION_OPTIONS } from '../../../../utils/EntityUtils';
-import { SearchedDataProps } from '../../../SearchedData/SearchedData.interface';
-import { EntityServiceUnion } from '../../ExplorePage.interface';
-
-export interface ServiceSummaryProps {
- type: ExplorePageTabs;
- entityDetails: EntityServiceUnion;
- componentType?: DRAWER_NAVIGATION_OPTIONS;
- tags?: TagLabel[];
- isLoading?: boolean;
- highlights?: SearchedDataProps['data'][number]['highlight'];
-}
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/StoredProcedureSummary/StoredProcedureSummary.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/StoredProcedureSummary/StoredProcedureSummary.component.tsx
deleted file mode 100644
index f120d3a7583e..000000000000
--- a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/StoredProcedureSummary/StoredProcedureSummary.component.tsx
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * 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 { Col, Divider, Row, Typography } from 'antd';
-import { get, isObject } from 'lodash';
-import React, { useMemo } from 'react';
-import { useTranslation } from 'react-i18next';
-import { CSMode } from '../../../../enums/codemirror.enum';
-import { ExplorePageTabs } from '../../../../enums/Explore.enum';
-import { StoredProcedureCodeObject } from '../../../../generated/entity/data/storedProcedure';
-import { getSortedTagsWithHighlight } from '../../../../utils/EntitySummaryPanelUtils';
-import {
- DRAWER_NAVIGATION_OPTIONS,
- getEntityOverview,
-} from '../../../../utils/EntityUtils';
-import SummaryPanelSkeleton from '../../../common/Skeleton/SummaryPanelSkeleton/SummaryPanelSkeleton.component';
-import SummaryTagsDescription from '../../../common/SummaryTagsDescription/SummaryTagsDescription.component';
-import SchemaEditor from '../../../Database/SchemaEditor/SchemaEditor';
-import CommonEntitySummaryInfo from '../CommonEntitySummaryInfo/CommonEntitySummaryInfo';
-import { StoredProcedureSummaryProps } from './StoredProcedureSummary.interface';
-
-const StoredProcedureSummary = ({
- entityDetails,
- componentType = DRAWER_NAVIGATION_OPTIONS.explore,
- tags,
- isLoading,
- highlights,
-}: StoredProcedureSummaryProps) => {
- const { t } = useTranslation();
-
- const entityInfo = useMemo(
- () => getEntityOverview(ExplorePageTabs.STORED_PROCEDURE, entityDetails),
- [entityDetails]
- );
-
- return (
-
- <>
-
-
-
-
-
-
-
-
-
-
-
- {isObject(entityDetails.storedProcedureCode) && (
-
-
-
- {t('label.code')}
-
-
-
-
-
-
- )}
- >
-
- );
-};
-
-export default StoredProcedureSummary;
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/StoredProcedureSummary/StoredProcedureSummary.interface.ts b/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/StoredProcedureSummary/StoredProcedureSummary.interface.ts
deleted file mode 100644
index 966625bcfe58..000000000000
--- a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/StoredProcedureSummary/StoredProcedureSummary.interface.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * 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 { StoredProcedure } from '../../../../generated/entity/data/storedProcedure';
-import { TagLabel } from '../../../../generated/type/tagLabel';
-import { DRAWER_NAVIGATION_OPTIONS } from '../../../../utils/EntityUtils';
-import { SearchedDataProps } from '../../../SearchedData/SearchedData.interface';
-
-export interface StoredProcedureSummaryProps {
- entityDetails: StoredProcedure;
- componentType?: DRAWER_NAVIGATION_OPTIONS;
- tags?: TagLabel[];
- isLoading?: boolean;
- highlights?: SearchedDataProps['data'][number]['highlight'];
-}
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/SummaryList/SummaryListItems/SummaryListItems.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/SummaryList/SummaryListItems/SummaryListItems.component.tsx
index 88fb1b75e24a..8a4810d2a17c 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/SummaryList/SummaryListItems/SummaryListItems.component.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/SummaryList/SummaryListItems/SummaryListItems.component.tsx
@@ -17,6 +17,7 @@ import { useTranslation } from 'react-i18next';
import { MAX_CHAR_LIMIT_ENTITY_SUMMARY } from '../../../../../constants/constants';
import { getTagValue } from '../../../../../utils/CommonUtils';
import { prepareConstraintIcon } from '../../../../../utils/TableUtils';
+import AppBadge from '../../../../common/Badge/Badge.component';
import RichTextEditorPreviewerV1 from '../../../../common/RichTextEditor/RichTextEditorPreviewerV1';
import TagsViewer from '../../../../Tag/TagsViewer/TagsViewer';
import { SummaryListItemProps } from './SummaryListItems.interface';
@@ -48,9 +49,13 @@ function SummaryListItem({
{entityDetails.title}
{entityDetails.type && (
- {`(${entityDetails.type})`}
+
)}
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/SummaryList/summary-list.less b/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/SummaryList/summary-list.less
index 357f19be5578..193ec5257ae6 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/SummaryList/summary-list.less
+++ b/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/SummaryList/summary-list.less
@@ -15,7 +15,7 @@
.summary-list-collapse {
&.ant-collapse {
- background-color: @grey-1;
+ background-color: @white;
margin-bottom: 16px;
padding: 16px;
.ant-collapse-item {
@@ -38,7 +38,7 @@
}
.summary-list-item-container {
- background-color: @grey-1;
+ background-color: @white;
margin-bottom: 16px;
padding: 16px;
border-radius: 5px;
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/TableSummary/TableSummary.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/TableSummary/TableSummary.component.tsx
index ac44fa6d5a7d..131c459f1902 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/TableSummary/TableSummary.component.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/TableSummary/TableSummary.component.tsx
@@ -11,8 +11,8 @@
* limitations under the License.
*/
-import { Col, Divider, Row, Typography } from 'antd';
-import { get, isEmpty, isUndefined } from 'lodash';
+import { Col, Row, Typography } from 'antd';
+import { isUndefined } from 'lodash';
import {
default as React,
useCallback,
@@ -23,58 +23,31 @@ import {
import { useTranslation } from 'react-i18next';
import { ROUTES } from '../../../../constants/constants';
import { mockTablePermission } from '../../../../constants/mockTourData.constants';
-import { PROFILER_FILTER_RANGE } from '../../../../constants/profiler.constant';
import { usePermissionProvider } from '../../../../context/PermissionProvider/PermissionProvider';
import {
OperationPermission,
ResourceEntity,
} from '../../../../context/PermissionProvider/PermissionProvider.interface';
-import { SummaryEntityType } from '../../../../enums/EntitySummary.enum';
-import { ExplorePageTabs } from '../../../../enums/Explore.enum';
import { Table } from '../../../../generated/entity/data/table';
import { TestSummary } from '../../../../generated/tests/testCase';
import useCustomLocation from '../../../../hooks/useCustomLocation/useCustomLocation';
-import { getListTestCaseIncidentStatus } from '../../../../rest/incidentManagerAPI';
import { getLatestTableProfileByFqn } from '../../../../rest/tableAPI';
import { getTestCaseExecutionSummary } from '../../../../rest/testAPI';
-import {
- getCurrentMillis,
- getEpochMillisForPastDays,
-} from '../../../../utils/date-time/DateTimeUtils';
-import {
- getFormattedEntityData,
- getSortedTagsWithHighlight,
-} from '../../../../utils/EntitySummaryPanelUtils';
-import {
- DRAWER_NAVIGATION_OPTIONS,
- getEntityOverview,
-} from '../../../../utils/EntityUtils';
import { DEFAULT_ENTITY_PERMISSION } from '../../../../utils/PermissionsUtils';
-import SummaryPanelSkeleton from '../../../common/Skeleton/SummaryPanelSkeleton/SummaryPanelSkeleton.component';
-import SummaryTagsDescription from '../../../common/SummaryTagsDescription/SummaryTagsDescription.component';
-import CommonEntitySummaryInfo from '../CommonEntitySummaryInfo/CommonEntitySummaryInfo';
-import SummaryList from '../SummaryList/SummaryList.component';
-import { BasicEntityInfo } from '../SummaryList/SummaryList.interface';
import './table-summary.less';
import {
TableProfileDetails,
TableSummaryProps,
} from './TableSummary.interface';
-function TableSummary({
- entityDetails,
- componentType = DRAWER_NAVIGATION_OPTIONS.explore,
- tags,
- isLoading,
- highlights,
-}: TableSummaryProps) {
+function TableSummary({ entityDetails }: TableSummaryProps) {
const { t } = useTranslation();
const location = useCustomLocation();
const isTourPage = location.pathname.includes(ROUTES.TOUR);
const { getEntityPermission } = usePermissionProvider();
const [profileData, setProfileData] = useState();
- const [incidentCount, setIncidentCount] = useState(0);
+
const [testSuiteSummary, setTestSuiteSummary] = useState();
const [tablePermissions, setTablePermissions] = useState(
DEFAULT_ENTITY_PERMISSION
@@ -106,26 +79,6 @@ function TableSummary({
}
};
- const fetchIncidentCount = async () => {
- if (tableDetails?.fullyQualifiedName) {
- try {
- const { paging } = await getListTestCaseIncidentStatus({
- limit: 0,
- latest: true,
- originEntityFQN: tableDetails?.fullyQualifiedName,
- startTs: getEpochMillisForPastDays(
- PROFILER_FILTER_RANGE.last30days.days
- ),
- endTs: getCurrentMillis(),
- });
-
- setIncidentCount(paging.total);
- } catch (error) {
- setIncidentCount(0);
- }
- }
- };
-
const fetchProfilerData = useCallback(async () => {
try {
const { profile, tableConstraints } = await getLatestTableProfileByFqn(
@@ -190,25 +143,6 @@ function TableSummary({
);
}, [tableDetails, testSuiteSummary, viewProfilerPermission]);
- const entityInfo = useMemo(
- () =>
- getEntityOverview(ExplorePageTabs.TABLES, tableDetails, {
- incidentCount,
- }),
- [tableDetails, incidentCount]
- );
-
- const formattedColumnsData: BasicEntityInfo[] = useMemo(
- () =>
- getFormattedEntityData(
- SummaryEntityType.COLUMN,
- tableDetails.columns,
- highlights,
- tableDetails.tableConstraints
- ),
- [tableDetails]
- );
-
const init = useCallback(async () => {
if (tableDetails.id && !isTourPage) {
const tablePermission = await getEntityPermission(
@@ -225,7 +159,6 @@ function TableSummary({
if (shouldFetchProfilerData) {
fetchProfilerData();
fetchAllTests();
- fetchIncidentCount();
}
} else {
setTablePermissions(mockTablePermission as OperationPermission);
@@ -244,61 +177,19 @@ function TableSummary({
}, [tableDetails.id]);
return (
-
- <>
-
-
-
-
-
-
-
-
-
-
-
- {t('label.profiler-amp-data-quality')}
-
-
- {profilerSummary}
-
-
-
-
-
-
-
-
-
-
- {t('label.schema')}
-
-
-
-
-
-
- >
-
+
+
+
+ {t('label.profiler-amp-data-quality')}
+
+
+ {profilerSummary}
+
);
}
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/TableSummary/TableSummary.interface.ts b/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/TableSummary/TableSummary.interface.ts
index 207ca159ff9f..bb657152b258 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/TableSummary/TableSummary.interface.ts
+++ b/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/TableSummary/TableSummary.interface.ts
@@ -11,16 +11,10 @@
* limitations under the License.
*/
-import { Table, TagLabel } from '../../../../generated/entity/data/table';
-import { DRAWER_NAVIGATION_OPTIONS } from '../../../../utils/EntityUtils';
-import { SearchedDataProps } from '../../../SearchedData/SearchedData.interface';
+import { Table } from '../../../../generated/entity/data/table';
export interface TableSummaryProps {
entityDetails: Table;
- componentType?: DRAWER_NAVIGATION_OPTIONS;
- tags?: TagLabel[];
- isLoading?: boolean;
- highlights?: SearchedDataProps['data'][number]['highlight'];
}
export interface TableProfileDetails {
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/TagsSummary/TagsSummary.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/TagsSummary/TagsSummary.component.tsx
index bba441d3d673..b9cdb577731c 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/TagsSummary/TagsSummary.component.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/TagsSummary/TagsSummary.component.tsx
@@ -68,7 +68,7 @@ function TagsSummary({ entityDetails, isLoading }: TagsSummaryProps) {
return (
-
+
(entityDetails);
-
- const isExplore = useMemo(
- () => componentType === DRAWER_NAVIGATION_OPTIONS.explore,
- [componentType]
- );
-
- const entityInfo = useMemo(
- () =>
- getEntityOverview(ExplorePageTabs.TOPICS, {
- ...topicDetails,
- ...entityDetails,
- }),
- [topicDetails, entityDetails]
- );
-
- const ownerDetails = useMemo(() => {
- const owners = entityDetails.owners;
-
- return {
- value: ,
- };
- }, [entityDetails, topicDetails]);
-
- const fetchExtraTopicInfo = useCallback(async () => {
- try {
- const res = await getTopicByFqn(entityDetails.fullyQualifiedName ?? '', {
- fields: [TabSpecificField.OWNERS, TabSpecificField.TAGS],
- });
-
- const { partitions, messageSchema } = res;
-
- setTopicDetails({ ...entityDetails, partitions, messageSchema });
- } catch (error) {
- // Error
- }
- }, [entityDetails]);
-
- const formattedSchemaFieldsData: BasicEntityInfo[] = useMemo(
- () =>
- getFormattedEntityData(
- SummaryEntityType.SCHEMAFIELD,
- topicDetails.messageSchema?.schemaFields,
- highlights
- ),
- [topicDetails]
- );
-
- useEffect(() => {
- if (entityDetails.service?.type === 'messagingService') {
- fetchExtraTopicInfo();
- }
- }, [entityDetails, componentType]);
-
- return (
-
- <>
-
- {!isExplore ? (
-
- {ownerDetails.value}
-
- ) : null}
-
-
-
-
-
-
-
-
-
-
-
-
- {t('label.schema')}
-
-
-
- {isEmpty(topicDetails?.messageSchema?.schemaFields) ? (
-
-
- {t('message.no-data-available')}
-
-
- ) : (
-
- )}
-
-
- >
-
- );
-}
-
-export default TopicSummary;
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/TopicSummary/TopicSummary.test.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/TopicSummary/TopicSummary.test.tsx
deleted file mode 100644
index 488db69421d8..000000000000
--- a/openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/TopicSummary/TopicSummary.test.tsx
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * 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 { act, render, screen } from '@testing-library/react';
-import React from 'react';
-import { getTopicByFqn } from '../../../../rest/topicsAPI';
-import {
- mockTopicByFqnResponse,
- mockTopicEntityDetails,
-} from '../mocks/TopicSummary.mock';
-import TopicSummary from './TopicSummary.component';
-
-jest.mock('../SummaryList/SummaryList.component', () =>
- jest
- .fn()
- .mockImplementation(() => SummaryList
)
-);
-
-jest.mock('../../../../rest/topicsAPI', () => ({
- getTopicByFqn: jest
- .fn()
- .mockImplementation(() => Promise.resolve(mockTopicByFqnResponse)),
-}));
-
-jest.mock(
- '../../../../components/common/SummaryTagsDescription/SummaryTagsDescription.component',
- () => jest.fn().mockImplementation(() => SummaryTagDescription
)
-);
-
-jest.mock(
- '../../../common/Skeleton/SummaryPanelSkeleton/SummaryPanelSkeleton.component',
- () => jest.fn().mockImplementation(({ children }) => <>{children}>)
-);
-
-describe('TopicSummary component tests', () => {
- it('Component should render properly', async () => {
- await act(async () => {
- render();
- });
-
- const partitionsLabel = screen.getByTestId('label.partition-plural-label');
- const replicationFactorLabel = screen.getByTestId(
- 'label.replication-factor-label'
- );
- const retentionSizeLabel = screen.getByTestId('label.retention-size-label');
- const cleanUpPoliciesLabel = screen.getByTestId(
- 'label.clean-up-policy-plural-label'
- );
- const maxMessageSizeLabel = screen.getByTestId(
- 'label.max-message-size-label'
- );
-
- const partitionsValue = screen.getByTestId('label.partition-plural-value');
- const replicationFactorValue = screen.getByTestId(
- 'label.replication-factor-value'
- );
- const retentionSizeValue = screen.getByTestId('label.retention-size-value');
- const cleanUpPoliciesValue = screen.getByTestId(
- 'label.clean-up-policy-plural-value'
- );
- const maxMessageSizeValue = screen.getByTestId(
- 'label.max-message-size-value'
- );
- const schemaHeader = screen.getByTestId('schema-header');
- const summaryList = screen.getByTestId('SummaryList');
-
- expect(partitionsLabel).toBeInTheDocument();
- expect(replicationFactorLabel).toBeInTheDocument();
- expect(retentionSizeLabel).toBeInTheDocument();
- expect(cleanUpPoliciesLabel).toBeInTheDocument();
- expect(maxMessageSizeLabel).toBeInTheDocument();
- expect(partitionsValue).toContainHTML('-');
- expect(replicationFactorValue).toContainHTML('4');
- expect(retentionSizeValue).toContainHTML('1018.83 MB');
- expect(cleanUpPoliciesValue).toContainHTML('delete');
- expect(maxMessageSizeValue).toContainHTML('208 Bytes');
- expect(schemaHeader).toBeInTheDocument();
- expect(summaryList).toBeInTheDocument();
- });
-
- it('No data message should be shown in case no schemaFields are available in topic details', async () => {
- (getTopicByFqn as jest.Mock).mockImplementation(() =>
- Promise.resolve({ ...mockTopicEntityDetails, messageSchema: {} })
- );
-
- await act(async () => {
- render();
- });
-
- const summaryList = screen.queryByTestId('SummaryList');
- const noDataMessage = screen.queryByTestId('no-data-message');
-
- expect(summaryList).toBeNull();
- expect(noDataMessage).toBeInTheDocument();
- });
-
- it('In case any topic field is not present, "-" should be displayed in place of value', async () => {
- (getTopicByFqn as jest.Mock).mockImplementationOnce(() =>
- Promise.reject({})
- );
- await act(async () => {
- render();
- });
-
- const partitionsValue = screen.getByTestId('label.partition-plural-value');
-
- expect(partitionsValue).toContainHTML('-');
- });
-});
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Glossary/GlossaryTerms/tabs/AssetsTabs.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Glossary/GlossaryTerms/tabs/AssetsTabs.component.tsx
index 579be93c4fd4..94402ae23bf0 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/Glossary/GlossaryTerms/tabs/AssetsTabs.component.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/components/Glossary/GlossaryTerms/tabs/AssetsTabs.component.tsx
@@ -12,7 +12,7 @@
* limitations under the License.
*/
-import { PlusOutlined } from '@ant-design/icons';
+import Icon, { PlusOutlined } from '@ant-design/icons';
import {
Button,
Checkbox,
@@ -22,6 +22,7 @@ import {
notification,
Row,
Skeleton,
+ Space,
Tooltip,
Typography,
} from 'antd';
@@ -593,7 +594,7 @@ const AssetsTabs = forwardRef(
const assetListing = useMemo(
() =>
data.length ? (
-
+
{data.map(({ _source, _id = '' }) => (
{
return (
-
- {activeEntity && permissions.Create && data.length > 0 && (
+ activeEntity &&
+ permissions.Create &&
+ data.length > 0 && (
+
onSelectAll(e.target.checked)}>
@@ -704,8 +707,8 @@ const AssetsTabs = forwardRef(
field: t('label.all'),
})}
- )}
-
+
+ )
);
}, [
activeFilter,
@@ -723,10 +726,10 @@ const AssetsTabs = forwardRef(
const layout = useMemo(() => {
return (
- <>
+
{assetsHeader}
{assetListing}
- >
+
);
}, [assetsHeader, assetListing, selectedCard]);
@@ -823,24 +826,15 @@ const AssetsTabs = forwardRef(
return (
<>
- {assetCount > 0 && (
-
-
-
-
- }
- />
-
+
+ {assetCount > 0 && (
+ <>
+
-
-
-
-
-
- {quickFilterQuery && (
-
- {t('label.clear-entity', {
- entity: '',
- })}
-
- )}
-
-
-
- )}
-
- {isLoading || isCountLoading ? (
-
-
-
-
+
+ }>
+ {t('label.filter')}
+
+
+
+ {selectedFilter.length > 0 && (
+
+
+
+ {quickFilterQuery && (
+
+ {t('label.clear-entity', {
+ entity: '',
+ })}
+
+ )}
+
+
+ )}
+ >
+ )}
+ {isLoading || isCountLoading ? (
-
+
+
+
+
+
-
- ) : (
- layout
- )}
+ ) : (
+ layout
+ )}
+
- {!(isLoading || isCountLoading) && (
+ {!(isLoading || isCountLoading) && permissions?.EditAll && (
0,
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Glossary/GlossaryTerms/tabs/assets-tabs.less b/openmetadata-ui/src/main/resources/ui/src/components/Glossary/GlossaryTerms/tabs/assets-tabs.less
index 3a68d6e4e089..56cc7de0aa5b 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/Glossary/GlossaryTerms/tabs/assets-tabs.less
+++ b/openmetadata-ui/src/main/resources/ui/src/components/Glossary/GlossaryTerms/tabs/assets-tabs.less
@@ -74,6 +74,17 @@
.assets-tab-container {
.explore-search-card {
+ border-radius: 12px;
+ border-left: 4px solid transparent;
+ opacity: 0.95;
+ background: #f5f5f5;
+ &.highlight-card {
+ border-color: #2081f0;
+ }
+ margin: 0 0 20px;
+ &:last-child {
+ margin-bottom: 0;
+ }
.service-icon {
height: 16px;
}
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Modals/ProfileEditModal/ProfileEditModal.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Modals/ProfileEditModal/ProfileEditModal.tsx
new file mode 100644
index 000000000000..741fb21bd435
--- /dev/null
+++ b/openmetadata-ui/src/main/resources/ui/src/components/Modals/ProfileEditModal/ProfileEditModal.tsx
@@ -0,0 +1,162 @@
+/*
+ * 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.
+ */
+
+import { Button, Input, Modal, Typography } from 'antd';
+import { AxiosError } from 'axios';
+import React, { FunctionComponent, useCallback, useRef, useState } from 'react';
+import { useTranslation } from 'react-i18next';
+// import { showErrorToast } from '../../../utils/ToastUtils';
+// import RichTextEditor from '../../common/RichTextEditor/RichTextEditor';
+import { isEmpty } from 'lodash';
+import { User } from '../../../generated/entity/teams/user';
+import { getBackendFormat, HTMLToMarkdown } from '../../../utils/FeedUtils';
+import { showErrorToast } from '../../../utils/ToastUtils';
+import { EditorContentRef } from '../ModalWithMarkdownEditor/ModalWithMarkdownEditor.interface';
+import './profile-edit-modal.less';
+// import {
+// EditorContentRef,
+// ModalWithMarkdownEditorProps,
+// } from './ModalWithMarkdownEditor.interface';
+
+interface ProfileEditModalProps {
+ userData: User;
+ header: string;
+ value: string;
+ placeholder: string;
+ onSave?: (editorValue: any, displayName: any) => void;
+ onCancel?: () => void;
+ visible: boolean;
+ updateUserDetails: (data: Partial
, key: keyof User) => Promise;
+}
+
+export const ProfileEditModal: FunctionComponent = ({
+ userData,
+ header,
+ placeholder,
+ value,
+ onSave,
+ onCancel,
+ visible,
+ updateUserDetails,
+}: ProfileEditModalProps) => {
+ const { t } = useTranslation();
+ const [isLoading, setIsLoading] = useState(false);
+ const [displayName, setDisplayName] = useState(userData.displayName);
+ const markdownRef = useRef({} as EditorContentRef);
+ const [editorValue, setEditorValue] = useState('');
+ const handleDisplayNameSave = useCallback(async () => {
+ if (userData.displayName !== displayName) {
+ // Compare correctly
+ setIsLoading(true);
+ try {
+ await updateUserDetails(
+ { displayName: isEmpty(displayName) ? undefined : displayName },
+ 'displayName'
+ );
+ } catch (error) {
+ showErrorToast(error as AxiosError);
+ } finally {
+ setIsLoading(false);
+ }
+ }
+ }, [displayName, updateUserDetails, userData.displayName]);
+ const handleDescriptionChange = useCallback(
+ async (description: string) => {
+ await updateUserDetails({ description }, 'description');
+ },
+ [updateUserDetails]
+ );
+ const handleSaveData = async () => {
+ setIsLoading(true);
+ try {
+ const content = markdownRef.current?.getEditorContent?.()?.trim() ?? '';
+ await updateUserDetails({ displayName }, 'displayName');
+ onSave?.(editorValue, displayName);
+ } catch (error) {
+ showErrorToast(error as AxiosError);
+ } finally {
+ setIsLoading(false);
+ }
+ };
+
+ const onDisplayNameChange = useCallback(
+ (e: React.ChangeEvent) => setDisplayName(e.target.value),
+ []
+ );
+ const onChangeHandler = (value: string) => {
+ const markdown = HTMLToMarkdown.turndown(value);
+ const backendFormat = getBackendFormat(markdown);
+ setEditorValue(markdown);
+ };
+
+ return (
+
+ {t('label.cancel')}
+ ,
+ ,
+ ]}
+ maskClosable={false}
+ open={visible}
+ title={
+
+ {t('label.edit-profile')}
+
+ }
+ onCancel={onCancel}>
+
+ {t('label.display-name')}
+
+
+ {/*
+ {t('label.description')}
+
+ */}
+
+ );
+};
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Modals/ProfileEditModal/profile-edit-modal.less b/openmetadata-ui/src/main/resources/ui/src/components/Modals/ProfileEditModal/profile-edit-modal.less
new file mode 100644
index 000000000000..eb7fec078b16
--- /dev/null
+++ b/openmetadata-ui/src/main/resources/ui/src/components/Modals/ProfileEditModal/profile-edit-modal.less
@@ -0,0 +1,82 @@
+/*
+ * Copyright 2025 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 (reference) url('../../../styles/variables.less');
+.profile-edit-modal {
+ max-width: 599px;
+ display: flex;
+ max-width: 598.752px;
+ flex-direction: column;
+ align-items: center;
+ gap: 20px;
+ border-radius: 10px;
+ background: @white;
+
+ font-family: Inter, sans-serif;
+ .modal-label {
+ color: #52525b;
+ font-family: Inter, sans-serif;
+ font-size: 14px;
+ font-style: normal;
+ font-weight: 500;
+ line-height: 22px;
+ }
+ .display-name-edit-input {
+ border-radius: 4px;
+ border: 1px solid #dde3ea;
+ padding: 8px;
+ color: 757575;
+ .ant-input {
+ color: #757575;
+ font-family: Inter;
+ font-size: 14px;
+ font-style: normal;
+ font-weight: 400;
+ line-height: normal;
+
+ &::placeholder {
+ color: #757575;
+ }
+ }
+ }
+ .ant-modal-footer {
+ border-top: none;
+ padding-top: 6px;
+ }
+ .modal-header {
+ color: rgba(0, 0, 0, 0.85);
+ font-family: Inter, sans-serif;
+ font-size: 16px;
+ font-style: normal;
+ font-weight: 500;
+ line-height: 24px;
+ }
+ .cancel-name-edit-btn {
+ background-color: @white;
+ color: @primary-color;
+ box-shadow: none;
+ }
+ .editor-container {
+ border-radius: 4px;
+ border: none;
+ }
+}
+.profile-edit-modal .ant-btn.cancel-name-edit-btn:hover {
+ background-color: inherit !important;
+ color: @primary-color !important;
+ box-shadow: none !important;
+}
+.profile-edit-modal .ant-btn.save-updated-name-btn:hover {
+ background-color: @primary-color !important;
+ color: @white !important;
+ box-shadow: none !important;
+}
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/MyData/Persona/PersonaSelectableList/PersonaSelectableList.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/MyData/Persona/PersonaSelectableList/PersonaSelectableList.component.tsx
index 1695b05198ac..858655f04e6a 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/MyData/Persona/PersonaSelectableList/PersonaSelectableList.component.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/components/MyData/Persona/PersonaSelectableList/PersonaSelectableList.component.tsx
@@ -10,15 +10,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-import { Button, Popover, Space, Tooltip, Typography } from 'antd';
+import { Button, Popover, Select, Space, Tooltip, Typography } from 'antd';
+import classNames from 'classnames';
import { t } from 'i18next';
-import React, { useCallback, useState } from 'react';
+import React, { useEffect, useState } from 'react';
import { useTranslation } from 'react-i18next';
-import { ReactComponent as EditIcon } from '../../../../assets/svg/edit-new.svg';
-import {
- DE_ACTIVE_COLOR,
- PAGE_SIZE_LARGE,
-} from '../../../../constants/constants';
+import { ReactComponent as PersonaIcon } from '../../../../assets/svg/persona (2).svg';
+import { ReactComponent as ClosePopoverIcon } from '../../../../assets/svg/popover-close.svg';
+import { ReactComponent as SavePopoverIcon } from '../../../../assets/svg/popover-save.svg';
+import { ReactComponent as EditIcon } from '../../../../assets/svg/user-profile-edit.svg';
+
+import { PAGE_SIZE_LARGE } from '../../../../constants/constants';
import { EntityType } from '../../../../enums/entity.enum';
import { EntityReference } from '../../../../generated/entity/type';
import { getAllPersonas } from '../../../../rest/PersonaAPI';
@@ -26,7 +28,6 @@ import {
getEntityName,
getEntityReferenceListFromEntities,
} from '../../../../utils/EntityUtils';
-import { SelectableList } from '../../../common/SelectableList/SelectableList.component';
import { PersonaSelectableListProps } from './PersonaSelectableList.interface';
export const PersonaListItemRenderer = (props: EntityReference) => {
@@ -42,6 +43,7 @@ export const PersonaListItemRenderer = (props: EntityReference) => {
);
};
+
export const PersonaSelectableList = ({
hasPermission,
selectedPersonas = [],
@@ -50,12 +52,18 @@ export const PersonaSelectableList = ({
popoverProps,
multiSelect = false,
personaList,
+ isDefaultPersona,
}: PersonaSelectableListProps) => {
const [popupVisible, setPopupVisible] = useState(false);
const { t } = useTranslation();
const [allPersona, setAllPersona] = useState(
personaList ?? []
);
+ const [isSelectOpen, setIsSelectOpen] = useState(false);
+ const [isSaving, setIsSaving] = useState(false);
+ const [isDropdownOpen, setIsDropdownOpen] = useState(false);
+ const [currentlySelectedPersonas, setCurrentlySelectedPersonas] =
+ useState([]);
const fetchOptions = async (searchText: string, after?: string) => {
if (searchText) {
@@ -93,66 +101,151 @@ export const PersonaSelectableList = ({
}
}
};
+ const [selectOptions, setSelectOptions] = useState([]);
- const handleUpdate = useCallback(
- async (users: EntityReference[]) => {
- if (multiSelect) {
- await (onUpdate as (users: EntityReference[]) => Promise)(users);
- } else {
- await (onUpdate as (users: EntityReference) => Promise)(users[0]);
- }
+ const loadOptions = async () => {
+ const { data } = await fetchOptions('');
+ setSelectOptions(data);
+ };
- setPopupVisible(false);
- },
- [onUpdate]
- );
+ useEffect(() => {
+ loadOptions();
+ }, []);
+
+ const handlePersonaUpdate = () => {
+ setIsSaving(true);
+
+ Promise.resolve(
+ onUpdate(
+ isDefaultPersona
+ ? currentlySelectedPersonas[0]
+ : currentlySelectedPersonas
+ )
+ ).finally(() => {
+ setIsSaving(false);
+ setPopupVisible(false); // Close popover after saving
+ });
+ };
if (!hasPermission) {
return null;
}
+ const handleDropdownChange = (visible: boolean) => {
+ setIsSelectOpen(visible);
+ };
+ const handleCloseEditTeam = () => {
+ setPopupVisible(false);
+ };
return (
- // Used Button to stop click propagation event anywhere in the form to parent User.component collapsible panel
-
+ }
+ open={popupVisible}
+ overlayClassName="profile-edit-popover-card"
+ placement="bottomLeft"
+ showArrow={false}
+ style={{ borderRadius: '12px' }}
+ trigger="click"
+ onOpenChange={setPopupVisible}
+ {...popoverProps}>
+ {children ?? (
+
+
+
+ )}
+
+ //
);
};
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/MyData/Persona/PersonaSelectableList/PersonaSelectableList.interface.ts b/openmetadata-ui/src/main/resources/ui/src/components/MyData/Persona/PersonaSelectableList/PersonaSelectableList.interface.ts
index 3fb462c17127..9fe6d7e06746 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/MyData/Persona/PersonaSelectableList/PersonaSelectableList.interface.ts
+++ b/openmetadata-ui/src/main/resources/ui/src/components/MyData/Persona/PersonaSelectableList/PersonaSelectableList.interface.ts
@@ -20,6 +20,7 @@ export type PersonaSelectableListProps = {
children?: ReactNode;
popoverProps?: PopoverProps;
personaList?: EntityReference[];
+ isDefaultPersona?: boolean;
} & (
| {
multiSelect?: true;
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/PageLayoutV1/PageLayoutV1.tsx b/openmetadata-ui/src/main/resources/ui/src/components/PageLayoutV1/PageLayoutV1.tsx
index 3d03682e20e7..4fdd4de25b94 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/PageLayoutV1/PageLayoutV1.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/components/PageLayoutV1/PageLayoutV1.tsx
@@ -88,7 +88,7 @@ const PageLayoutV1: FC = ({
)}
{leftPanel && (
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ProfileCard/ProfileSectionUserDetailsCard.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/ProfileCard/ProfileSectionUserDetailsCard.component.tsx
new file mode 100644
index 000000000000..4bb12aef8e29
--- /dev/null
+++ b/openmetadata-ui/src/main/resources/ui/src/components/ProfileCard/ProfileSectionUserDetailsCard.component.tsx
@@ -0,0 +1,333 @@
+/*
+ * Copyright 2025 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 { Button, Popover, Typography } from 'antd';
+import React, { useCallback, useMemo, useState } from 'react';
+import { useTranslation } from 'react-i18next';
+import { ReactComponent as ChangePassword } from '../../assets/svg/change-pw.svg';
+import { ReactComponent as MenuDots } from '../../assets/svg/dot (1).svg';
+import { ReactComponent as EditProfileIcon } from '../../assets/svg/edit-profile.svg';
+import { ReactComponent as DeleteIcon } from '../../assets/svg/trash.svg';
+import { User } from '../../generated/entity/teams/user';
+import { isMaskedEmail } from '../../utils/Users.util';
+import ProfilePicture from '../common/ProfilePicture/ProfilePicture';
+
+import { AxiosError } from 'axios';
+import { isEmpty } from 'lodash';
+import { ICON_DIMENSION_USER_PAGE } from '../../constants/constants';
+import { EntityType } from '../../enums/entity.enum';
+import {
+ ChangePasswordRequest,
+ RequestType,
+} from '../../generated/auth/changePasswordRequest';
+import { AuthProvider } from '../../generated/settings/settings';
+import { useAuth } from '../../hooks/authHooks';
+import { useApplicationStore } from '../../hooks/useApplicationStore';
+import { useFqn } from '../../hooks/useFqn';
+import { changePassword } from '../../rest/auth-API';
+import { showErrorToast, showSuccessToast } from '../../utils/ToastUtils';
+import DeleteWidgetModal from '../common/DeleteWidget/DeleteWidgetModal';
+import { ProfileEditModal } from '../Modals/ProfileEditModal/ProfileEditModal';
+import ChangePasswordForm from '../Settings/Users/ChangePasswordForm';
+import './profile-details.less';
+
+interface ProfileSectionUserDetailsCardProps {
+ userData: User;
+ afterDeleteAction: (isSoftDelete?: boolean, version?: number) => void;
+ updateUserDetails: (data: Partial, key: keyof User) => Promise;
+}
+
+const ProfileSectionUserDetailsCard = ({
+ userData,
+ afterDeleteAction,
+ updateUserDetails,
+}: ProfileSectionUserDetailsCardProps) => {
+ const { t } = useTranslation();
+ const { fqn: username } = useFqn();
+ const { isAdminUser } = useAuth();
+ const { authConfig, currentUser } = useApplicationStore();
+ const [selectedKey, setSelectedKey] = useState(null);
+ const [isLoading, setIsLoading] = useState(false);
+ const [isChangePassword, setIsChangePassword] = useState(false);
+ const [displayName, setDisplayName] = useState(userData.displayName);
+ const [isDisplayNameEdit, setIsDisplayNameEdit] = useState(false);
+ const [isDelete, setIsDelete] = useState(false);
+ const [editProfile, setEditProfile] = useState(false);
+ const [isPopoverVisible, setisPopoverVisible] = useState(false);
+ const isAuthProviderBasic = useMemo(
+ () =>
+ authConfig?.provider === AuthProvider.Basic ||
+ authConfig?.provider === AuthProvider.LDAP,
+ [authConfig]
+ );
+
+ const isLoggedInUser = useMemo(
+ () => username === currentUser?.name,
+ [username, currentUser]
+ );
+
+ const hasEditPermission = useMemo(
+ () => (isAdminUser || isLoggedInUser) && !userData.deleted,
+ [isAdminUser, isLoggedInUser, userData.deleted]
+ );
+
+ const showChangePasswordComponent = useMemo(
+ () => isAuthProviderBasic && hasEditPermission,
+ [isAuthProviderBasic, hasEditPermission]
+ );
+
+ const defaultPersona = useMemo(
+ () =>
+ userData.personas?.find(
+ (persona) => persona.id === userData.defaultPersona?.id
+ ),
+ [userData]
+ );
+
+ const onDisplayNameChange = useCallback(
+ (e: React.ChangeEvent) => setDisplayName(e.target.value),
+ []
+ );
+
+ const handleDisplayNameSave = useCallback(async () => {
+ if (displayName !== userData.displayName) {
+ setIsLoading(true);
+ await updateUserDetails(
+ { displayName: isEmpty(displayName) ? undefined : displayName },
+ 'displayName'
+ );
+ setIsLoading(false);
+ }
+ setIsDisplayNameEdit(false);
+ }, [userData.displayName, displayName, updateUserDetails]);
+
+ const handleCloseEditDisplayName = useCallback(() => {
+ setDisplayName(userData.displayName);
+ setIsDisplayNameEdit(false);
+ }, [userData.displayName]);
+
+ const changePasswordRenderComponent = useMemo(
+ () =>
+ showChangePasswordComponent && (
+ {
+ // Used to stop click propagation event to parent User.component collapsible panel
+ e.stopPropagation();
+ setIsChangePassword(true);
+ }}>
+ {t('label.change-entity', {
+ entity: t('label.password-lowercase'),
+ })}
+
+ ),
+ [showChangePasswordComponent]
+ );
+ const handleChangePassword = async (data: ChangePasswordRequest) => {
+ try {
+ setIsLoading(true);
+
+ const newData = {
+ username: userData.name,
+ requestType: isLoggedInUser ? RequestType.Self : RequestType.User,
+ };
+
+ const sendData = {
+ ...data,
+ ...newData,
+ };
+
+ await changePassword(sendData);
+
+ showSuccessToast(
+ t('server.update-entity-success', { entity: t('label.password') })
+ );
+
+ setIsChangePassword(false);
+ } catch (error) {
+ showErrorToast(error as AxiosError);
+ } finally {
+ setIsLoading(false);
+ }
+ };
+ const userEmailRender = useMemo(
+ () =>
+ !isMaskedEmail(userData.email) && (
+ <>
+
+ {userData.email}
+
+ >
+ ),
+ [userData.email]
+ );
+
+ const manageProfileOptions = (
+
+
{
+ setEditProfile(!editProfile);
+ setisPopoverVisible(!isPopoverVisible);
+ }}>
+
+
+ {t('label.edit-profile')}
+
+
+ {showChangePasswordComponent && (
+
{
+ setIsChangePassword(true);
+ setisPopoverVisible(false);
+ }}>
+
+
+ {t('label.change-entity', {
+ entity: t('label.password-lowercase'),
+ })}
+
+
+ )}
+
{
+ setIsDelete(true);
+ setisPopoverVisible(false);
+ }}>
+
+
+ {t('label.delete-profile')}
+
+
+
+ );
+
+ // const handleDescriptionChange = useCallback(
+ // async (description: string) => {
+ // await updateUserDetails({ description }, 'description');
+
+ // setEditProfile(false);
+ // },
+ // [updateUserDetails, setEditProfile]
+ // );
+ // const handleProfileUpdate = useCallback(
+ // async (displayName: string, description: string) => {
+ // await updateUserDetails({
+ // updatedDisplayName: displayName,
+ // updatedDescription: description,
+ // });
+
+ // setEditProfile(false);
+ // },
+ // [updateUserDetails, setEditProfile]
+ // );
+ const handleModalClose = async () => {
+ setEditProfile(false);
+ };
+
+ return (
+
+
+ setisPopoverVisible(!isPopoverVisible)}
+ />
+
+
+
+
+
{userData?.displayName}
+ {userEmailRender}
+ {/*
+ {userData?.description &&
+ getTextFromHtmlString(userData?.description)}
+
*/}
+
+ {showChangePasswordComponent && (
+
setIsChangePassword(false)}
+ onSave={(data) => handleChangePassword(data)}
+ />
+ )}
+
+ {isDelete && (
+ setIsDelete(false)}
+ />
+ )}
+ {editProfile && (
+ setEditProfile(false)}
+ onSave={handleModalClose}
+ />
+ )}
+
+ );
+};
+
+export default ProfileSectionUserDetailsCard;
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ProfileCard/profile-details.less b/openmetadata-ui/src/main/resources/ui/src/components/ProfileCard/profile-details.less
new file mode 100644
index 000000000000..c70587522a5f
--- /dev/null
+++ b/openmetadata-ui/src/main/resources/ui/src/components/ProfileCard/profile-details.less
@@ -0,0 +1,58 @@
+/*
+ * Copyright 2025 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.
+ */
+.profile-management-popover .ant-popover-inner-content::before,
+.profile-management-popover .ant-popover-arrow {
+ display: none !important;
+}
+.profile-management-popover.ant-popover-placement-bottomLeft {
+ top: 125px !important;
+}
+.profile-management-popover .ant-popover-inner-content {
+ padding: 0px;
+}
+.profile-management-popover {
+ color: #52525b;
+
+ .ant-menu-item-selected {
+ background-color: #f3f8ff !important;
+ color: #1677ff !important;
+ font-weight: 600;
+ }
+}
+.profile-manage-item {
+ padding: 10px 16px;
+ cursor: pointer;
+ .ant-typography {
+ color: #52525b;
+ font-size: 14px;
+ font-style: normal;
+ font-weight: 400;
+ line-height: normal;
+ cursor: pointer;
+ }
+
+ .ant-btn-text {
+ padding: 0px;
+ }
+
+ &:hover {
+ background-color: #f5faff;
+ svg path {
+ fill: #1570ef;
+ }
+ }
+
+ &:hover .ant-typography {
+ color: #1570ef;
+ }
+}
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Settings/Team/TeamsSelectable/TeamsSelectable.interface.ts b/openmetadata-ui/src/main/resources/ui/src/components/Settings/Team/TeamsSelectable/TeamsSelectable.interface.ts
index e247a0a9f9f9..b350c3f773f4 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/Settings/Team/TeamsSelectable/TeamsSelectable.interface.ts
+++ b/openmetadata-ui/src/main/resources/ui/src/components/Settings/Team/TeamsSelectable/TeamsSelectable.interface.ts
@@ -19,4 +19,5 @@ export interface TeamsSelectableProps {
placeholder?: string;
selectedTeams?: EntityReference[];
maxValueCount?: number;
+ handleDropdownChange?: (visible: boolean) => void;
}
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Settings/Team/TeamsSelectable/TeamsSelectableNew.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Settings/Team/TeamsSelectable/TeamsSelectableNew.tsx
new file mode 100644
index 000000000000..19c071e78ad8
--- /dev/null
+++ b/openmetadata-ui/src/main/resources/ui/src/components/Settings/Team/TeamsSelectable/TeamsSelectableNew.tsx
@@ -0,0 +1,148 @@
+/*
+ * 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.
+ */
+
+import { Alert, TreeSelect } from 'antd';
+import { BaseOptionType } from 'antd/lib/select';
+import { AxiosError } from 'axios';
+import { t } from 'i18next';
+import { isEmpty } from 'lodash';
+import React, { useEffect, useMemo, useState } from 'react';
+import { TeamHierarchy } from '../../../../generated/entity/teams/teamHierarchy';
+import { EntityReference } from '../../../../generated/entity/type';
+import { getTeamsHierarchy } from '../../../../rest/teamsAPI';
+import { getEntityName } from '../../../../utils/EntityUtils';
+import { showErrorToast } from '../../../../utils/ToastUtils';
+import { TeamsSelectableProps } from './TeamsSelectable.interface';
+
+const TeamsSelectableNew = ({
+ showTeamsAlert,
+ onSelectionChange,
+ filterJoinable,
+ placeholder = t('label.search-for-type', {
+ type: t('label.team-plural-lowercase'),
+ }),
+ selectedTeams,
+ maxValueCount,
+ handleDropdownChange,
+}: TeamsSelectableProps) => {
+ const [noTeam, setNoTeam] = useState(false);
+ const [teams, setTeams] = useState>([]);
+ const [isLoading, setIsLoading] = useState(false);
+
+ const onChange = (newValue: { label: string; value: string }[]) => {
+ onSelectionChange &&
+ onSelectionChange(
+ newValue.map(
+ (val) =>
+ ({
+ id: val.value,
+ displayName: val.label,
+ type: 'team',
+ } as EntityReference)
+ )
+ );
+ };
+
+ const loadOptions = async () => {
+ try {
+ setIsLoading(true);
+ const { data } = await getTeamsHierarchy(filterJoinable);
+ setTeams(data);
+ showTeamsAlert && setNoTeam(isEmpty(data));
+ } catch (error) {
+ showErrorToast(error as AxiosError);
+ } finally {
+ setIsLoading(false);
+ }
+ };
+
+ useEffect(() => {
+ loadOptions();
+ }, []);
+
+ const showLeafIcon = false;
+
+ const getTreeNodeData = (team: TeamHierarchy): BaseOptionType => {
+ const teamName = getEntityName(team);
+ const value = team.id;
+ const disabled = filterJoinable ? !team.isJoinable : false;
+
+ return {
+ title: teamName,
+ value,
+ selectable: !team.children?.length,
+ disabled,
+ children:
+ team.children &&
+ team.children.map((n: TeamHierarchy) => getTreeNodeData(n)),
+ };
+ };
+
+ const teamsTree = useMemo(() => {
+ return teams.map((team) => {
+ return getTreeNodeData(team);
+ });
+ }, [teams]);
+
+ const selectedTeamsInternal = useMemo(() => {
+ return selectedTeams?.map((selectedTeam) => ({
+ label: getEntityName(selectedTeam),
+ value: selectedTeam.id,
+ }));
+ }, [selectedTeams]);
+
+ return (
+ <>
+ trigger.parentElement}
+ loading={isLoading}
+ maxTagCount={maxValueCount}
+ maxTagPlaceholder={(omittedValues) => (
+
+ {t('label.plus-count-more', { count: omittedValues.length })}
+
+ )}
+ placeholder={placeholder}
+ placement="bottomLeft"
+ showCheckedStrategy={TreeSelect.SHOW_CHILD}
+ style={{ width: '100%' }}
+ treeData={teamsTree}
+ treeLine={{ showLeafIcon }}
+ treeNodeFilterProp="title"
+ value={selectedTeamsInternal}
+ onChange={onChange}
+ onDropdownVisibleChange={handleDropdownChange}
+ />
+ {noTeam && (
+
+ )}
+ >
+ );
+};
+
+export default TeamsSelectableNew;
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Settings/Users/UserProfilePersona/UserProfilePersona.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Settings/Users/UserProfilePersona/UserProfilePersona.component.tsx
new file mode 100644
index 000000000000..cb841e82cd3e
--- /dev/null
+++ b/openmetadata-ui/src/main/resources/ui/src/components/Settings/Users/UserProfilePersona/UserProfilePersona.component.tsx
@@ -0,0 +1,156 @@
+/*
+ * 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 { Divider, Typography } from 'antd';
+import React, { useCallback, useMemo } from 'react';
+import { useTranslation } from 'react-i18next';
+
+import { ReactComponent as PersonaIcon } from '../../../../assets/svg/Persona.svg';
+import { EntityType } from '../../../../enums/entity.enum';
+import { EntityReference, User } from '../../../../generated/entity/teams/user';
+import { useAuth } from '../../../../hooks/authHooks';
+import { useApplicationStore } from '../../../../hooks/useApplicationStore';
+import { useFqn } from '../../../../hooks/useFqn';
+import Chip from '../../../common/Chip/Chip.component';
+import { PersonaSelectableList } from '../../../MyData/Persona/PersonaSelectableList/PersonaSelectableList.component';
+import '../users.less';
+
+interface UserProfileProps {
+ userData: User;
+ updateUserDetails: (data: Partial, key: keyof User) => Promise;
+}
+const UserProfilePersonas = ({
+ userData,
+ updateUserDetails,
+}: UserProfileProps) => {
+ const { t } = useTranslation();
+ const { isAdminUser } = useAuth();
+ const { fqn: username } = useFqn();
+ const { currentUser } = useApplicationStore();
+ const handlePersonaUpdate = useCallback(
+ async (personas: EntityReference[]) => {
+ await updateUserDetails({ personas }, 'personas');
+
+ return personas;
+ },
+ []
+ );
+ const isLoggedInUser = useMemo(
+ () => username === currentUser?.name,
+ [username, currentUser]
+ );
+ const hasEditPermission = useMemo(
+ () => (isAdminUser || isLoggedInUser) && !userData.deleted,
+ [isAdminUser, isLoggedInUser, userData.deleted]
+ );
+ const defaultPersona = useMemo(
+ () =>
+ userData.personas?.find(
+ (persona) => persona.id === userData.defaultPersona?.id
+ ),
+ [userData]
+ );
+ const handleDefaultPersonaUpdate = useCallback(
+ async (defaultPersona?: EntityReference) => {
+ await updateUserDetails({ defaultPersona }, 'defaultPersona');
+ },
+ [updateUserDetails]
+ );
+ const defaultPersonaRender = useMemo(
+ () => (
+ <>
+
+
+
+
+ {t('label.default-persona')}
+
+
+
+
+
+
+ {defaultPersona?.displayName}
+
+
+ >
+ ),
+ [
+ defaultPersona,
+ userData.personas,
+ hasEditPermission,
+ handleDefaultPersonaUpdate,
+ ]
+ );
+
+ return (
+
+
+
+
+
+ {t('label.persona')}
+
+
+
+
+
+
+ {/** Default persona**/}
+ {defaultPersonaRender}
+
+ );
+};
+
+export default UserProfilePersonas;
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Settings/Users/Users.interface.ts b/openmetadata-ui/src/main/resources/ui/src/components/Settings/Users/Users.interface.ts
index 94d7e73c35fd..77d28e83d9ec 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/Settings/Users/Users.interface.ts
+++ b/openmetadata-ui/src/main/resources/ui/src/components/Settings/Users/Users.interface.ts
@@ -28,6 +28,7 @@ export interface Props {
export enum UserPageTabs {
ACTIVITY = 'activity_feed',
+ TASK = 'task',
MY_DATA = 'mydata',
FOLLOWING = 'following',
ACCESS_TOKEN = 'access-token',
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Settings/Users/UsersNew.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Settings/Users/UsersNew.component.tsx
new file mode 100644
index 000000000000..54f1140602bf
--- /dev/null
+++ b/openmetadata-ui/src/main/resources/ui/src/components/Settings/Users/UsersNew.component.tsx
@@ -0,0 +1,421 @@
+/*
+ * 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.
+ */
+
+import { Col, Row, Space, Tabs, Tooltip, Typography } from 'antd';
+import { isEmpty, noop } from 'lodash';
+import React, { useCallback, useEffect, useMemo, useState } from 'react';
+import { useTranslation } from 'react-i18next';
+import { useHistory, useParams } from 'react-router-dom';
+import { getUserPath, ROUTES } from '../../../constants/constants';
+import { useLimitStore } from '../../../context/LimitsProvider/useLimitsStore';
+import { EntityType } from '../../../enums/entity.enum';
+import { SearchIndex } from '../../../enums/search.enum';
+import { EntityReference } from '../../../generated/entity/type';
+import { useAuth } from '../../../hooks/authHooks';
+import { useApplicationStore } from '../../../hooks/useApplicationStore';
+import useCustomLocation from '../../../hooks/useCustomLocation/useCustomLocation';
+import { useFqn } from '../../../hooks/useFqn';
+import { searchData } from '../../../rest/miscAPI';
+import { getEntityName } from '../../../utils/EntityUtils';
+import { DEFAULT_ENTITY_PERMISSION } from '../../../utils/PermissionsUtils';
+import ActivityFeedProvider from '../../ActivityFeed/ActivityFeedProvider/ActivityFeedProvider';
+import { ActivityFeedTabNew } from '../../ActivityFeed/ActivityFeedTab/ActivityFeedTabNew.component';
+import DescriptionV1 from '../../common/EntityDescription/DescriptionV1';
+import TabsLabel from '../../common/TabsLabel/TabsLabel.component';
+import EntitySummaryPanel from '../../Explore/EntitySummaryPanel/EntitySummaryPanel.component';
+import { EntityDetailsObjectInterface } from '../../Explore/ExplorePage.interface';
+import AssetsTabs from '../../Glossary/GlossaryTerms/tabs/AssetsTabs.component';
+import {
+ AssetNoDataPlaceholderProps,
+ AssetsOfEntity,
+} from '../../Glossary/GlossaryTerms/tabs/AssetsTabs.interface';
+import AccessTokenCard from './AccessTokenCard/AccessTokenCard.component';
+import { Props, UserPageTabs } from './Users.interface';
+import './users.less';
+import UserProfileDetails from './UsersProfile/UserProfileDetails/UserProfileDetails.component';
+// import Title from 'antd/lib/skeleton/Title';
+// import ActivityFeedCardNew from '../../ActivityFeedCardNew/ActivityFeedcardNew.component';
+// import DetailsPanel from '../../ActivityFeedCardNew/DetailsPanel.component';
+import { ActivityFeedTabs } from '../../ActivityFeed/ActivityFeedTab/ActivityFeedTab.interface';
+import { DomainLabelNew } from '../../common/DomainLabel/DomainLabelNew';
+import ProfileSectionUserDetailsCard from '../../ProfileCard/ProfileSectionUserDetailsCard.component';
+import UserProfilePersonas from './UserProfilePersona/UserProfilePersona.component';
+import UserProfileRoles from './UsersProfile/UserProfileRoles/UserProfileRoles.component';
+import UserProfileTeams from './UsersProfile/UserProfileTeams/UserProfileTeams.component';
+
+const Users = ({
+ afterDeleteAction,
+ userData,
+ queryFilters,
+ updateUserDetails,
+}: Props) => {
+ const { tab: activeTab = UserPageTabs.ACTIVITY } =
+ useParams<{ tab: UserPageTabs }>();
+ const { fqn: decodedUsername } = useFqn();
+ const [assetCount, setAssetCount] = useState(0);
+ const { isAdminUser } = useAuth();
+ const history = useHistory();
+ const location = useCustomLocation();
+ const { currentUser } = useApplicationStore();
+
+ const [previewAsset, setPreviewAsset] =
+ useState();
+
+ const [isDescriptionEdit, setIsDescriptionEdit] = useState(false);
+ const { t } = useTranslation();
+ const { getResourceLimit } = useLimitStore();
+
+ const [disableFields, setDisableFields] = useState([]);
+
+ const isLoggedInUser = useMemo(
+ () => decodedUsername === currentUser?.name,
+ [decodedUsername]
+ );
+
+ const fetchAssetsCount = async (query: string) => {
+ try {
+ const res = await searchData('', 1, 0, query, '', '', SearchIndex.ALL);
+
+ setAssetCount(res.data.hits.total.value ?? 0);
+ } catch (error) {
+ setAssetCount(0);
+ }
+ };
+
+ const initLimits = async () => {
+ const limits = await getResourceLimit('user', false);
+
+ setDisableFields(limits.configuredLimit.disabledFields ?? []);
+ };
+
+ const activeTabHandler = (activeKey: string) => {
+ // To reset search params appends from other page for proper navigation
+ location.search = '';
+ if (activeKey !== activeTab) {
+ history.push({
+ pathname: getUserPath(decodedUsername, activeKey),
+ search: location.search,
+ });
+ }
+ };
+
+ const handleAssetClick = useCallback((asset) => {
+ setPreviewAsset(asset);
+ }, []);
+
+ const handleTabRedirection = useCallback(() => {
+ if (!isLoggedInUser && activeTab === UserPageTabs.ACCESS_TOKEN) {
+ history.push({
+ pathname: getUserPath(decodedUsername, UserPageTabs.ACTIVITY),
+ search: location.search,
+ });
+ }
+ }, [activeTab, decodedUsername, isLoggedInUser]);
+
+ useEffect(() => {
+ handleTabRedirection();
+ initLimits();
+ }, []);
+
+ const handlePersonaUpdate = useCallback(
+ async (personas: EntityReference[]) => {
+ await updateUserDetails({ personas }, 'personas');
+ },
+ [updateUserDetails]
+ );
+
+ const tabDataRender = useCallback(
+ (props: {
+ queryFilter: string;
+ type: AssetsOfEntity;
+ noDataPlaceholder: AssetNoDataPlaceholderProps;
+ }) => (
+
+
+
+
history.push(ROUTES.EXPLORE)}
+ onAssetClick={handleAssetClick}
+ {...props}
+ />
+
+
+
+ {previewAsset && (
+
+ setPreviewAsset(undefined)}
+ />
+
+ )}
+
+ ),
+ [previewAsset, assetCount, handleAssetClick, setPreviewAsset, activeTab]
+ );
+
+ const tabs = useMemo(
+ () => [
+ {
+ label: (
+
+ ),
+ key: UserPageTabs.ACTIVITY,
+ children: (
+
+
+
+ ),
+ },
+ {
+ label: (
+
+ ),
+ key: UserPageTabs.TASK,
+ children: (
+
+
+
+ ),
+ },
+ {
+ label: (
+
+ ),
+ key: UserPageTabs.MY_DATA,
+ children: tabDataRender({
+ queryFilter: queryFilters.myData,
+ type: AssetsOfEntity.MY_DATA,
+ noDataPlaceholder: {
+ message: t('server.you-have-not-action-anything-yet', {
+ action: t('label.owned-lowercase'),
+ }),
+ },
+ }),
+ },
+ {
+ label: (
+
+ ),
+ key: UserPageTabs.FOLLOWING,
+ children: tabDataRender({
+ queryFilter: queryFilters.following,
+ type: AssetsOfEntity.FOLLOWING,
+ noDataPlaceholder: {
+ message: t('server.you-have-not-action-anything-yet', {
+ action: t('label.followed-lowercase'),
+ }),
+ },
+ }),
+ },
+ ...(isLoggedInUser
+ ? [
+ {
+ label: (
+
+
+
+ ),
+ disabled: disableFields.includes('personalAccessToken'),
+ key: UserPageTabs.ACCESS_TOKEN,
+ children: ,
+ },
+ ]
+ : []),
+ ],
+ [
+ activeTab,
+ userData.id,
+ decodedUsername,
+ setPreviewAsset,
+ tabDataRender,
+ disableFields,
+ ]
+ );
+
+ const handleDescriptionChange = useCallback(
+ async (description: string) => {
+ await updateUserDetails({ description }, 'description');
+
+ setIsDescriptionEdit(false);
+ },
+ [updateUserDetails, setIsDescriptionEdit]
+ );
+
+ const descriptionRenderComponent = useMemo(
+ () =>
+ isLoggedInUser ? (
+ setIsDescriptionEdit(false)}
+ onDescriptionEdit={() => setIsDescriptionEdit(true)}
+ onDescriptionUpdate={handleDescriptionChange}
+ />
+ ) : (
+
+
+ {t('label.description')}
+
+
+ {isEmpty(userData.description)
+ ? t('label.no-entity', {
+ entity: t('label.description'),
+ })
+ : userData.description}
+
+
+ ),
+ [
+ userData,
+ isAdminUser,
+ isDescriptionEdit,
+ isLoggedInUser,
+ getEntityName,
+ handleDescriptionChange,
+ ]
+ );
+
+ const userProfileCollapseHeader = useMemo(
+ () => (
+
+ ),
+ [userData, afterDeleteAction, updateUserDetails]
+ );
+
+ useEffect(() => {
+ if ([UserPageTabs.MY_DATA, UserPageTabs.FOLLOWING].includes(activeTab)) {
+ fetchAssetsCount(
+ activeTab === UserPageTabs.MY_DATA
+ ? queryFilters.myData
+ : queryFilters.following
+ );
+ }
+ }, [activeTab]);
+
+ return (
+
+
+
+
+
+
+
+
+
({
+ key: tab.key,
+ label: tab.label,
+ }))}
+ renderTabBar={(props, DefaultTabBar) => (
+
+
+
+ )}
+ onChange={activeTabHandler}
+ />
+
+
+
+
+ {tabs.find((tab) => tab.key === activeTab)?.children}
+
+
+
+
+
+ );
+};
+
+export default Users;
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Settings/Users/UsersProfile/UserProfileInheritedRoles/UserProfileInheritedRoles.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Settings/Users/UsersProfile/UserProfileInheritedRoles/UserProfileInheritedRoles.component.tsx
index fab09848755e..3ac61ad16faf 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/Settings/Users/UsersProfile/UserProfileInheritedRoles/UserProfileInheritedRoles.component.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/components/Settings/Users/UsersProfile/UserProfileInheritedRoles/UserProfileInheritedRoles.component.tsx
@@ -11,10 +11,10 @@
* limitations under the License.
*/
-import { Card, Typography } from 'antd';
+import { Divider, Typography } from 'antd';
import React from 'react';
import { useTranslation } from 'react-i18next';
-import { ReactComponent as UserIcons } from '../../../../../assets/svg/user.svg';
+import { ReactComponent as InheritedRolesIcon } from '../../../../../assets/svg/InheritedRoles.svg';
import { EntityType } from '../../../../../enums/entity.enum';
import Chip from '../../../../common/Chip/Chip.component';
import { UserProfileInheritedRolesProps } from './UserProfileInheritedRoles.interface';
@@ -25,24 +25,37 @@ const UserProfileInheritedRoles = ({
const { t } = useTranslation();
return (
-
- {t('label.inherited-role-plural')}
-
- }>
- }
- noDataPlaceholder={t('message.no-inherited-roles-found')}
- />
-
+
+
+
+
+
+
+
+ {t('label.role-plural')}
+
+
+
+
+
);
};
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Settings/Users/UsersProfile/UserProfileRoles/UserProfileRoles.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Settings/Users/UsersProfile/UserProfileRoles/UserProfileRoles.component.tsx
index d1791a3f3cbc..197d3eaf591e 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/Settings/Users/UsersProfile/UserProfileRoles/UserProfileRoles.component.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/components/Settings/Users/UsersProfile/UserProfileRoles/UserProfileRoles.component.tsx
@@ -11,44 +11,45 @@
* limitations under the License.
*/
-import { Card, Select, Space, Tooltip, Typography } from 'antd';
+import { Button, Divider, Popover, Select, Typography } from 'antd';
import { AxiosError } from 'axios';
import { isEmpty, toLower } from 'lodash';
import React, { useCallback, useEffect, useMemo, useState } from 'react';
import { useTranslation } from 'react-i18next';
-import { ReactComponent as EditIcon } from '../../../../../assets/svg/edit-new.svg';
-import { ReactComponent as UserIcons } from '../../../../../assets/svg/user.svg';
+import { ReactComponent as ClosePopoverIcon } from '../../../../../assets/svg/popover-close.svg';
+import { ReactComponent as SavePopoverIcon } from '../../../../../assets/svg/popover-save.svg';
+import { ReactComponent as RoleIcon } from '../../../../../assets/svg/roles.svg';
+import { ReactComponent as EditIcon } from '../../../../../assets/svg/user-profile-edit.svg';
+
import {
- DE_ACTIVE_COLOR,
- ICON_DIMENSION,
PAGE_SIZE_LARGE,
TERM_ADMIN,
} from '../../../../../constants/constants';
import { EntityType } from '../../../../../enums/entity.enum';
import { Role } from '../../../../../generated/entity/teams/role';
-import { useAuth } from '../../../../../hooks/authHooks';
import { getRoles } from '../../../../../rest/rolesAPIV1';
import { handleSearchFilterOption } from '../../../../../utils/CommonUtils';
import { getEntityName } from '../../../../../utils/EntityUtils';
import { showErrorToast } from '../../../../../utils/ToastUtils';
import Chip from '../../../../common/Chip/Chip.component';
-import InlineEdit from '../../../../common/InlineEdit/InlineEdit.component';
+import '../../users.less';
+import UserProfileInheritedRoles from '../UserProfileInheritedRoles/UserProfileInheritedRoles.component';
import { UserProfileRolesProps } from './UserProfileRoles.interface';
const UserProfileRoles = ({
userRoles,
- isDeletedUser,
updateUserDetails,
isUserAdmin,
+ userData,
}: UserProfileRolesProps) => {
const { t } = useTranslation();
- const { isAdminUser } = useAuth();
const [isRolesEdit, setIsRolesEdit] = useState(false);
const [isRolesLoading, setIsRolesLoading] = useState(false);
const [selectedRoles, setSelectedRoles] = useState([]);
const [roles, setRoles] = useState([]);
const [isLoading, setIsLoading] = useState(false);
+ const [isSelectOpen, setIsSelectOpen] = useState(false);
const useRolesOption = useMemo(() => {
const options = roles?.map((role) => ({
@@ -120,6 +121,7 @@ const UserProfileRoles = ({
},
'roles'
);
+
setIsLoading(false);
setIsRolesEdit(false);
};
@@ -134,7 +136,6 @@ const UserProfileRoles = ({
...(userRoles ?? []),
]}
entityType={EntityType.ROLE}
- icon={}
noDataPlaceholder={t('message.no-roles-assigned')}
showNoDataPlaceholder={!isUserAdmin}
/>
@@ -145,7 +146,7 @@ const UserProfileRoles = ({
const handleCloseEditRole = useCallback(() => {
setIsRolesEdit(false);
setUserRoles();
- }, [setUserRoles]);
+ }, [setUserRoles, setIsRolesEdit]);
useEffect(() => {
setUserRoles();
@@ -158,60 +159,131 @@ const UserProfileRoles = ({
}, [isRolesEdit, roles]);
return (
-
-
+
+
+
+
+
+
+
{t('label.role-plural')}
- {!isRolesEdit && isAdminUser && !isDeletedUser && (
-
- setIsRolesEdit(true)}
- />
-
- )}
-
- }>
-
- {isRolesEdit && isAdminUser ? (
-
-
+ }
+ open={isRolesEdit}
+ overlayClassName="profile-edit-popover-card"
+ placement="right"
+ trigger="click"
+ onOpenChange={setIsRolesEdit}>
+
setIsRolesEdit(true)}
/>
-
- ) : (
- rolesRenderElement
- )}
+
+
+
+
-
+
+
);
};
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Settings/Users/UsersProfile/UserProfileRoles/UserProfileRoles.interface.ts b/openmetadata-ui/src/main/resources/ui/src/components/Settings/Users/UsersProfile/UserProfileRoles/UserProfileRoles.interface.ts
index a1014dd38416..72e672ba6941 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/Settings/Users/UsersProfile/UserProfileRoles/UserProfileRoles.interface.ts
+++ b/openmetadata-ui/src/main/resources/ui/src/components/Settings/Users/UsersProfile/UserProfileRoles/UserProfileRoles.interface.ts
@@ -17,4 +17,5 @@ export interface UserProfileRolesProps {
isDeletedUser: User['deleted'];
userRoles: User['roles'];
updateUserDetails: (data: Partial, key: keyof User) => Promise;
+ userData?: User;
}
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Settings/Users/UsersProfile/UserProfileTeams/UserProfileTeams.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Settings/Users/UsersProfile/UserProfileTeams/UserProfileTeams.component.tsx
index c1d65a3611df..101057eba4ea 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/Settings/Users/UsersProfile/UserProfileTeams/UserProfileTeams.component.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/components/Settings/Users/UsersProfile/UserProfileTeams/UserProfileTeams.component.tsx
@@ -11,22 +11,20 @@
* limitations under the License.
*/
-import { Card, Space, Tooltip, Typography } from 'antd';
+import { Button, Divider, Popover, Typography } from 'antd';
import React, { useCallback, useEffect, useMemo, useState } from 'react';
import { useTranslation } from 'react-i18next';
-import { ReactComponent as EditIcon } from '../../../../../assets/svg/edit-new.svg';
+import { ReactComponent as ClosePopoverIcon } from '../../../../../assets/svg/popover-close.svg';
+import { ReactComponent as SavePopoverIcon } from '../../../../../assets/svg/popover-save.svg';
import { ReactComponent as IconTeamsGrey } from '../../../../../assets/svg/teams-grey.svg';
-import {
- DE_ACTIVE_COLOR,
- ICON_DIMENSION,
-} from '../../../../../constants/constants';
+import { ReactComponent as EditIcon } from '../../../../../assets/svg/user-profile-edit.svg';
+
import { EntityType } from '../../../../../enums/entity.enum';
import { EntityReference } from '../../../../../generated/entity/type';
import { useAuth } from '../../../../../hooks/authHooks';
import { getNonDeletedTeams } from '../../../../../utils/CommonUtils';
import Chip from '../../../../common/Chip/Chip.component';
-import InlineEdit from '../../../../common/InlineEdit/InlineEdit.component';
-import TeamsSelectable from '../../../Team/TeamsSelectable/TeamsSelectable';
+import TeamsSelectableNew from '../../../Team/TeamsSelectable/TeamsSelectableNew';
import { UserProfileTeamsProps } from './UserProfileTeams.interface';
const UserProfileTeams = ({
@@ -39,6 +37,7 @@ const UserProfileTeams = ({
const [isLoading, setIsLoading] = useState(false);
const [isTeamsEdit, setIsTeamsEdit] = useState(false);
const [selectedTeams, setSelectedTeams] = useState([]);
+ const [isSelectOpen, setIsSelectOpen] = useState(false);
const handleTeamsSave = async () => {
setIsLoading(true);
@@ -58,7 +57,6 @@ const UserProfileTeams = ({
}
noDataPlaceholder={t('message.no-team-found')}
/>
),
@@ -78,50 +76,121 @@ const UserProfileTeams = ({
setUserTeams();
}, [setUserTeams]);
+ const handleDropdownChange = (visible: boolean) => {
+ setIsSelectOpen(visible);
+ };
+
return (
-
-
+
+
+
+
+
+
+
+
{t('label.team-plural')}
+ {isAdminUser && !isDeletedUser && (
+
+
+
+
+
+
+
+ {t('label.team-plural')}
+
+
+
+
+
+
- {!isTeamsEdit && isAdminUser && !isDeletedUser && (
-
+
+
+ }
+ size="small"
+ style={{
+ width: '30px',
+ height: '30px',
+ background: '#0950C5',
+ }}
+ type="primary"
+ onClick={handleCloseEditTeam}
+ />
+
+ }
+ loading={isLoading}
+ size="small"
+ style={{
+ width: '30px',
+ height: '30px',
+ background: '#0950C5',
+ }}
+ type="primary"
+ onClick={handleTeamsSave}
+ />
+
+
+ }
+ open={isTeamsEdit}
+ overlayClassName="profile-edit-popover-card"
+ placement="topRight"
+ trigger="click"
+ onOpenChange={setIsTeamsEdit}>
setIsTeamsEdit(true)}
/>
-
+
)}
-
- }>
- {isTeamsEdit && isAdminUser ? (
-
-
+
+
+
+
-
- ) : (
- teamsRenderElement
- )}
-
+
+ {isAdminUser && teamsRenderElement}
+
+
);
};
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Settings/Users/users.less b/openmetadata-ui/src/main/resources/ui/src/components/Settings/Users/users.less
index d0f2f9ae264c..2414a89177ad 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/Settings/Users/users.less
+++ b/openmetadata-ui/src/main/resources/ui/src/components/Settings/Users/users.less
@@ -28,6 +28,50 @@
padding: 0 20px;
}
}
+// .user-page-tabs-new {
+// height: 48px;
+// .ant-tabs-nav {
+// margin: 0 !important;
+// padding: 0 20px;
+// .ant-tabs-nav-list{
+// border-bottom: none;
+// .ant-tabs-tab.ant-tabs-tab-active{
+// border-bottom: 1px solid red;
+// }
+// .tabs-label-container{
+// font-size: 16px;
+// color: #71717A;
+// }
+// }
+// }
+// }
+.user-page-tabs-new {
+ height: 48px;
+
+ .ant-tabs-nav {
+ margin: 0;
+ padding: 0 20px;
+
+ .ant-tabs-nav-list {
+ border-bottom: none;
+ .ant-tabs-tab {
+ padding-bottom: 8px;
+ position: relative;
+ color: #71717a;
+ font-size: 16px;
+
+ &.ant-tabs-tab-active {
+ color: @primary-color;
+ }
+ }
+ }
+ }
+ .ant-tabs-ink-bar {
+ bottom: 6px;
+ height: 2px;
+ background-color: @primary-color;
+ }
+}
.user-layout {
> .ant-col {
@@ -50,20 +94,13 @@
}
}
- .user-page-layout {
- .user-layout-scroll {
- height: @users-page-tabs-height;
- overflow-y: scroll;
- }
-
- .user-page-layout-right-panel {
- padding-right: 0 !important;
- background-color: @white;
- border: 1px solid @border-color;
- border-radius: 0;
- padding-left: 0 !important;
- border-top: 0;
- }
+ .user-page-layout-right-panel {
+ padding-right: 0 !important;
+ background-color: @white;
+ border: 1px solid @border-color;
+ border-radius: 0;
+ padding-left: 0 !important;
+ border-top: 0;
}
.activity-feed-tab {
@@ -75,9 +112,289 @@
}
}
.summary-panel-container {
- height: @users-page-tabs-height;
+ height: @profile-entity-details-tab-height;
+ padding: 20px;
+ border-radius: 12px;
+ background-color: @white;
}
.explore-search-card {
margin: 0 12px;
}
}
+
+.user-layout-scroll {
+ height: @profile-entity-details-tab-height;
+ overflow-y: scroll;
+}
+
+.summary-panel-container {
+ height: @profile-entity-details-tab-height;
+ border-radius: 12px;
+ background-color: @white;
+
+ .ant-card-head {
+ border-bottom: none;
+ padding: 20px;
+ padding-bottom: 0;
+
+ .ant-card-head-title {
+ font-size: 18px;
+ line-height: 18px;
+ color: #0950c5;
+ }
+ }
+
+ .ant-card-body {
+ padding: 20px;
+ }
+}
+.profile-section {
+ padding: 20px;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: flex-start;
+ background-color: @white;
+ border-radius: 8px;
+ height: @profile-page-sidebar;
+ overflow-y: scroll;
+ .profile-section-user-details-card {
+ padding: 20px;
+ margin-bottom: 20px;
+ background: #f5f5f5;
+ justify-content: center;
+ align-items: center;
+ border-radius: 12px;
+
+ .user-details-menu-icon {
+ position: absolute;
+ top: 10px;
+ right: 10px;
+ }
+
+ .profile-details-title {
+ margin-top: 20px;
+ font-size: 18px;
+ font-style: normal;
+ font-weight: 600;
+ line-height: 28px;
+ color: #181d27;
+ text-align: center;
+ }
+ .profile-details-email {
+ color: #175cd3;
+ text-align: center;
+ font-size: 14px;
+ line-height: 20px;
+ }
+ .profile-details-desc {
+ font-size: 14px;
+ font-style: normal;
+ font-weight: 400;
+ line-height: 20px;
+ color: #535862;
+ text-align: center;
+ margin-top: @margin-xs;
+ }
+ }
+}
+
+.profile-section-card {
+ border-radius: 12px;
+ box-shadow: '0 2px 8px rgba(0, 0, 0, 0.1)';
+ margin-bottom: 16px;
+ padding: 20px;
+ background-color: #f5f5f5;
+ margin: 8px 0px;
+ width: 100%;
+ gap: 10px;
+}
+.profile-section-card-title {
+ font-weight: 600;
+ font-size: 16px;
+ line-height: 24px;
+ color: #414654;
+}
+.profile-section-card-list {
+ font-weight: 400;
+ font-size: 14px;
+ line-height: 20px;
+ color: #535862;
+}
+.tabs-container {
+ background-color: @white;
+ display: flex;
+ justify-content: flex-start;
+ align-items: center;
+ height: 48px;
+ width: 100%;
+ border-radius: 8px;
+ margin-bottom: 20px;
+ .ant-tabs-nav::before {
+ border-bottom: none !important;
+ }
+}
+.tab-label {
+ color: #71717a;
+ font-size: 16px;
+ line-height: 24px;
+ margin: 0px 16px;
+ cursor: pointer;
+}
+
+.users-page-activity-feed {
+ background: @white;
+ border-radius: 8px;
+ padding: 20px;
+}
+
+.user-profile-card {
+ background: #f5f5f5;
+ padding: 20px 20px 10px 20px;
+ border-radius: 12px;
+ margin-bottom: 20px;
+ .user-profile-card-header {
+ margin-bottom: @margin-xs;
+ }
+ .user-profile-card-body {
+ margin-bottom: 10px;
+ }
+ .user-profile-card-title {
+ font-weight: 600;
+ font-size: 14px;
+ line-height: 20px;
+ color: #414651;
+ }
+}
+// .user-profile-edit-popover-card {
+// border-radius: 12px;
+// box-shadow: #00000040;
+// width: 379px;
+// padding: 20px !important;
+// background: #FFF;
+
+// }
+
+.user-profile-edit-popover-card-title {
+ font-size: 14px;
+ font-weight: 600;
+ line-height: 20px;
+}
+
+.chip-text {
+ color: #175cd3;
+ border: none;
+ font-size: 12px;
+}
+.default-persona-text {
+ padding-left: 26px;
+ color: #535862;
+ font-size: 14px;
+}
+.user-page-icon {
+ margin: 2px;
+}
+
+.profile-edit-popover-card {
+ .ant-popover {
+ overflow: visible !important;
+ z-index: 1050;
+ }
+
+ .ant-popover-inner {
+ border-radius: 12px;
+ }
+ .ant-popover-inner-content {
+ border-radius: 12px;
+ padding: 20px;
+ width: 379px;
+ box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
+ }
+ .ant-select-selection-search-input {
+ position: relative !important;
+ }
+ .ant-popover-arrow {
+ display: none;
+ }
+ .ant-select {
+ border-radius: 5px;
+ }
+
+ .ant-select-item-option-content {
+ font-size: 14px;
+ }
+ .ant-select-item-option-selected,
+ .ant-select-selection-item {
+ font-size: 14px;
+ }
+ .ant-select:not(.ant-select-customize-input) {
+ border-radius: 5px !important;
+ .ant-select-selector {
+ border-radius: 5px !important;
+ border: none;
+ background: #fdfdfd;
+ display: flex;
+ align-items: center;
+ padding: 12px;
+
+ .ant-select-selection-item {
+ border-radius: 4px;
+ border: 0.5px solid #d4d4d8;
+ background: none;
+ align-items: center;
+ margin-right: 8px;
+ padding: 4px 8px;
+ background: #f5f5f5;
+ }
+ .ant-select-selection-item-content {
+ color: #292929;
+ font-family: Inter;
+ font-size: 12px;
+ font-style: normal;
+ font-weight: 400;
+ line-height: normal;
+ }
+ }
+ }
+}
+.single-select .ant-select-selection-item {
+ border: none !important;
+ background: none !important;
+}
+.profile-edit-save,
+.profile-edit-cancel {
+ width: 30px;
+ height: 30px;
+ background: '#0950C5' !important;
+}
+.profile-edit-save:hover,
+.profile-edit-save:focus,
+.profile-edit-save:focus {
+ background-color: @primary-color !important;
+ color: @white !important;
+}
+.profile-edit-cancel:hover,
+.profile-edit-cancel:focus,
+.profile-edit-cancel:focus {
+ background-color: @primary-color !important;
+ color: @white !important;
+}
+
+.max-tag-text {
+ font-family: Inter;
+ font-size: 12px;
+ font-style: normal;
+ font-weight: 400;
+ line-height: 22px;
+ color: #175cd3;
+}
+.ant-select-selection-item:has(.max-tag-text) {
+ background: none !important;
+ border: none !important;
+ padding: 0 !important;
+ box-shadow: none !important;
+}
+
+.page-layout-v1-vertical-scroll {
+ background: #f5f5f5;
+}
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Tag/TagsV1/TagsV1.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Tag/TagsV1/TagsV1.component.tsx
index 450782471a3d..ab813cf540b5 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/Tag/TagsV1/TagsV1.component.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/components/Tag/TagsV1/TagsV1.component.tsx
@@ -151,8 +151,11 @@ const TagsV1 = ({
data-testid="tags"
style={
color
- ? { backgroundColor: reduceColorOpacity(color, 0.05) }
- : undefined
+ ? {
+ backgroundColor: reduceColorOpacity(color, 0.05),
+ borderLeft: '3px solid #81C562',
+ }
+ : { borderLeft: '3px solid #81C562' }
}
{...tagProps}>
{/* Wrap only content to avoid redirect on closeable icons */}
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/common/Chip/Chip.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/common/Chip/Chip.component.tsx
index 318a9f588085..e7382cce3cfa 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/common/Chip/Chip.component.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/components/common/Chip/Chip.component.tsx
@@ -48,7 +48,7 @@ const Chip = ({
item.fullyQualifiedName ?? ''
)}>
{icon}
-
+
{getEntityName(item)}
@@ -70,7 +70,7 @@ const Chip = ({
return (
{data.slice(0, USER_DATA_SIZE).map(getChipElement)}
@@ -84,7 +84,7 @@ const Chip = ({
}
overlayClassName="w-56"
trigger="click">
- {`+${
+ {`+${
listLength - USER_DATA_SIZE
} more`}
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/common/DomainLabel/DomainLabelNew.tsx b/openmetadata-ui/src/main/resources/ui/src/components/common/DomainLabel/DomainLabelNew.tsx
new file mode 100644
index 000000000000..17307ed2df7b
--- /dev/null
+++ b/openmetadata-ui/src/main/resources/ui/src/components/common/DomainLabel/DomainLabelNew.tsx
@@ -0,0 +1,198 @@
+/*
+ * 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 { Divider, Tooltip, Typography } from 'antd';
+import { AxiosError } from 'axios';
+import classNames from 'classnames';
+import { compare } from 'fast-json-patch';
+import { get, isEmpty, isUndefined } from 'lodash';
+import React, { useCallback, useEffect, useMemo, useState } from 'react';
+import { useTranslation } from 'react-i18next';
+import { ReactComponent as DomainIcon } from '../../../assets/svg/ic-domain.svg';
+import { ReactComponent as InheritIcon } from '../../../assets/svg/ic-inherit.svg';
+
+import { EntityReference } from '../../../generated/entity/type';
+import {
+ getAPIfromSource,
+ getEntityAPIfromSource,
+} from '../../../utils/Assets/AssetsUtils';
+import {
+ getDomainFieldFromEntityType,
+ renderDomainLink,
+} from '../../../utils/DomainUtils';
+import { showErrorToast } from '../../../utils/ToastUtils';
+import { AssetsUnion } from '../../DataAssets/AssetsSelectionModal/AssetSelectionModal.interface';
+import { DataAssetWithDomains } from '../../DataAssets/DataAssetsHeader/DataAssetsHeader.interface';
+import DomainSelectableList from '../DomainSelectableList/DomainSelectableList.component';
+import { DomainLabelProps } from './DomainLabel.interface';
+
+export const DomainLabelNew = ({
+ afterDomainUpdateAction,
+ hasPermission,
+ domain,
+ domainDisplayName,
+ entityType,
+ entityFqn,
+ entityId,
+ textClassName,
+ showDomainHeading = false,
+ multiple = false,
+ onUpdate,
+}: DomainLabelProps) => {
+ const { t } = useTranslation();
+ const [activeDomain, setActiveDomain] = useState([]);
+
+ const handleDomainSave = useCallback(
+ async (selectedDomain: EntityReference | EntityReference[]) => {
+ const fieldData = getDomainFieldFromEntityType(entityType);
+
+ const entityDetails = getEntityAPIfromSource(entityType as AssetsUnion)(
+ entityFqn,
+ { fields: fieldData }
+ );
+
+ try {
+ const entityDetailsResponse = await entityDetails;
+ if (entityDetailsResponse) {
+ const jsonPatch = compare(entityDetailsResponse, {
+ ...entityDetailsResponse,
+ [fieldData]: selectedDomain,
+ });
+
+ const api = getAPIfromSource(entityType as AssetsUnion);
+ const res = await api(entityId, jsonPatch);
+
+ const entityDomains = get(res, fieldData, {});
+ if (Array.isArray(entityDomains)) {
+ setActiveDomain(entityDomains);
+ } else {
+ // update the domain details here
+ setActiveDomain(isEmpty(entityDomains) ? [] : [entityDomains]);
+ }
+ !isUndefined(afterDomainUpdateAction) &&
+ afterDomainUpdateAction(res as DataAssetWithDomains);
+ }
+ } catch (err) {
+ // Handle errors as needed
+ showErrorToast(err as AxiosError);
+ }
+ },
+ [entityType, entityId, entityFqn, afterDomainUpdateAction, onUpdate]
+ );
+
+ useEffect(() => {
+ if (domain) {
+ if (Array.isArray(domain)) {
+ setActiveDomain(domain);
+ } else {
+ setActiveDomain([domain]);
+ }
+ }
+ }, [domain]);
+
+ const domainLink = useMemo(() => {
+ if (
+ activeDomain &&
+ Array.isArray(activeDomain) &&
+ activeDomain.length > 0
+ ) {
+ return activeDomain.map((domain) => {
+ const inheritedIcon = domain?.inherited ? (
+
+
+
+ ) : null;
+
+ return (
+
+ {renderDomainLink(
+ domain,
+ domainDisplayName,
+ showDomainHeading,
+ textClassName
+ )}
+ {inheritedIcon &&
{inheritedIcon}
}
+
+ );
+ });
+ } else {
+ return (
+
+ {t('label.no-entity', { entity: t('label.domain') })}
+
+ );
+ }
+ }, [activeDomain, domainDisplayName, showDomainHeading, textClassName]);
+
+ const selectableList = useMemo(() => {
+ return (
+ hasPermission && (
+
+ )
+ );
+ }, [hasPermission, activeDomain, handleDomainSave]);
+
+ const label = useMemo(() => {
+ return (
+
+ {domainLink}
+
+ );
+ }, [activeDomain, hasPermission, selectableList]);
+
+ return (
+
+
+
+
+
+
+
+
+ {t('label.domain-plural')}
+
+ {selectableList}
+
+
+
+
+ );
+};
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/common/DomainSelectableList/DomainSelectableList.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/common/DomainSelectableList/DomainSelectableList.component.tsx
index aecba1071cf3..12dc36d29743 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/common/DomainSelectableList/DomainSelectableList.component.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/components/common/DomainSelectableList/DomainSelectableList.component.tsx
@@ -10,31 +10,19 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-import { Button, Popover, Tooltip, Typography } from 'antd';
-import React, { useCallback, useMemo, useState } from 'react';
+import { Button, Popover, Select, Tooltip, Typography } from 'antd';
+import React, { useMemo, useState } from 'react';
import { useTranslation } from 'react-i18next';
-import { ReactComponent as EditIcon } from '../../../assets/svg/edit-new.svg';
import { ReactComponent as DomainIcon } from '../../../assets/svg/ic-domain.svg';
-import {
- DE_ACTIVE_COLOR,
- PAGE_SIZE_MEDIUM,
-} from '../../../constants/constants';
-import { NO_PERMISSION_FOR_ACTION } from '../../../constants/HelperTextUtil';
-import { EntityType } from '../../../enums/entity.enum';
-import { SearchIndex } from '../../../enums/search.enum';
+import { ReactComponent as ClosePopoverIcon } from '../../../assets/svg/popover-close.svg';
+import { ReactComponent as SavePopoverIcon } from '../../../assets/svg/popover-save.svg';
+import { ReactComponent as EditIcon } from '../../../assets/svg/user-profile-edit.svg';
+
+import { DE_ACTIVE_COLOR } from '../../../constants/constants';
import { EntityReference } from '../../../generated/entity/type';
import { useApplicationStore } from '../../../hooks/useApplicationStore';
-import { getDomainList } from '../../../rest/domainAPI';
-import { searchData } from '../../../rest/miscAPI';
-import { formatDomainsResponse } from '../../../utils/APIUtils';
-import { Transi18next } from '../../../utils/CommonUtils';
-import {
- getEntityName,
- getEntityReferenceListFromEntities,
-} from '../../../utils/EntityUtils';
+import { getEntityName } from '../../../utils/EntityUtils';
import Fqn from '../../../utils/Fqn';
-import { getDomainPath } from '../../../utils/RouterUtils';
-import { SelectableList } from '../SelectableList/SelectableList.component';
import './domain-select-dropdown.less';
import { DomainSelectableListProps } from './DomainSelectableList.interface';
@@ -66,16 +54,21 @@ export const DomainListItemRenderer = (props: EntityReference) => {
};
const DomainSelectableList = ({
- onUpdate,
children,
- hasPermission,
- popoverProps,
- selectedDomain,
+ domains,
multiple = false,
+ onUpdate,
+ selectedDomain,
}: DomainSelectableListProps) => {
const { t } = useTranslation();
const { theme } = useApplicationStore();
const [popupVisible, setPopupVisible] = useState(false);
+ const [isSaving, setIsSaving] = useState(false);
+ const [isSelectOpen, setIsSelectOpen] = useState(false);
+ const [isDropdownOpen, setIsDropdownOpen] = useState(false);
+ const [currentlySelectedDomains, setCurrentlySelectedDomains] = useState<
+ EntityReference[]
+ >([]);
const selectedDomainsList = useMemo(() => {
if (selectedDomain) {
@@ -85,57 +78,24 @@ const DomainSelectableList = ({
return [];
}, [selectedDomain]);
- const fetchOptions = async (searchText: string, after?: string) => {
- if (searchText) {
- try {
- const res = await searchData(
- searchText,
- 1,
- PAGE_SIZE_MEDIUM,
- '',
- '',
- '',
- SearchIndex.DOMAIN
- );
-
- const data = getEntityReferenceListFromEntities(
- formatDomainsResponse(res.data.hits.hits),
- EntityType.DOMAIN
- );
+ const handleUpdate = async () => {
+ setIsSaving(true);
- return { data, paging: { total: res.data.hits.total.value } };
- } catch (error) {
- return { data: [], paging: { total: 0 } };
- }
- } else {
- try {
- const { data, paging } = await getDomainList({
- limit: PAGE_SIZE_MEDIUM,
- after: after ?? undefined,
- });
- const filterData = getEntityReferenceListFromEntities(
- data,
- EntityType.DOMAIN
- );
-
- return { data: filterData, paging };
- } catch (error) {
- return { data: [], paging: { total: 0 } };
- }
- }
- };
-
- const handleUpdate = useCallback(
- async (domains: EntityReference[]) => {
+ try {
if (multiple) {
- await onUpdate(domains);
+ await onUpdate(currentlySelectedDomains);
} else {
- await onUpdate(domains[0]);
+ await onUpdate(currentlySelectedDomains[0]);
}
+ } finally {
+ setIsSaving(false);
setPopupVisible(false);
- },
- [onUpdate, multiple]
- );
+ }
+ };
+
+ const handleClosePopup = () => {
+ setPopupVisible(false);
+ };
return (
// Used Button to stop click propagation event anywhere in the component to parent
@@ -146,61 +106,99 @@ const DomainSelectableList = ({
+
+
+
+
+
+
+
+ {t('label.domain')}
+
+
+
+
+ domain.id)}
+ maxTagCount={3}
+ maxTagPlaceholder={(omittedValues) => (
+
+ {t('label.plus-count-more', {
+ count: omittedValues.length,
+ })}
+
+ )}
+ mode="multiple"
+ options={domains?.map((domain) => ({
+ label: domain.displayName || domain.name,
+ value: domain.id,
+ }))}
+ placeholder="Please select"
+ placement="topLeft"
+ style={{ width: '100%' }}
+ onChange={(selectedIds) => {
+ const selectedDomainList = domains.filter((domain) =>
+ selectedIds.includes(domain.id)
+ );
+ setCurrentlySelectedDomains(selectedDomainList as any);
+ }}
+ />
+
+
+
+
+ }
+ size="small"
+ style={{
+ width: '30px',
+ height: '30px',
+ background: '#0950C5',
+ }}
+ type="primary"
+ onClick={handleClosePopup}
+ />
+
+
}
- values={{
- link: t('label.domain-plural'),
+ loading={isSaving}
+ size="small"
+ style={{
+ width: '30px',
+ height: '30px',
+ background: '#0950C5',
}}
+ type="primary"
+ onClick={handleUpdate}
/>
- }
- fetchOptions={fetchOptions}
- multiSelect={multiple}
- removeIconTooltipLabel={t('label.remove-entity', {
- entity: t('label.domain-lowercase'),
- })}
- searchPlaceholder={t('label.search-for-type', {
- type: t('label.domain'),
- })}
- selectedItems={selectedDomainsList}
- onCancel={() => setPopupVisible(false)}
- onUpdate={handleUpdate}
- />
+
+
}
open={popupVisible}
- overlayClassName="domain-select-popover"
- placement="bottomRight"
+ overlayClassName="profile-edit-popover-card"
+ placement="bottomLeft"
showArrow={false}
+ style={{ borderRadius: '12px' }}
trigger="click"
- onOpenChange={setPopupVisible}
- {...popoverProps}>
+ onOpenChange={setPopupVisible}>
{children ?? (
- }
- size="small"
- type="text"
+ title={t('label.edit-entity', {
+ entity: t('label.persona'),
+ })}>
+
)}
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/common/DomainSelectableList/DomainSelectableList.interface.ts b/openmetadata-ui/src/main/resources/ui/src/components/common/DomainSelectableList/DomainSelectableList.interface.ts
index 9962a54c8a3f..94b891c0af7f 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/common/DomainSelectableList/DomainSelectableList.interface.ts
+++ b/openmetadata-ui/src/main/resources/ui/src/components/common/DomainSelectableList/DomainSelectableList.interface.ts
@@ -21,4 +21,5 @@ export interface DomainSelectableListProps {
popoverProps?: PopoverProps;
selectedDomain?: EntityReference | EntityReference[];
multiple?: boolean;
+ domains: any[];
}
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/common/OwnerLabel/OwnerLabel.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/common/OwnerLabel/OwnerLabel.component.tsx
index 79bd7cc76676..144dd3cb0cd9 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/common/OwnerLabel/OwnerLabel.component.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/components/common/OwnerLabel/OwnerLabel.component.tsx
@@ -94,19 +94,17 @@ export const OwnerLabel = ({
key="profile-picture"
name={owner.name ?? ''}
type="circle"
- width="18"
+ width="24"
/>
);
const ownerLink = (
void;
+ hasPermission?: boolean;
+ ownerDisplayName?: ReactNode[];
+ placeHolder?: string;
+ maxVisibleOwners?: number;
+ multiple?: {
+ user: boolean;
+ team: boolean;
+ };
+ tooltipText?: string;
+ avatarSize?: number;
+}) => {
+ const { t } = useTranslation();
+ const [showAllOwners, setShowAllOwners] = useState(false);
+
+ const ownerElements = useMemo(() => {
+ const hasOwners = owners && owners.length > 0;
+ const visibleOwners = showAllOwners
+ ? owners
+ : owners.slice(0, maxVisibleOwners);
+ const remainingOwnersCount = owners.length - maxVisibleOwners;
+ const remainingCountLabel = `+ ${remainingOwnersCount}`;
+
+ return (
+
+ {hasOwners ? (
+
owner?.inherited)) },
+ className
+ )}>
+
+ {visibleOwners.map((owner) => (
+
+ ))}
+ {remainingOwnersCount > 0 && (
+
+ {t('label.plus-symbol')}
+ {remainingOwnersCount}
+
+ )}
+
+ {/* {visibleOwners.map((owner, index) => {
+ const displayName = getEntityName(owner);
+ const profilePicture =
+ owner.type === OwnerType.TEAM ? (
+
+ ) : (
+
+ );
+
+ const ownerLink = (
+
+ {ownerDisplayName?.[index] ?? displayName}
+
+ );
+
+ const inheritedIcon = owner?.inherited ? (
+
+
+
+ ) : null;
+
+ return (
+
+
+ {profilePicture}
+
+ {ownerLink}
+ {inheritedIcon && (
+
{inheritedIcon}
+ )}
+
+ );
+ })} */}
+ {/* {remainingOwnersCount > 0 && (
+
setShowAllOwners(!showAllOwners)}>
+ {showAllOwners ? t('label.less') : remainingCountLabel}
+
+ )} */}
+
+ ) : (
+
+
+
+
+
+ {placeHolder ??
+ t('label.no-entity', { entity: t('label.owner-plural') })}
+
+
+ )}
+ {onUpdate && (
+
{
+ onUpdate(updatedUsers);
+ }}
+ />
+ )}
+
+ );
+ }, [
+ owners,
+ className,
+ onUpdate,
+ hasPermission,
+ showAllOwners,
+ maxVisibleOwners,
+ placeHolder,
+ t,
+ ownerDisplayName,
+ ]);
+
+ return ownerElements;
+};
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/common/OwnerLabel/owner-label.less b/openmetadata-ui/src/main/resources/ui/src/components/common/OwnerLabel/owner-label.less
index 14fcaab6447b..bc42f6967463 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/common/OwnerLabel/owner-label.less
+++ b/openmetadata-ui/src/main/resources/ui/src/components/common/OwnerLabel/owner-label.less
@@ -38,3 +38,11 @@
text-decoration: underline;
}
}
+.extra-avatar {
+ background-color: #f9f5ff;
+ color: #7f56d9;
+ font-size: 12px;
+ font-style: normal;
+ font-weight: 500;
+ line-height: 18px;
+}
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/common/RichTextEditor/RichTextEditor.tsx b/openmetadata-ui/src/main/resources/ui/src/components/common/RichTextEditor/RichTextEditor.tsx
index f661b74c1029..672ca4ef6cea 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/common/RichTextEditor/RichTextEditor.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/components/common/RichTextEditor/RichTextEditor.tsx
@@ -52,7 +52,10 @@ const RichTextEditor = forwardRef(
}));
return (
-
+
= ({
showReadMoreBtn = true,
maxLength = DESCRIPTION_MAX_PREVIEW_CHARACTERS,
isDescriptionExpanded = false,
- reducePreviewLineClass,
}) => {
const { t, i18n } = useTranslation();
const [content, setContent] = useState('');
-
const [readMore, setReadMore] = useState(false);
const handleReadMoreToggle = () => setReadMore((pre) => !pre);
@@ -47,18 +44,6 @@ const RichTextEditorPreviewerV1: FC = ({
[enableSeeMoreVariant, markdown, maxLength]
);
- /**
- * if hasReadMore is true then value will be based on read more state
- * else value will be content
- */
- const viewerValue = useMemo(() => {
- if (hasReadMore) {
- return readMore ? content : `${getTrimmedContent(content, maxLength)}...`;
- }
-
- return content;
- }, [hasReadMore, readMore, maxLength, content]);
-
useEffect(() => {
setContent(formatContent(markdown, 'client'));
}, [markdown]);
@@ -83,18 +68,19 @@ const RichTextEditorPreviewerV1: FC = ({
className={classNames(
'markdown-parser',
textVariant,
- readMore ? '' : reducePreviewLineClass
+ readMore ? '' : 'text-clamp-2'
)}
data-testid="markdown-parser">
-
+
{hasReadMore && showReadMoreBtn && (
- {readMore ? t('label.less-lowercase') : t('label.more-lowercase')}
+ {readMore ? t('label.view-less') : t('label.view-more')}
)}
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/common/RichTextEditor/rich-text-editor-previewerV1.less b/openmetadata-ui/src/main/resources/ui/src/components/common/RichTextEditor/rich-text-editor-previewerV1.less
index 32831c1628a8..4200cafe0451 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/common/RichTextEditor/rich-text-editor-previewerV1.less
+++ b/openmetadata-ui/src/main/resources/ui/src/components/common/RichTextEditor/rich-text-editor-previewerV1.less
@@ -18,18 +18,19 @@
margin: 0px;
line-height: 0px;
height: 16px;
+ color: #175cd3 !important;
}
.ant-btn:focus,
.ant-btn:hover {
- color: @primary-color;
+ color: #175cd3 !important;
}
&.text-grey-muted {
.markdown-parser {
.om-block-editor {
p {
- color: @grey-4;
+ color: #535862 !important;
}
ul li::before {
background-color: @grey-4;
@@ -49,3 +50,26 @@
}
}
}
+// .block-editor-wrapper .tiptap.ProseMirror p:first-child{
+// display: none;
+// }
+// .block-editor-wrapper .tiptap.ProseMirror p:last-child{
+// display: none;
+// }
+// .block-editor-wrapper .tiptap.ProseMirror p:has(span:empty) {
+// display: none;
+// }
+// .block-editor-wrapper .tiptap.ProseMirror p:has(br.ProseMirror-trailingBreak) {
+// display: none;
+// }
+// p {
+// color: #535862 !important;
+// }
+.text-clamp-2 {
+ display: -webkit-box;
+ -webkit-line-clamp: 2;
+ -webkit-box-orient: vertical;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: normal;
+}
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/common/SummaryTagsDescription/SummaryTagsDescription.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/common/SummaryTagsDescription/SummaryTagsDescription.component.tsx
index 87a58c086a76..316a48520f41 100644
--- a/openmetadata-ui/src/main/resources/ui/src/components/common/SummaryTagsDescription/SummaryTagsDescription.component.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/components/common/SummaryTagsDescription/SummaryTagsDescription.component.tsx
@@ -10,26 +10,32 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-import { Col, Divider, Row, Typography } from 'antd';
+import { Col, Row, Typography } from 'antd';
import React from 'react';
import { useTranslation } from 'react-i18next';
import TagsViewer from '../../../components/Tag/TagsViewer/TagsViewer';
import { BasicEntityInfo } from '../../Explore/EntitySummaryPanel/SummaryList/SummaryList.interface';
-import { EntityUnion } from '../../Explore/ExplorePage.interface';
import RichTextEditorPreviewerV1 from '../RichTextEditor/RichTextEditorPreviewerV1';
+export interface EntityWithDescription {
+ description?: string;
+}
+
const SummaryTagsDescription = ({
tags = [],
entityDetail,
}: {
tags: BasicEntityInfo['tags'];
- entityDetail: EntityUnion;
+ entityDetail: EntityWithDescription;
}) => {
const { t } = useTranslation();
return (
<>
-
+
-
-
-
+
void;
+ customClassName?: string;
}
const DescriptionTask: FC = ({
@@ -37,6 +39,7 @@ const DescriptionTask: FC = ({
isTaskActionEdit,
hasEditAccess,
onChange,
+ customClassName,
}) => {
const { task } = taskThread;
const { t } = useTranslation();
@@ -91,7 +94,9 @@ const DescriptionTask: FC = ({
};
return (
-
+
{isTaskClosed ? (
getDiffView()
diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/TasksPage/shared/DescriptionTaskNew.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/TasksPage/shared/DescriptionTaskNew.tsx
new file mode 100644
index 000000000000..7791c3672519
--- /dev/null
+++ b/openmetadata-ui/src/main/resources/ui/src/pages/TasksPage/shared/DescriptionTaskNew.tsx
@@ -0,0 +1,156 @@
+/*
+ * 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.
+ */
+
+import { Typography } from 'antd';
+import classNames from 'classnames';
+import { isEqual } from 'lodash';
+import React, { FC, Fragment } from 'react';
+import { useTranslation } from 'react-i18next';
+import RichTextEditor from '../../../components/common/RichTextEditor/RichTextEditor';
+import {
+ TaskType,
+ Thread,
+ ThreadTaskStatus,
+} from '../../../generated/entity/feed/thread';
+import { getDescriptionDiff } from '../../../utils/TasksUtils';
+import { DescriptionTabs } from './DescriptionTabs';
+import { DiffViewNew } from './DiffViewNew';
+
+interface DescriptionTaskProps {
+ taskThread: Thread;
+ isTaskActionEdit: boolean;
+ hasEditAccess: boolean;
+ onChange?: (value: string) => void;
+ customClassName?: string;
+ showDescTitle?: boolean;
+}
+
+const DescriptionTaskNew: FC = ({
+ taskThread,
+ isTaskActionEdit,
+ hasEditAccess,
+ onChange,
+ customClassName,
+ showDescTitle = false,
+}) => {
+ const { task } = taskThread;
+ const { t } = useTranslation();
+
+ const isRequestDescription = isEqual(task?.type, TaskType.RequestDescription);
+
+ const isUpdateDescription = isEqual(task?.type, TaskType.UpdateDescription);
+
+ const isTaskClosed = isEqual(task?.status, ThreadTaskStatus.Closed);
+
+ const getDiffView = () => {
+ const oldValue = task?.oldValue;
+ const newValue = task?.newValue;
+ if (!oldValue && !newValue) {
+ return (
+
+
+ {t('label.no-entity', { entity: t('label.description') })}
+
+
+ );
+ } else {
+ return (
+
+ );
+ }
+ };
+
+ /**
+ *
+ * @returns Suggested description diff
+ */
+ const getSuggestedDescriptionDiff = () => {
+ const newDescription = task?.suggestion;
+ const oldDescription = task?.oldValue;
+
+ const diffs = getDescriptionDiff(
+ oldDescription || '',
+ newDescription || ''
+ );
+
+ return !newDescription && !oldDescription ? (
+
+ {t('label.no-entity', { entity: t('label.suggestion') })}
+
+ ) : (
+
+ );
+ };
+
+ return (
+
+
+ {isTaskClosed ? (
+ getDiffView()
+ ) : (
+
+ {isRequestDescription && (
+
+ {isTaskActionEdit && hasEditAccess ? (
+
+ ) : (
+
+ {getSuggestedDescriptionDiff()}
+
+ )}
+
+ )}
+
+ {isUpdateDescription && (
+
+ {isTaskActionEdit && hasEditAccess ? (
+
+ ) : (
+
+ {getSuggestedDescriptionDiff()}
+
+ )}
+
+ )}
+
+ )}
+
+
+ );
+};
+
+export default DescriptionTaskNew;
diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/TasksPage/shared/DiffViewNew.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/TasksPage/shared/DiffViewNew.tsx
new file mode 100644
index 000000000000..885ba301dddc
--- /dev/null
+++ b/openmetadata-ui/src/main/resources/ui/src/pages/TasksPage/shared/DiffViewNew.tsx
@@ -0,0 +1,165 @@
+/*
+ * 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.
+ */
+
+import classNames from 'classnames';
+import { Change } from 'diff';
+import { uniqueId } from 'lodash';
+import React, { useState } from 'react';
+import { useTranslation } from 'react-i18next';
+import {
+ Thread,
+ ThreadTaskStatus,
+} from '../../../generated/entity/feed/thread';
+
+export const DiffViewNew = ({
+ diffArr,
+ className,
+ showDescTitle = false,
+ task,
+}: {
+ diffArr: Change[];
+ className?: string;
+ showDescTitle?: boolean;
+ task?: Thread;
+}) => {
+ const { t } = useTranslation();
+ const [expanded, setExpanded] = useState(false);
+
+ // function stripHtml(html: string) {
+ // // Remove all HTML tags except
+ // return html.replace(/<(?!\/?strong\b)[^>]+>/g, '').trim();
+ // }
+ function stripHtml(html: string) {
+ // Preserve tags and their content, removing all other HTML tags
+ return html
+ .replace(/<(?!\/?strong\b)[^>]+>/g, '') // Keep tags, remove others
+ .replace(/\*\*(.*?)\*\*/g, '$1') // Convert **bold** to bold
+ .trim();
+ }
+
+ const elements = diffArr.map((diff) => {
+ const diffValue = stripHtml(diff.value);
+ if (diff.added) {
+ return (
+
+ );
+ }
+ if (diff.removed) {
+ return (
+
+ );
+ }
+
+ return (
+
+ );
+ });
+
+ return (
+
+ {showDescTitle && (
+
{t('label.description')}
+ )}
+
+ {diffArr.length ? (
+ <>
+
+ {elements}
+
+ {!expanded && diffArr.length > 2 && (
+ setExpanded(true)}>
+ {t('label.view-more')}
+
+ )}
+ {expanded && diffArr.length > 2 && (
+ setExpanded(false)}>
+ {t('label.view-less')}
+
+ )}
+ >
+ ) : (
+
+ {t('label.no-diff-available')}
+
+ )}
+
+
+ );
+};
diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/TasksPage/shared/TagsTask.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/TasksPage/shared/TagsTask.tsx
index eb4877cbff5c..1ca6946df63c 100644
--- a/openmetadata-ui/src/main/resources/ui/src/pages/TasksPage/shared/TagsTask.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/pages/TasksPage/shared/TagsTask.tsx
@@ -30,7 +30,7 @@ interface TagsTaskProps {
isTaskActionEdit: boolean;
hasEditAccess: boolean;
value?: TagLabel[];
- onChange: (newTags: TagLabel[]) => void;
+ onChange?: (newTags: TagLabel[]) => void;
}
const TagsTask: FC = ({
diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/UserPage/UserPage.component.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/UserPage/UserPage.component.tsx
index d83d13aac3d0..ebb990afd4c8 100644
--- a/openmetadata-ui/src/main/resources/ui/src/pages/UserPage/UserPage.component.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/pages/UserPage/UserPage.component.tsx
@@ -26,7 +26,8 @@ import {
import { useTranslation } from 'react-i18next';
import { useHistory } from 'react-router-dom';
import Loader from '../../components/common/Loader/Loader';
-import Users from '../../components/Settings/Users/Users.component';
+import PageLayoutV1 from '../../components/PageLayoutV1/PageLayoutV1';
+import Users from '../../components/Settings/Users/UsersNew.component';
import { ROUTES } from '../../constants/constants';
import { TabSpecificField } from '../../enums/entity.enum';
import { User } from '../../generated/entity/teams/user';
@@ -187,16 +188,18 @@ const UserPage = () => {
}
return (
-
+
+
+
);
};
diff --git a/openmetadata-ui/src/main/resources/ui/src/styles/app.less b/openmetadata-ui/src/main/resources/ui/src/styles/app.less
index 7939f76e97d3..42ca3b9e1014 100644
--- a/openmetadata-ui/src/main/resources/ui/src/styles/app.less
+++ b/openmetadata-ui/src/main/resources/ui/src/styles/app.less
@@ -19,7 +19,6 @@ body {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
background: @body-bg-color;
- font-family: 'Poppins', sans-serif;
font-feature-settings: normal !important;
}
@@ -128,7 +127,12 @@ a[href].link-text-grey,
background: initial;
}
}
-
+.remove-button-default-styling:hover {
+ background: none !important;
+ box-shadow: none !important;
+ border: none !important;
+ color: inherit !important;
+}
// used in glossary + query right panel, to keep both consistent
.right-panel-label {
font-size: 14px;
@@ -274,6 +278,13 @@ a[href].link-text-grey,
margin-right: auto;
margin-left: auto;
}
+
+.bg-white {
+ background-color: @white;
+}
+.bg-transparent {
+ background-color: transparent;
+}
.bg-body-main {
background: @body-bg-color;
}
@@ -287,7 +298,7 @@ a[href].link-text-grey,
background-color: @primary-1;
}
.bg-grey {
- background-color: @border-color;
+ background-color: #f5f5f5;
}
.bg-grey-1 {
background-color: @grey-1;
@@ -306,13 +317,6 @@ a[href].link-text-grey,
background-color: @grey-1;
}
-.bg-white {
- background-color: @white;
-}
-.bg-transparent {
- background-color: transparent;
-}
-
.activeCategory {
border-left: 2px solid @primary-color;
background: @primary-1;
@@ -610,23 +614,73 @@ a[href].link-text-grey,
/* Diff style */
.diff-added {
- background: @success-background-color;
+ // background: @success-background-color;
width: fit-content;
color: @success-color;
* {
color: @success-color;
}
}
+.diff-added-new {
+ font-family: Inter, sans-serif;
+ text-decoration: none;
+ font-size: 14px;
+ font-style: normal;
+ font-weight: 400;
+ line-height: 20px;
+ width: fit-content;
+ color: #027a48;
+}
-.diff-removed {
- text-decoration: line-through;
+.diff-removed-new {
+ font-family: Inter, sans-serif;
+ font-size: 14px;
+ font-style: normal;
+ font-weight: 400;
+ line-height: 20px;
width: fit-content;
- color: @text-grey-muted;
- * {
- color: @text-grey-muted;
- }
+ text-decoration: line-through;
+ text-decoration-thickness: 1.5px;
+ text-decoration-color: #f97066;
+ text-decoration-skip-ink: auto;
+ color: #f97066;
+}
+.diff-normal-new {
+ font-family: Inter, sans-serif;
+ font-size: 14px;
+ font-style: normal;
+ font-weight: 400;
+ line-height: 20px;
+ color: #535862;
+}
+.diff-normal-new strong {
+ font-weight: 600;
+ color: #000; /* Adjust color if needed */
+}
+.clamp-text-2 {
+ display: -webkit-box;
+ -webkit-line-clamp: 2;
+ -webkit-box-orient: vertical;
+ overflow: hidden;
+ text-overflow: clip;
}
+.clamp-text-3 {
+ display: -webkit-box;
+ -webkit-line-clamp: 3;
+ -webkit-box-orient: vertical;
+ overflow: hidden;
+ text-overflow: clip;
+}
+.text-expand {
+ font-family: Inter, sans-serif;
+ color: @primary-color;
+ font-size: 14px;
+ font-style: normal;
+ font-weight: 400;
+ line-height: 20px;
+ cursor: pointer;
+}
.diff-description {
color: @success-color;
}
@@ -852,3 +906,56 @@ a[href].link-text-grey,
margin-right: 64px;
}
}
+.action-required-card {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ border-radius: 12px;
+ border: 0.8px solid #dfdfdf;
+ padding: 16px;
+ background: linear-gradient(
+ 90deg,
+ rgba(85, 155, 238, 0.25) 0%,
+ rgba(96, 167, 251, 0.25) 19%,
+ rgba(245, 245, 245, 0.25) 100%
+ );
+ box-shadow: none;
+
+ .action-required-text {
+ font-size: 16px;
+ font-weight: 400;
+ color: #333;
+ line-height: 24px;
+ }
+
+ .action-buttons {
+ display: flex;
+ gap: 8px;
+ margin-left: 200px;
+ }
+
+ .approve-button {
+ background-color: #2f74eb;
+ border-color: #2f74eb;
+ border-radius: 8px;
+ font-weight: 500;
+ }
+
+ .approve-button:hover {
+ background-color: #1f67e9;
+ border-color: #1f67e9;
+ }
+
+ .reject-button {
+ background-color: #d93025;
+ border-color: #d93025;
+ color: white;
+ border-radius: 8px;
+ font-weight: 500;
+ }
+
+ .reject-button:hover {
+ background-color: #b1271c;
+ border-color: #b1271c;
+ }
+}
diff --git a/openmetadata-ui/src/main/resources/ui/src/styles/border.less b/openmetadata-ui/src/main/resources/ui/src/styles/border.less
index c8073f6dc58a..6d5e86fd36d6 100644
--- a/openmetadata-ui/src/main/resources/ui/src/styles/border.less
+++ b/openmetadata-ui/src/main/resources/ui/src/styles/border.less
@@ -47,3 +47,7 @@
.border-danger {
border: 1px solid @error-color;
}
+
+.border-radius-card {
+ border-radius: @card-radius;
+}
diff --git a/openmetadata-ui/src/main/resources/ui/src/styles/fonts.less b/openmetadata-ui/src/main/resources/ui/src/styles/fonts.less
index 719409e4d59c..5d443daef419 100644
--- a/openmetadata-ui/src/main/resources/ui/src/styles/fonts.less
+++ b/openmetadata-ui/src/main/resources/ui/src/styles/fonts.less
@@ -166,3 +166,15 @@ a.ant-typography,
.line-height-16 {
line-height: 16px;
}
+
+// =============================== New Design System ===============================
+
+.text-secondary-new {
+ color: #414651;
+}
+
+.border-secondary-new {
+ border-color: #d5d7da;
+}
+
+// =============================== End of New Design System ===============================
diff --git a/openmetadata-ui/src/main/resources/ui/src/styles/index.ts b/openmetadata-ui/src/main/resources/ui/src/styles/index.ts
index c707587ab6ae..9ad3fd7eb7ab 100644
--- a/openmetadata-ui/src/main/resources/ui/src/styles/index.ts
+++ b/openmetadata-ui/src/main/resources/ui/src/styles/index.ts
@@ -16,6 +16,15 @@ import '@fontsource/poppins/300.css'; // Font 300
import '@fontsource/poppins/500.css'; // Font 500
import '@fontsource/poppins/600.css'; // Font 600
import '@fontsource/source-code-pro'; // Font 400
+
+import '@fontsource/inter'; // Font 400
+import '@fontsource/inter/400.css'; // Font 400
+import '@fontsource/inter/500.css'; // Font 500
+import '@fontsource/inter/600.css'; // Font 600
+import '@fontsource/inter/700.css'; // Font 700
+import '@fontsource/inter/800.css'; // Font 800
+import '@fontsource/inter/900.css'; // Font 900
+
import 'react-awesome-query-builder/lib/css/styles.css';
import 'reactflow/dist/base.css';
import 'reactflow/dist/style.css';
diff --git a/openmetadata-ui/src/main/resources/ui/src/styles/position.less b/openmetadata-ui/src/main/resources/ui/src/styles/position.less
index bf41a30eb454..994238ddfdc5 100644
--- a/openmetadata-ui/src/main/resources/ui/src/styles/position.less
+++ b/openmetadata-ui/src/main/resources/ui/src/styles/position.less
@@ -124,6 +124,9 @@
.gap-4 {
gap: 16px;
}
+.gap-5 {
+ gap: 20px;
+}
.gap-6 {
gap: 24px;
}
diff --git a/openmetadata-ui/src/main/resources/ui/src/styles/spacing.less b/openmetadata-ui/src/main/resources/ui/src/styles/spacing.less
index 108a1cdef543..70b864c50d6a 100644
--- a/openmetadata-ui/src/main/resources/ui/src/styles/spacing.less
+++ b/openmetadata-ui/src/main/resources/ui/src/styles/spacing.less
@@ -396,6 +396,18 @@
.p-lg {
padding: @padding-lg;
}
+
+.p-box {
+ padding: 20px;
+}
+.p-x-box {
+ padding-right: 20px;
+ padding-left: 20px;
+}
+.p-y-box {
+ padding-top: 20px;
+ padding-bottom: 20px;
+}
.p-x-xss {
padding-right: @padding-xss;
padding-left: @padding-xss;
diff --git a/openmetadata-ui/src/main/resources/ui/src/styles/variables.less b/openmetadata-ui/src/main/resources/ui/src/styles/variables.less
index e1f685b0f902..d6e37172f283 100644
--- a/openmetadata-ui/src/main/resources/ui/src/styles/variables.less
+++ b/openmetadata-ui/src/main/resources/ui/src/styles/variables.less
@@ -70,11 +70,13 @@
@grey-5: #fbfbfb;
@grey-6: #f9f9f9;
@grey-7: #9ca3af;
+@grey-8: #535862;
@text-grey-muted: @grey-4;
-@font-size-base: 14px;
+@font-size-base: 16px;
@box-shadow-base: 0px 2px 10px rgba(0, 0, 0, 0.12);
@white: #fff;
@border-radius-base: 4px;
+@border-radius-xs: 8px;
@checkbox-size: 14px;
@switch-height: 16px;
@switch-sm-height: 12px;
@@ -111,6 +113,9 @@
@om-navbar-height: ~'var(--ant-navbar-height)';
@sidebar-width: 60px;
+// Font
+@font-family: 'Inter', 'Poppins', sans-serif;
+
// Sizing
@page-height: calc(100vh - @om-navbar-height);
@left-side-panel-width: 230px;
@@ -136,6 +141,10 @@
@explore-page-height: calc(100vh - @om-navbar-height - 49px);
@welcome-page-height: calc(100vh - 112px);
+@profile-page-sidebar: calc(100vh - @om-navbar-height - 40px);
+@profile-entity-details-tab-height: calc(@profile-page-sidebar - 64px);
+@user-profile-page-panel-height: calc(100vh - @om-navbar-height - 108px);
+
// 48px - navbar height
@welcome-page-height: calc(100vh - 48px - @om-navbar-height);
@@ -176,3 +185,5 @@
@success-bg-color: rgb(from @success-color r g b / 0.1);
@warning-bg-color: rgb(from @warning-color r g b / 0.1);
@info-bg-color: rgb(from @info-color r g b / 0.1);
+
+@card-radius: 12px;
diff --git a/openmetadata-ui/src/main/resources/ui/src/utils/DomainUtils.tsx b/openmetadata-ui/src/main/resources/ui/src/utils/DomainUtils.tsx
index a5b9e262b7e1..3789f73324f5 100644
--- a/openmetadata-ui/src/main/resources/ui/src/utils/DomainUtils.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/utils/DomainUtils.tsx
@@ -171,11 +171,12 @@ export const renderDomainLink = (
) => (
{isUndefined(domainDisplayName) ? getEntityName(domain) : domainDisplayName}
diff --git a/openmetadata-ui/src/main/resources/ui/src/utils/EntitySummaryPanelUtils.tsx b/openmetadata-ui/src/main/resources/ui/src/utils/EntitySummaryPanelUtils.tsx
index 37b8674f0c32..e626e58c600a 100644
--- a/openmetadata-ui/src/main/resources/ui/src/utils/EntitySummaryPanelUtils.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/utils/EntitySummaryPanelUtils.tsx
@@ -1,3 +1,4 @@
+/* eslint-disable no-case-declarations */
/*
* Copyright 2023 Collate.
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -11,30 +12,54 @@
* limitations under the License.
*/
-import Icon from '@ant-design/icons/lib/components/Icon';
-import { Typography } from 'antd';
+import Icon from '@ant-design/icons';
+import { Col, Row, Typography } from 'antd';
import { get, isEmpty, isUndefined } from 'lodash';
import React from 'react';
import { Link } from 'react-router-dom';
import { SearchedDataProps } from '../../src/components/SearchedData/SearchedData.interface';
import { ReactComponent as IconExternalLink } from '../assets/svg/external-links.svg';
+import SchemaEditor from '../components/Database/SchemaEditor/SchemaEditor';
+import APIEndpointSummary from '../components/Explore/EntitySummaryPanel/APIEndpointSummary/APIEndpointSummary';
+import DataProductSummary from '../components/Explore/EntitySummaryPanel/DataProductSummary/DataProductSummary.component';
+import GlossaryTermSummary from '../components/Explore/EntitySummaryPanel/GlossaryTermSummary/GlossaryTermSummary.component';
+import SummaryList from '../components/Explore/EntitySummaryPanel/SummaryList/SummaryList.component';
import {
BasicEntityInfo,
HighlightedTagLabel,
} from '../components/Explore/EntitySummaryPanel/SummaryList/SummaryList.interface';
+import TagsSummary from '../components/Explore/EntitySummaryPanel/TagsSummary/TagsSummary.component';
+import MetricExpression from '../components/Metric/MetricExpression/MetricExpression';
+import RelatedMetrics from '../components/Metric/RelatedMetrics/RelatedMetrics';
import { ICON_DIMENSION, NO_DATA_PLACEHOLDER } from '../constants/constants';
import { SummaryListHighlightKeys } from '../constants/EntitySummaryPanelUtils.constant';
+import { CSMode } from '../enums/codemirror.enum';
import { EntityType } from '../enums/entity.enum';
import { SummaryEntityType } from '../enums/EntitySummary.enum';
+import { Tag } from '../generated/entity/classification/tag';
+import { APIEndpoint } from '../generated/entity/data/apiEndpoint';
import { Chart } from '../generated/entity/data/chart';
-import { TagLabel } from '../generated/entity/data/container';
-import { MlFeature } from '../generated/entity/data/mlmodel';
-import { Task } from '../generated/entity/data/pipeline';
-import { Column, TableConstraint } from '../generated/entity/data/table';
-import { Field } from '../generated/entity/data/topic';
+import { Container, TagLabel } from '../generated/entity/data/container';
+import { Dashboard } from '../generated/entity/data/dashboard';
+import { DashboardDataModel } from '../generated/entity/data/dashboardDataModel';
+import { Database } from '../generated/entity/data/database';
+import { GlossaryTerm } from '../generated/entity/data/glossaryTerm';
+import { Metric } from '../generated/entity/data/metric';
+import { MlFeature, Mlmodel } from '../generated/entity/data/mlmodel';
+import { Pipeline, Task } from '../generated/entity/data/pipeline';
+import { SearchIndex } from '../generated/entity/data/searchIndex';
+import {
+ StoredProcedure,
+ StoredProcedureCodeObject,
+} from '../generated/entity/data/storedProcedure';
+import { Column, Table, TableConstraint } from '../generated/entity/data/table';
+import { Field, Topic } from '../generated/entity/data/topic';
+import { DataProduct } from '../generated/entity/domains/dataProduct';
import { EntityReference } from '../generated/tests/testCase';
import entityUtilClassBase from './EntityUtilClassBase';
import { getEntityName } from './EntityUtils';
+import i18n from './i18next/LocalUtil';
+import searchClassBase from './SearchClassBase';
import { stringToHTML } from './StringsUtils';
const { Text } = Typography;
@@ -350,3 +375,281 @@ export const getFormattedEntityData = (
return [];
};
+
+export const getEntityChildDetails = (
+ entityType: EntityType,
+ entityInfo: SearchedDataProps['data'][number]['_source'],
+ highlights?: SearchedDataProps['data'][number]['highlight']
+) => {
+ let childComponent;
+ let heading;
+ switch (entityType) {
+ case EntityType.TABLE:
+ heading = i18n.t('label.schema');
+ childComponent = (
+
+ );
+
+ break;
+ case EntityType.TOPIC:
+ heading = i18n.t('label.schema');
+ childComponent = isEmpty(
+ (entityInfo as Topic).messageSchema?.schemaFields
+ ) ? (
+
+
+ {i18n.t('message.no-data-available')}
+
+
+ ) : (
+
+ );
+
+ break;
+ case EntityType.PIPELINE:
+ heading = i18n.t('label.task-plural');
+ childComponent = (
+
+ );
+
+ break;
+ case EntityType.DASHBOARD:
+ const formattedChartsData: BasicEntityInfo[] = getFormattedEntityData(
+ SummaryEntityType.CHART,
+ (entityInfo as Dashboard).charts,
+ highlights
+ );
+
+ const formattedDataModelData: BasicEntityInfo[] = getFormattedEntityData(
+ SummaryEntityType.COLUMN,
+ (entityInfo as Dashboard).dataModels,
+ highlights
+ );
+
+ return (
+ <>
+
+
+
+ {i18n.t('label.chart-plural')}
+
+
+
+
+
+
+
+
+
+
+ {i18n.t('label.data-model-plural')}
+
+
+
+
+
+
+ >
+ );
+
+ case EntityType.MLMODEL:
+ heading = i18n.t('label.feature-plural');
+ childComponent = (
+
+ );
+
+ break;
+
+ case EntityType.CONTAINER:
+ heading = i18n.t('label.schema');
+ childComponent = (
+
+ );
+
+ break;
+
+ case EntityType.DASHBOARD_DATA_MODEL:
+ heading = i18n.t('label.column-plural');
+ childComponent = (
+
+ );
+
+ break;
+ case EntityType.STORED_PROCEDURE:
+ heading = i18n.t('label.code');
+ childComponent = (
+
+ );
+
+ break;
+ case EntityType.SEARCH_INDEX:
+ heading = i18n.t('label.field-plural');
+ childComponent = (
+
+ );
+
+ break;
+ case EntityType.API_ENDPOINT:
+ return (
+
+ );
+
+ case EntityType.METRIC:
+ heading = ;
+ childComponent = (
+
+ );
+
+ break;
+ case EntityType.DATABASE:
+ heading = i18n.t('label.schema');
+ childComponent = (
+
+ );
+
+ break;
+ case EntityType.CHART:
+ heading = i18n.t('label.dashboard-plural');
+ childComponent = (
+
+ );
+
+ break;
+ case EntityType.DATA_PRODUCT:
+ return (
+
+ );
+ case EntityType.API_SERVICE:
+ return (
+
+ );
+ case EntityType.GLOSSARY_TERM:
+ case EntityType.GLOSSARY:
+ return (
+
+ );
+ case EntityType.TAG:
+ return (
+
+ );
+
+ case EntityType.DATABASE_SERVICE:
+ case EntityType.MESSAGING_SERVICE:
+ case EntityType.DASHBOARD_SERVICE:
+ case EntityType.PIPELINE_SERVICE:
+ case EntityType.MLMODEL_SERVICE:
+ case EntityType.SEARCH_SERVICE:
+ case EntityType.STORAGE_SERVICE:
+ case EntityType.API_COLLECTION:
+ case EntityType.DATABASE_SCHEMA:
+ return null;
+ default:
+ return searchClassBase.getEntitySummaryComponent(entityInfo);
+ }
+
+ return (
+
+
+
+ {heading}
+
+
+ {childComponent}
+
+ );
+};
diff --git a/openmetadata-ui/src/main/resources/ui/src/utils/EntityUtils.tsx b/openmetadata-ui/src/main/resources/ui/src/utils/EntityUtils.tsx
index e73b0652fb6e..f748fd26f04e 100644
--- a/openmetadata-ui/src/main/resources/ui/src/utils/EntityUtils.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/utils/EntityUtils.tsx
@@ -29,11 +29,11 @@ import { OwnerLabel } from '../components/common/OwnerLabel/OwnerLabel.component
import QueryCount from '../components/common/QueryCount/QueryCount.component';
import { TitleLink } from '../components/common/TitleBreadcrumb/TitleBreadcrumb.interface';
import { DataAssetsWithoutServiceField } from '../components/DataAssets/DataAssetsHeader/DataAssetsHeader.interface';
+import { DataAssetSummaryPanelProps } from '../components/DataAssetSummaryPanel/DataAssetSummaryPanel.interface';
import { TableProfilerTab } from '../components/Database/Profiler/ProfilerDashboard/profilerDashboard.interface';
import { QueryVoteType } from '../components/Database/TableQueries/TableQueries.interface';
import {
EntityServiceUnion,
- EntityUnion,
EntityWithServices,
} from '../components/Explore/ExplorePage.interface';
import {
@@ -424,7 +424,7 @@ const getTopicOverview = (topicDetails: Topic) => {
} = topicDetails;
const overview: BasicEntityOverviewInfo[] = [
- ...getCommonOverview({ domain }, false),
+ ...getCommonOverview({ domain, owners: topicDetails.owners }),
{
name: i18next.t('label.partition-plural'),
value: partitions ?? NO_DATA,
@@ -1167,65 +1167,80 @@ const getMetricOverview = (metric: Metric) => {
export const getEntityOverview = (
type: string,
- entityDetail: EntityUnion,
+ entityDetail: DataAssetSummaryPanelProps['dataAsset'],
additionalInfo?: Record
): Array => {
switch (type) {
- case ExplorePageTabs.TABLES: {
+ case ExplorePageTabs.TABLES:
+ case EntityType.TABLE: {
return getTableOverview(entityDetail as Table, additionalInfo);
}
- case ExplorePageTabs.TOPICS: {
+ case ExplorePageTabs.TOPICS:
+ case EntityType.TOPIC: {
return getTopicOverview(entityDetail as Topic);
}
- case ExplorePageTabs.PIPELINES: {
+ case ExplorePageTabs.PIPELINES:
+ case EntityType.PIPELINE: {
return getPipelineOverview(entityDetail as Pipeline);
}
- case ExplorePageTabs.DASHBOARDS: {
+ case ExplorePageTabs.DASHBOARDS:
+ case EntityType.DASHBOARD: {
return getDashboardOverview(entityDetail as Dashboard);
}
- case ExplorePageTabs.SEARCH_INDEX: {
+ case ExplorePageTabs.SEARCH_INDEX:
+ case EntityType.SEARCH_INDEX: {
return getSearchIndexOverview(entityDetail as SearchIndexEntity);
}
- case ExplorePageTabs.MLMODELS: {
+ case ExplorePageTabs.MLMODELS:
+ case EntityType.MLMODEL: {
return getMlModelOverview(entityDetail as Mlmodel);
}
- case ExplorePageTabs.CONTAINERS: {
+ case ExplorePageTabs.CONTAINERS:
+ case EntityType.CONTAINER: {
return getContainerOverview(entityDetail as Container);
}
- case ExplorePageTabs.CHARTS: {
+ case ExplorePageTabs.CHARTS:
+ case EntityType.CHART: {
return getChartOverview(entityDetail as Chart);
}
- case ExplorePageTabs.DASHBOARD_DATA_MODEL: {
+ case ExplorePageTabs.DASHBOARD_DATA_MODEL:
+ case EntityType.DASHBOARD_DATA_MODEL: {
return getDataModelOverview(entityDetail as DashboardDataModel);
}
- case ExplorePageTabs.STORED_PROCEDURE: {
+ case ExplorePageTabs.STORED_PROCEDURE:
+ case EntityType.STORED_PROCEDURE: {
return getStoredProcedureOverview(entityDetail as StoredProcedure);
}
- case ExplorePageTabs.DATABASE: {
+ case ExplorePageTabs.DATABASE:
+ case EntityType.DATABASE: {
return getDatabaseOverview(entityDetail as Database);
}
- case ExplorePageTabs.DATABASE_SCHEMA: {
+ case ExplorePageTabs.DATABASE_SCHEMA:
+ case EntityType.DATABASE_SCHEMA: {
return getDatabaseSchemaOverview(entityDetail as DatabaseSchema);
}
- case ExplorePageTabs.API_COLLECTION: {
+ case ExplorePageTabs.API_COLLECTION:
+ case EntityType.API_COLLECTION: {
return getApiCollectionOverview(entityDetail as APICollection);
}
- case ExplorePageTabs.API_ENDPOINT: {
+ case ExplorePageTabs.API_ENDPOINT:
+ case EntityType.API_ENDPOINT: {
return getApiEndpointOverview(entityDetail as APIEndpoint);
}
- case ExplorePageTabs.METRIC: {
+ case ExplorePageTabs.METRIC:
+ case EntityType.METRIC: {
return getMetricOverview(entityDetail as Metric);
}
@@ -1235,7 +1250,14 @@ export const getEntityOverview = (
case ExplorePageTabs.ML_MODEL_SERVICE:
case ExplorePageTabs.PIPELINE_SERVICE:
case ExplorePageTabs.SEARCH_INDEX_SERVICE:
- case ExplorePageTabs.API_SERVICE: {
+ case ExplorePageTabs.API_SERVICE:
+ case EntityType.DATABASE_SERVICE:
+ case EntityType.MESSAGING_SERVICE:
+ case EntityType.DASHBOARD_SERVICE:
+ case EntityType.MLMODEL_SERVICE:
+ case EntityType.PIPELINE_SERVICE:
+ case EntityType.SEARCH_SERVICE:
+ case EntityType.API_SERVICE: {
return getEntityServiceOverview(entityDetail as EntityServiceUnion);
}
diff --git a/openmetadata-ui/src/main/resources/ui/src/utils/FeedUtils.tsx b/openmetadata-ui/src/main/resources/ui/src/utils/FeedUtils.tsx
index 9de0ff0f54a3..cfcc5316ee0f 100644
--- a/openmetadata-ui/src/main/resources/ui/src/utils/FeedUtils.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/utils/FeedUtils.tsx
@@ -304,7 +304,7 @@ export const getEntityDetail = (item: string) => {
};
const getEntityLinkList = (message: string) => {
- return message.match(entityLinkRegEx);
+ return message?.match(entityLinkRegEx);
};
const getEntityLinkDetail = (item: string) => {
@@ -778,7 +778,12 @@ export const getFeedHeaderTextFromCardStyle = (
return (
}
+ renderElement={
+
+ }
values={{
field: i18next.t(
`label.${cardStyle === CardStyle.Tags ? 'tag-plural' : cardStyle}`
diff --git a/openmetadata-ui/src/main/resources/ui/src/utils/TasksUtils.ts b/openmetadata-ui/src/main/resources/ui/src/utils/TasksUtils.ts
index e9badb8155ec..b4af1d88850d 100644
--- a/openmetadata-ui/src/main/resources/ui/src/utils/TasksUtils.ts
+++ b/openmetadata-ui/src/main/resources/ui/src/utils/TasksUtils.ts
@@ -16,8 +16,9 @@ import i18Next from 'i18next';
import { isEmpty, isEqual, isUndefined } from 'lodash';
import React from 'react';
import { ReactComponent as CancelColored } from '../assets/svg/cancel-colored.svg';
-import { ReactComponent as EditColored } from '../assets/svg/edit-colored.svg';
-import { ReactComponent as SuccessColored } from '../assets/svg/success-colored.svg';
+import { ReactComponent as CloseIcon } from '../assets/svg/close-circle.svg';
+import { ReactComponent as EditSuggestionIcon } from '../assets/svg/edit-suggestion.svg';
+import { ReactComponent as CheckIcon } from '../assets/svg/tick-circle.svg';
import { ActivityFeedTabs } from '../components/ActivityFeed/ActivityFeedTab/ActivityFeedTab.interface';
import { FQN_SEPARATOR_CHAR } from '../constants/char.constants';
import {
@@ -695,26 +696,30 @@ export const TASK_ACTION_LIST: TaskAction[] = [
{
label: i18Next.t('label.accept-suggestion'),
key: TaskActionMode.VIEW,
- icon: SuccessColored,
+ icon: CheckIcon,
},
{
- label: i18Next.t('label.edit-amp-accept-suggestion'),
+ label: i18Next.t('label.edit-suggestion'),
key: TaskActionMode.EDIT,
- icon: EditColored,
+ icon: EditSuggestionIcon,
+ },
+ {
+ label: i18Next.t('label.close'),
+ key: TaskActionMode.CLOSE,
+ icon: CloseIcon,
},
- ...TASK_ACTION_COMMON_ITEM,
];
export const GLOSSARY_TASK_ACTION_LIST: TaskAction[] = [
{
label: i18Next.t('label.approve'),
key: TaskActionMode.RESOLVE,
- icon: SuccessColored,
+ icon: CheckIcon,
},
{
label: i18Next.t('label.reject'),
key: TaskActionMode.CLOSE,
- icon: CancelColored,
+ icon: CloseIcon,
},
];
@@ -722,10 +727,12 @@ export const INCIDENT_TASK_ACTION_LIST: TaskAction[] = [
{
label: i18Next.t('label.re-assign'),
key: TaskActionMode.RE_ASSIGN,
+ icon: EditSuggestionIcon,
},
{
label: i18Next.t('label.resolve'),
key: TaskActionMode.RESOLVE,
+ icon: CloseIcon,
},
];
diff --git a/openmetadata-ui/src/main/resources/ui/yarn.lock b/openmetadata-ui/src/main/resources/ui/yarn.lock
index c97f2b9b7609..e46138e6e1ae 100644
--- a/openmetadata-ui/src/main/resources/ui/yarn.lock
+++ b/openmetadata-ui/src/main/resources/ui/yarn.lock
@@ -2451,6 +2451,11 @@
resolved "https://registry.yarnpkg.com/@fastify/busboy/-/busboy-2.1.0.tgz#0709e9f4cb252351c609c6e6d8d6779a8d25edff"
integrity sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA==
+"@fontsource/inter@^5.1.1":
+ version "5.1.1"
+ resolved "https://registry.yarnpkg.com/@fontsource/inter/-/inter-5.1.1.tgz#401803b6ac4c877f5be94088aa89147ed5a2bd85"
+ integrity sha512-weN3E+rq0Xb3Z93VHJ+Rc7WOQX9ETJPTAJ+gDcaMHtjft67L58sfS65rAjC5tZUXQ2FdZ/V1/sSzCwZ6v05kJw==
+
"@fontsource/poppins@^5.0.0":
version "5.0.0"
resolved "https://registry.yarnpkg.com/@fontsource/poppins/-/poppins-5.0.0.tgz#5023921cfd2a167f64060f8029e8f99ce68c32f9"