diff --git a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Features/TeamsHierarchy.spec.js b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Features/TeamsHierarchy.spec.js index 25c9cf0faa84..f067d71c8fc9 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Features/TeamsHierarchy.spec.js +++ b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Features/TeamsHierarchy.spec.js @@ -80,7 +80,7 @@ describe('Add nested teams and test TeamsSelectable', () => { cy.get('[data-testid="add-user"]').should('be.visible').click(); // Enter team name - cy.get('#create-user-bot-form .ant-select-selector') + cy.get('[data-testid="team-select"] .ant-select-selector') .should('exist') .scrollIntoView() .should('be.visible') @@ -94,7 +94,7 @@ describe('Add nested teams and test TeamsSelectable', () => { }); teamNames.forEach((teamName) => { - cy.get('#create-user-bot-form .ant-select-selector') + cy.get('[data-testid="team-select"] .ant-select-selector') .should('exist') .scrollIntoView() .should('be.visible') diff --git a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Flow/AddRoleAndAssignToUser.spec.js b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Flow/AddRoleAndAssignToUser.spec.js index 3046cd7e2d00..6f48f022705a 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Flow/AddRoleAndAssignToUser.spec.js +++ b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Flow/AddRoleAndAssignToUser.spec.js @@ -106,15 +106,15 @@ describe('Test Add role and assign it to the user', () => { .click(); verifyResponseStatusCode('@generatePassword', 200); - cy.get(`[id="menu-button-Roles"]`) - .should('exist') - .should('be.visible') - .click(); - - cy.get(`[data-testid="${roleName}"]`) + cy.get(`[data-testid="roles-dropdown"]`) .scrollIntoView() - .should('be.visible') - .click(); + .should('be.visible'); + + cy.get(`[data-testid="roles-dropdown"]`).click(); + + cy.get(`[title="${roleName}"]`).scrollIntoView().should('be.visible'); + + cy.get(`[title="${roleName}"]`).click(); cy.get('[data-testid="roles-dropdown"]').click(); cy.get('[data-testid="save-user"]').scrollIntoView().click(); diff --git a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/Glossary.spec.js b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/Glossary.spec.js index 4535456a2073..83bf7f86de29 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/Glossary.spec.js +++ b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/Glossary.spec.js @@ -252,10 +252,7 @@ const updateTags = (inTerm) => { .scrollIntoView() .should('be.visible') .type('personal'); - cy.get('.ant-select-item-option-content') - .contains('Personal') - .should('be.visible') - .click(); + cy.get('[role="tree"] [title="Personal"]').click(); // to close popup cy.clickOutside(); @@ -492,7 +489,7 @@ describe('Glossary page should work properly', () => { it('Verify and Remove Tags from Glossary', () => { // Verify Tags which is added at the time of creating glossary - cy.get('[data-testid="tag-container"]') + cy.get('[data-testid="tags-container"]') .contains('Personal') .should('be.visible'); diff --git a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/Tags.spec.js b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/Tags.spec.js index ec405933cefa..06832e2fac74 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/Tags.spec.js +++ b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/Tags.spec.js @@ -398,7 +398,7 @@ describe('Tags page should work', () => { cy.get('@count') .invoke('text') .then((text) => { - expect(text).to.equal('2'); + expect(text).to.equal('1'); }); interceptURL( diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedTab/ActivityFeedTab.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedTab/ActivityFeedTab.component.tsx index 24844e238075..430c68d72a0e 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedTab/ActivityFeedTab.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedTab/ActivityFeedTab.component.tsx @@ -61,6 +61,7 @@ export const ActivityFeedTab = ({ description, columns, entityType, + onUpdateEntityDetails, }: ActivityFeedTabProps) => { const history = useHistory(); const { t } = useTranslation(); @@ -395,6 +396,7 @@ export const ActivityFeedTab = ({ owner={owner} tags={tags} task={selectedThread} + onUpdateEntityDetails={onUpdateEntityDetails} /> ) : ( )} diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedTab/ActivityFeedTab.interface.ts b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedTab/ActivityFeedTab.interface.ts index c299a076f05c..67f918c24713 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedTab/ActivityFeedTab.interface.ts +++ b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedTab/ActivityFeedTab.interface.ts @@ -26,6 +26,7 @@ export enum ActivityFeedTabs { export interface ActivityFeedTabBasicProps { fqn: string; onFeedUpdate: () => void; + onUpdateEntityDetails?: () => void; owner?: EntityReference; tags?: TagLabel[]; description?: string; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/AddDataQualityTest/AddDataQualityTest.interface.ts b/openmetadata-ui/src/main/resources/ui/src/components/AddDataQualityTest/AddDataQualityTest.interface.ts index f3256705fe17..db6461a43caf 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/AddDataQualityTest/AddDataQualityTest.interface.ts +++ b/openmetadata-ui/src/main/resources/ui/src/components/AddDataQualityTest/AddDataQualityTest.interface.ts @@ -38,7 +38,6 @@ export interface TestCaseFormProps { export interface TestSuiteIngestionProps { testSuite: TestSuite; ingestionPipeline?: IngestionPipeline; - table?: Table; onCancel: () => void; } diff --git a/openmetadata-ui/src/main/resources/ui/src/components/AddDataQualityTest/AddDataQualityTestV1.tsx b/openmetadata-ui/src/main/resources/ui/src/components/AddDataQualityTest/AddDataQualityTestV1.tsx index cc27db3ea44e..9854566846b5 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/AddDataQualityTest/AddDataQualityTestV1.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/AddDataQualityTest/AddDataQualityTestV1.tsx @@ -14,6 +14,7 @@ import { Col, Row, Typography } from 'antd'; import { AxiosError } from 'axios'; import ResizablePanels from 'components/common/ResizablePanels/ResizablePanels'; +import { TableProfilerTab } from 'components/ProfilerDashboard/profilerDashboard.interface'; import SingleColumnProfile from 'components/TableProfiler/Component/SingleColumnProfile'; import TableProfilerChart from 'components/TableProfiler/Component/TableProfilerChart'; import { HTTP_STATUS_CODE } from 'constants/auth.constants'; @@ -25,6 +26,7 @@ import { default as React, Fragment, useCallback, + useEffect, useMemo, useState, } from 'react'; @@ -37,7 +39,7 @@ import { DEFAULT_RANGE_DATA, STEPS_FOR_ADD_TEST_CASE, } from '../../constants/profiler.constant'; -import { EntityType } from '../../enums/entity.enum'; +import { EntityTabs, EntityType } from '../../enums/entity.enum'; import { FormSubmitType } from '../../enums/form.enum'; import { ProfilerDashboardType } from '../../enums/table.enum'; import { OwnerType } from '../../enums/user.enum'; @@ -96,42 +98,43 @@ const AddDataQualityTestV1: React.FC = ({ ); const handleRedirection = () => { - history.goBack(); + history.push({ + pathname: getTableTabPath( + table.fullyQualifiedName ?? '', + EntityTabs.PROFILER + ), + search: Qs.stringify({ activeTab: TableProfilerTab.DATA_QUALITY }), + }); }; - const getTestSuiteFqn = async () => { - try { - if (isUndefined(table.testSuite)) { - const testSuite = { - name: `${table.fullyQualifiedName}.testSuite`, - executableEntityReference: table.fullyQualifiedName, - owner, - }; - const response = await createExecutableTestSuite(testSuite); - setTestSuiteData(response); - - return `${table.fullyQualifiedName}.testSuite`; - } - setTestSuiteData(table.testSuite); + const createTestSuite = async () => { + const testSuite = { + name: `${table.fullyQualifiedName}.testSuite`, + executableEntityReference: table.fullyQualifiedName, + owner, + }; + const response = await createExecutableTestSuite(testSuite); + setTestSuiteData(response); - return table.testSuite?.fullyQualifiedName ?? ''; - } catch (error) { - showErrorToast(error as AxiosError); - } - - return ''; + return response; }; + useEffect(() => { + setTestSuiteData(table.testSuite); + }, [table.testSuite]); + const handleFormSubmit = async (data: CreateTestCase) => { setTestCaseData(data); try { - const testSuite = await getTestSuiteFqn(); + const testSuite = isUndefined(testSuiteData) + ? await createTestSuite() + : table.testSuite; const testCasePayload: CreateTestCase = { ...data, owner, - testSuite, + testSuite: testSuite?.fullyQualifiedName ?? '', }; const testCaseResponse = await createTestCase(testCasePayload); @@ -197,7 +200,7 @@ const AddDataQualityTestV1: React.FC = ({ onSubmit={handleFormSubmit} /> ); - }, [activeServiceStep, testCaseRes]); + }, [activeServiceStep, testCaseData, testCaseRes, handleFormSubmit, table]); const { activeColumnFqn } = useMemo(() => { const param = location.search; @@ -290,6 +293,7 @@ const AddDataQualityTestV1: React.FC = ({ children: secondPanel, className: 'p-md service-doc-panel', minWidth: 60, + flex: 0.4, overlay: { displayThreshold: 200, header: t('label.setup-guide'), diff --git a/openmetadata-ui/src/main/resources/ui/src/components/AddDataQualityTest/TestSuiteIngestion.tsx b/openmetadata-ui/src/main/resources/ui/src/components/AddDataQualityTest/TestSuiteIngestion.tsx index 7f1f110847c0..019eaf152d3e 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/AddDataQualityTest/TestSuiteIngestion.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/AddDataQualityTest/TestSuiteIngestion.tsx @@ -13,7 +13,7 @@ import { Col, Row, Typography } from 'antd'; import { AxiosError } from 'axios'; -import { isEmpty } from 'lodash'; +import { camelCase, isEmpty } from 'lodash'; import React, { useCallback, useMemo, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { useHistory, useParams } from 'react-router-dom'; @@ -47,7 +47,6 @@ import TestSuiteScheduler from './components/TestSuiteScheduler'; const TestSuiteIngestion: React.FC = ({ ingestionPipeline, - table, testSuite, onCancel, }) => { @@ -125,8 +124,8 @@ const TestSuiteIngestion: React.FC = ({ name: `${updatedName}_${PipelineType.TestSuite}`, pipelineType: PipelineType.TestSuite, service: { - id: table?.service?.id ?? '', - type: table?.service?.type ?? '', + id: testSuite.id || '', + type: camelCase(PipelineType.TestSuite), }, sourceConfig: { config: { diff --git a/openmetadata-ui/src/main/resources/ui/src/components/DashboardDetails/DashboardDetails.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/DashboardDetails/DashboardDetails.component.tsx index 2b7ef544489d..7f90f348a4ee 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/DashboardDetails/DashboardDetails.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/DashboardDetails/DashboardDetails.component.tsx @@ -34,6 +34,7 @@ import { import { getDashboardDetailsPath } from 'constants/constants'; import { compare } from 'fast-json-patch'; import { TagSource } from 'generated/type/schema'; +import { EntityFieldThreadCount } from 'interface/feed.interface'; import { isEmpty, isUndefined, map } from 'lodash'; import { EntityTags, TagOption } from 'Models'; import React, { useCallback, useEffect, useMemo, useState } from 'react'; @@ -52,7 +53,11 @@ import { EntityTabs, EntityType } from '../../enums/entity.enum'; import { Dashboard } from '../../generated/entity/data/dashboard'; import { ThreadType } from '../../generated/entity/feed/thread'; import { LabelType, State, TagLabel } from '../../generated/type/tagLabel'; -import { getCurrentUserId, refreshPage } from '../../utils/CommonUtils'; +import { + getCurrentUserId, + getFeedCounts, + refreshPage, +} from '../../utils/CommonUtils'; import { getEntityFieldThreadCounts } from '../../utils/FeedUtils'; import { DEFAULT_ENTITY_PERMISSION } from '../../utils/PermissionsUtils'; import { getTagsWithoutTier, getTierTags } from '../../utils/TableUtils'; @@ -79,10 +84,7 @@ const DashboardDetails = ({ chartDescriptionUpdateHandler, chartTagUpdateHandler, versionHandler, - feedCount, - entityFieldThreadCount, createThread, - entityFieldTaskCount, onDashboardUpdate, }: DashboardDetailsProps) => { const { t } = useTranslation(); @@ -96,6 +98,13 @@ const DashboardDetails = ({ chart: ChartType; index: number; }>(); + const [feedCount, setFeedCount] = useState(0); + const [entityFieldThreadCount, setEntityFieldThreadCount] = useState< + EntityFieldThreadCount[] + >([]); + const [entityFieldTaskCount, setEntityFieldTaskCount] = useState< + EntityFieldThreadCount[] + >([]); const [tagFetchFailed, setTagFetchFailed] = useState(false); const [isTagLoading, setIsTagLoading] = useState(false); @@ -182,6 +191,20 @@ const DashboardDetails = ({ } }, []); + const getEntityFeedCount = () => { + getFeedCounts( + EntityType.DASHBOARD, + dashboardFQN, + setEntityFieldThreadCount, + setEntityFieldTaskCount, + setFeedCount + ); + }; + + useEffect(() => { + getEntityFeedCount(); + }, [dashboardFQN]); + const getAllChartsPermissions = useCallback( async (charts: ChartType[]) => { const permissionsArray: Array = []; @@ -690,7 +713,7 @@ const DashboardDetails = ({ Promise.resolve()} + onFeedUpdate={getEntityFeedCount} /> ), diff --git a/openmetadata-ui/src/main/resources/ui/src/components/DashboardDetails/DashboardDetails.interface.ts b/openmetadata-ui/src/main/resources/ui/src/components/DashboardDetails/DashboardDetails.interface.ts index 9ce9228a4b60..05be62cf3d48 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/DashboardDetails/DashboardDetails.interface.ts +++ b/openmetadata-ui/src/main/resources/ui/src/components/DashboardDetails/DashboardDetails.interface.ts @@ -16,7 +16,6 @@ import { Operation } from 'fast-json-patch'; import { CreateThread } from '../../generated/api/feed/createThread'; import { Chart } from '../../generated/entity/data/chart'; import { Dashboard } from '../../generated/entity/data/dashboard'; -import { EntityFieldThreadCount } from '../../interface/feed.interface'; export interface ChartType extends Chart { displayName: string; @@ -29,9 +28,6 @@ export interface ChartsPermissions { export interface DashboardDetailsProps { charts: Array; dashboardDetails: Dashboard; - feedCount: number; - entityFieldThreadCount: EntityFieldThreadCount[]; - entityFieldTaskCount: EntityFieldThreadCount[]; createThread: (data: CreateThread) => void; followDashboardHandler: () => Promise; unFollowDashboardHandler: () => Promise; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/DashboardDetails/DashboardDetails.test.tsx b/openmetadata-ui/src/main/resources/ui/src/components/DashboardDetails/DashboardDetails.test.tsx index 0a734efa37b4..ed50c1d3d624 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/DashboardDetails/DashboardDetails.test.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/DashboardDetails/DashboardDetails.test.tsx @@ -65,9 +65,6 @@ const dashboardDetailsProps: DashboardDetailsProps = { chartTagUpdateHandler: jest.fn(), onDashboardUpdate: jest.fn(), versionHandler: jest.fn(), - feedCount: 0, - entityFieldThreadCount: [], - entityFieldTaskCount: [], createThread: jest.fn(), }; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/DataAssets/DataAssetsHeader/DataAssetsHeader.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/DataAssets/DataAssetsHeader/DataAssetsHeader.component.tsx index 48dc6404939c..d5dedac33d23 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/DataAssets/DataAssetsHeader/DataAssetsHeader.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/DataAssets/DataAssetsHeader/DataAssetsHeader.component.tsx @@ -526,7 +526,7 @@ export const DataAssetsHeader = ({ entityFQN={dataAsset.fullyQualifiedName} entityId={dataAsset.id} entityName={entityName} - entityType={EntityType.TABLE} + entityType={entityType} onAnnouncementClick={ permissions?.EditAll ? () => setIsAnnouncementDrawer(true) diff --git a/openmetadata-ui/src/main/resources/ui/src/components/DataInsightDetail/DailyActiveUsersChart.tsx b/openmetadata-ui/src/main/resources/ui/src/components/DataInsightDetail/DailyActiveUsersChart.tsx index 6cd943fdf867..e2b6c9ecdaa2 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/DataInsightDetail/DailyActiveUsersChart.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/DataInsightDetail/DailyActiveUsersChart.tsx @@ -11,8 +11,9 @@ * limitations under the License. */ -import { Card, Col, Row, Typography } from 'antd'; +import { Card, Col, Row } from 'antd'; import { AxiosError } from 'axios'; +import PageHeader from 'components/header/PageHeader.component'; import React, { FC, useEffect, useMemo, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { @@ -95,14 +96,12 @@ const DailyActiveUsersChart: FC = ({ chartFilter, selectedDays }) => { id={DataInsightChartType.DailyActiveUsers} loading={isLoading} title={ - <> - - {t('label.daily-active-users-on-the-platform')} - - - {t('message.active-users')} - - > + }> {dailyActiveUsers.length ? ( diff --git a/openmetadata-ui/src/main/resources/ui/src/components/DataInsightDetail/DescriptionInsight.tsx b/openmetadata-ui/src/main/resources/ui/src/components/DataInsightDetail/DescriptionInsight.tsx index 47c3746496b7..a15e8cd04257 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/DataInsightDetail/DescriptionInsight.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/DataInsightDetail/DescriptionInsight.tsx @@ -13,6 +13,7 @@ import { Card, Col, Row, Typography } from 'antd'; import { AxiosError } from 'axios'; +import PageHeader from 'components/header/PageHeader.component'; import { isEmpty, round, uniqueId } from 'lodash'; import React, { FC, useEffect, useMemo, useState } from 'react'; import { useTranslation } from 'react-i18next'; @@ -140,16 +141,14 @@ const DescriptionInsight: FC = ({ chartFilter, kpi, selectedDays }) => { id={DataInsightChartType.PercentageOfEntitiesWithDescriptionByType} loading={isLoading} title={ - <> - - {t('label.data-insight-description-summary')} - - - {t('message.field-insight', { + - > + }), + }} + /> }> {data.length ? ( diff --git a/openmetadata-ui/src/main/resources/ui/src/components/DataInsightDetail/KPIChart.tsx b/openmetadata-ui/src/main/resources/ui/src/components/DataInsightDetail/KPIChart.tsx index 7114f4191e71..deafc77f9000 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/DataInsightDetail/KPIChart.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/DataInsightDetail/KPIChart.tsx @@ -12,17 +12,10 @@ */ import { PlusOutlined } from '@ant-design/icons'; -import { - Button, - Card, - Col, - Row, - Space, - Tooltip as AntdTooltip, - Typography, -} from 'antd'; +import { Button, Card, Col, Row, Space, Tooltip as AntdTooltip } from 'antd'; import { AxiosError } from 'axios'; import ErrorPlaceHolder from 'components/common/error-with-placeholder/ErrorPlaceHolder'; +import PageHeader from 'components/header/PageHeader.component'; import { ERROR_PLACEHOLDER_TYPE, SIZE } from 'enums/common.enum'; import { isEmpty, isUndefined } from 'lodash'; import React, { FC, useEffect, useMemo, useState } from 'react'; @@ -200,16 +193,12 @@ const KPIChart: FC = ({ chartFilter, kpiList }) => { id="kpi-charts" loading={isLoading} title={ - - - - {t('label.kpi-title')} - - - {t('message.kpi-subtitle')} - - - + }> {kpiList.length ? ( diff --git a/openmetadata-ui/src/main/resources/ui/src/components/DataInsightDetail/OwnerInsight.tsx b/openmetadata-ui/src/main/resources/ui/src/components/DataInsightDetail/OwnerInsight.tsx index e5b710a11012..514bbfb67f55 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/DataInsightDetail/OwnerInsight.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/DataInsightDetail/OwnerInsight.tsx @@ -13,6 +13,7 @@ import { Card, Col, Row, Typography } from 'antd'; import { AxiosError } from 'axios'; +import PageHeader from 'components/header/PageHeader.component'; import { isEmpty, round, uniqueId } from 'lodash'; import React, { FC, useEffect, useMemo, useState } from 'react'; import { useTranslation } from 'react-i18next'; @@ -139,16 +140,14 @@ const OwnerInsight: FC = ({ chartFilter, kpi, selectedDays }) => { id={DataInsightChartType.PercentageOfEntitiesWithOwnerByType} loading={isLoading} title={ - <> - - {t('label.data-insight-owner-summary')} - - - {t('message.field-insight', { + - > + }), + }} + /> }> {data.length ? ( diff --git a/openmetadata-ui/src/main/resources/ui/src/components/DataInsightDetail/PageViewsByEntitiesChart.tsx b/openmetadata-ui/src/main/resources/ui/src/components/DataInsightDetail/PageViewsByEntitiesChart.tsx index 581b1b3865eb..9436aba3969d 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/DataInsightDetail/PageViewsByEntitiesChart.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/DataInsightDetail/PageViewsByEntitiesChart.tsx @@ -11,8 +11,9 @@ * limitations under the License. */ -import { Card, Col, Row, Typography } from 'antd'; +import { Card, Col, Row } from 'antd'; import { AxiosError } from 'axios'; +import PageHeader from 'components/header/PageHeader.component'; import { isEmpty, uniqueId } from 'lodash'; import React, { FC, useEffect, useMemo, useState } from 'react'; import { useTranslation } from 'react-i18next'; @@ -119,14 +120,12 @@ const PageViewsByEntitiesChart: FC = ({ chartFilter, selectedDays }) => { id={DataInsightChartType.PageViewsByEntities} loading={isLoading} title={ - <> - - {t('label.page-views-by-data-asset-plural')} - - - {t('message.data-insight-page-views')} - - > + }> {data.length ? ( diff --git a/openmetadata-ui/src/main/resources/ui/src/components/DataInsightDetail/TierInsight.tsx b/openmetadata-ui/src/main/resources/ui/src/components/DataInsightDetail/TierInsight.tsx index 4a27e7841b8e..c4bd18d4224e 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/DataInsightDetail/TierInsight.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/DataInsightDetail/TierInsight.tsx @@ -13,6 +13,7 @@ import { Card, Col, Row, Typography } from 'antd'; import { AxiosError } from 'axios'; +import PageHeader from 'components/header/PageHeader.component'; import { isEmpty, uniqueId } from 'lodash'; import React, { FC, useEffect, useMemo, useState } from 'react'; import { useTranslation } from 'react-i18next'; @@ -119,16 +120,14 @@ const TierInsight: FC = ({ chartFilter, selectedDays }) => { id={DataInsightChartType.TotalEntitiesByTier} loading={isLoading} title={ - <> - - {t('label.data-insight-tier-summary')} - - - {t('message.field-insight', { + - > + }), + }} + /> }> {data.length ? ( diff --git a/openmetadata-ui/src/main/resources/ui/src/components/DataInsightDetail/TopActiveUsers.tsx b/openmetadata-ui/src/main/resources/ui/src/components/DataInsightDetail/TopActiveUsers.tsx index 048a914248c0..9b5abf03ef4c 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/DataInsightDetail/TopActiveUsers.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/DataInsightDetail/TopActiveUsers.tsx @@ -14,6 +14,7 @@ import { Card, Space, Table, Typography } from 'antd'; import { ColumnsType } from 'antd/lib/table'; import { AxiosError } from 'axios'; +import PageHeader from 'components/header/PageHeader.component'; import { isEmpty } from 'lodash'; import React, { FC, useEffect, useMemo, useState } from 'react'; import { useTranslation } from 'react-i18next'; @@ -127,14 +128,12 @@ const TopActiveUsers: FC = ({ chartFilter }) => { className="data-insight-card" data-testid="entity-summary-card-percentage" title={ - <> - - {t('label.data-insight-active-user-summary')} - - - {t('message.most-active-users')} - - > + }> {isEmpty(mostActiveUsers) ? ( diff --git a/openmetadata-ui/src/main/resources/ui/src/components/DataInsightDetail/TopViewEntities.tsx b/openmetadata-ui/src/main/resources/ui/src/components/DataInsightDetail/TopViewEntities.tsx index 8f32c0bbf5f7..482351f79cb5 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/DataInsightDetail/TopViewEntities.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/DataInsightDetail/TopViewEntities.tsx @@ -14,6 +14,7 @@ import { Card, Space, Table, Typography } from 'antd'; import { ColumnsType } from 'antd/lib/table'; import { AxiosError } from 'axios'; +import PageHeader from 'components/header/PageHeader.component'; import { isEmpty, isUndefined } from 'lodash'; import React, { FC, useEffect, useMemo, useState } from 'react'; import { useTranslation } from 'react-i18next'; @@ -122,14 +123,12 @@ const TopViewEntities: FC = ({ chartFilter }) => { className="data-insight-card" data-testid="entity-summary-card-percentage" title={ - <> - - {t('label.data-insight-top-viewed-entity-summary')} - - - {t('message.most-viewed-data-assets')} - - > + }> {isEmpty(mostViewedEntities) ? ( diff --git a/openmetadata-ui/src/main/resources/ui/src/components/DataInsightDetail/TotalEntityInsight.tsx b/openmetadata-ui/src/main/resources/ui/src/components/DataInsightDetail/TotalEntityInsight.tsx index 983a3824ade9..e899f853d418 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/DataInsightDetail/TotalEntityInsight.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/DataInsightDetail/TotalEntityInsight.tsx @@ -11,8 +11,9 @@ * limitations under the License. */ -import { Card, Col, Row, Typography } from 'antd'; +import { Card, Col, Row } from 'antd'; import { AxiosError } from 'axios'; +import PageHeader from 'components/header/PageHeader.component'; import { isEmpty, uniqueId } from 'lodash'; import React, { FC, useEffect, useMemo, useState } from 'react'; import { useTranslation } from 'react-i18next'; @@ -123,14 +124,12 @@ const TotalEntityInsight: FC = ({ chartFilter, selectedDays }) => { id={DataInsightChartType.TotalEntitiesByType} loading={isLoading} title={ - <> - - {t('label.data-insight-total-entity-summary')} - - - {t('message.total-entity-insight')} - - > + }> {data.length ? ( diff --git a/openmetadata-ui/src/main/resources/ui/src/components/DataModels/DataModelDetails.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/DataModels/DataModelDetails.component.tsx index b9756f57e32d..49551b94b843 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/DataModels/DataModelDetails.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/DataModels/DataModelDetails.component.tsx @@ -30,11 +30,13 @@ import { EntityField } from 'constants/Feeds.constants'; import { CSMode } from 'enums/codemirror.enum'; import { EntityTabs, EntityType } from 'enums/entity.enum'; import { LabelType, State, TagLabel, TagSource } from 'generated/type/tagLabel'; -import { isUndefined, toString } from 'lodash'; +import { EntityFieldThreadCount } from 'interface/feed.interface'; +import { isUndefined, noop, toString } from 'lodash'; import { EntityTags } from 'Models'; -import React, { useMemo, useState } from 'react'; +import React, { useEffect, useMemo, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { useHistory, useParams } from 'react-router-dom'; +import { getFeedCounts } from 'utils/CommonUtils'; import { getEntityName, getEntityThreadLink } from 'utils/EntityUtils'; import { getEntityFieldThreadCounts } from 'utils/FeedUtils'; import { getTagsWithoutTier } from 'utils/TableUtils'; @@ -42,8 +44,6 @@ import { DataModelDetailsProps } from './DataModelDetails.interface'; import ModelTab from './ModelTab/ModelTab.component'; const DataModelDetails = ({ - entityFieldThreadCount, - feedCount, dataModelData, dataModelPermissions, createThread, @@ -63,6 +63,10 @@ const DataModelDetails = ({ const [isEditDescription, setIsEditDescription] = useState(false); const [threadLink, setThreadLink] = useState(''); + const [feedCount, setFeedCount] = useState(0); + const [entityFieldThreadCount, setEntityFieldThreadCount] = useState< + EntityFieldThreadCount[] + >([]); const { hasEditDescriptionPermission, @@ -91,6 +95,20 @@ const DataModelDetails = ({ }; }, [dataModelData]); + const getEntityFeedCount = () => { + getFeedCounts( + EntityType.DASHBOARD_DATA_MODEL, + dashboardDataModelFQN, + setEntityFieldThreadCount, + noop, + setFeedCount + ); + }; + + useEffect(() => { + dashboardDataModelFQN && getEntityFeedCount(); + }, [dashboardDataModelFQN]); + const handleUpdateDisplayName = async (data: EntityName) => { if (isUndefined(dataModelData)) { return; @@ -247,7 +265,7 @@ const DataModelDetails = ({ Promise.resolve()} + onFeedUpdate={getEntityFeedCount} /> ), diff --git a/openmetadata-ui/src/main/resources/ui/src/components/DataModels/DataModelDetails.interface.tsx b/openmetadata-ui/src/main/resources/ui/src/components/DataModels/DataModelDetails.interface.tsx index 7ce1ac139c18..94b22ac03fac 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/DataModels/DataModelDetails.interface.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/DataModels/DataModelDetails.interface.tsx @@ -16,12 +16,9 @@ import { CreateThread } from 'generated/api/feed/createThread'; import { DashboardDataModel } from 'generated/entity/data/dashboardDataModel'; import { Column } from 'generated/entity/data/table'; import { EntityReference } from 'generated/entity/type'; -import { EntityFieldThreadCount } from 'interface/feed.interface'; import { EntityTags } from 'Models'; export interface DataModelDetailsProps { - entityFieldThreadCount: EntityFieldThreadCount[]; - feedCount: number; dataModelData: DashboardDataModel; dataModelPermissions: OperationPermission; createThread: (data: CreateThread) => void; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/DataQuality/TestCases/TestCases.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/DataQuality/TestCases/TestCases.component.tsx index 91e3591b5feb..11ccee0bdff3 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/DataQuality/TestCases/TestCases.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/DataQuality/TestCases/TestCases.component.tsx @@ -16,13 +16,13 @@ import Searchbar from 'components/common/searchbar/Searchbar'; import DataQualityTab from 'components/ProfilerDashboard/component/DataQualityTab'; import { INITIAL_PAGING_VALUE, PAGE_SIZE } from 'constants/constants'; import { SearchIndex } from 'enums/search.enum'; -import { TestCase, TestCaseStatus } from 'generated/tests/testCase'; +import { TestCase } from 'generated/tests/testCase'; import { Paging } from 'generated/type/paging'; import { SearchHitBody, TestCaseSearchSource, } from 'interface/search.interface'; -import { isString, sortBy } from 'lodash'; +import { isString } from 'lodash'; import { PagingResponse } from 'Models'; import { DataQualityPageTabs } from 'pages/DataQuality/DataQualityPage.interface'; import QueryString from 'qs'; @@ -59,24 +59,6 @@ export const TestCases = () => { const [isLoading, setIsLoading] = useState(true); const [currentPage, setCurrentPage] = useState(INITIAL_PAGING_VALUE); - const sortedData = useMemo( - () => - sortBy(testCase.data, (test) => { - switch (test.testCaseResult?.testCaseStatus) { - case TestCaseStatus.Failed: - return 0; - case TestCaseStatus.Aborted: - return 1; - case TestCaseStatus.Success: - return 2; - - default: - return 3; - } - }), - [testCase] - ); - const handleSearchParam = ( value: string | boolean, key: keyof DataQualitySearchParams @@ -188,7 +170,7 @@ export const TestCases = () => { onPagingClick: handlePagingClick, isNumberBased: Boolean(searchValue), }} - testCases={sortedData} + testCases={testCase.data} onTestCaseResultUpdate={handleStatusSubmit} /> diff --git a/openmetadata-ui/src/main/resources/ui/src/components/IngestionStepper/IngestionStepper.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/IngestionStepper/IngestionStepper.component.tsx index 7e68713f2761..996326c317db 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/IngestionStepper/IngestionStepper.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/IngestionStepper/IngestionStepper.component.tsx @@ -14,6 +14,7 @@ import { Steps } from 'antd'; import classNames from 'classnames'; import React, { useMemo } from 'react'; +import './ingestion-stepper.style.less'; type Props = { steps: Array<{ name: string; step: number }>; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/IngestionStepper/ingestion-stepper.style.less b/openmetadata-ui/src/main/resources/ui/src/components/IngestionStepper/ingestion-stepper.style.less new file mode 100644 index 000000000000..bf056f32e7f6 --- /dev/null +++ b/openmetadata-ui/src/main/resources/ui/src/components/IngestionStepper/ingestion-stepper.style.less @@ -0,0 +1,17 @@ +/* + * 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. + */ +.stepper-container { + .ant-steps-item-content { + width: 120px; + } +} diff --git a/openmetadata-ui/src/main/resources/ui/src/components/MlModelDetail/MlModelDetail.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/MlModelDetail/MlModelDetail.component.tsx index abdd28105ee9..0f806dfe59d1 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/MlModelDetail/MlModelDetail.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/MlModelDetail/MlModelDetail.component.tsx @@ -25,6 +25,7 @@ import { EntityName } from 'components/Modals/EntityNameModal/EntityNameModal.in import TabsLabel from 'components/TabsLabel/TabsLabel.component'; import TagsContainerV1 from 'components/Tag/TagsContainerV1/TagsContainerV1'; import { TagLabel, TagSource } from 'generated/type/schema'; +import { EntityFieldThreadCount } from 'interface/feed.interface'; import { isEmpty } from 'lodash'; import { EntityTags } from 'Models'; import React, { FC, useCallback, useEffect, useMemo, useState } from 'react'; @@ -40,7 +41,11 @@ import { MlHyperParameter } from '../../generated/api/data/createMlModel'; import { Mlmodel, MlStore } from '../../generated/entity/data/mlmodel'; import { ThreadType } from '../../generated/entity/feed/thread'; import { LabelType, State } from '../../generated/type/tagLabel'; -import { getEmptyPlaceholder, refreshPage } from '../../utils/CommonUtils'; +import { + getEmptyPlaceholder, + getFeedCounts, + refreshPage, +} from '../../utils/CommonUtils'; import { getEntityFieldThreadCounts } from '../../utils/FeedUtils'; import { DEFAULT_ENTITY_PERMISSION } from '../../utils/PermissionsUtils'; import { getTagsWithoutTier, getTierTags } from '../../utils/TableUtils'; @@ -62,10 +67,8 @@ const MlModelDetail: FC = ({ settingsUpdateHandler, updateMlModelFeatures, onExtensionUpdate, - feedCount, + createThread, - entityFieldTaskCount, - entityFieldThreadCount, versionHandler, tagUpdateHandler, }) => { @@ -76,6 +79,13 @@ const MlModelDetail: FC = ({ useParams<{ tab: EntityTabs; mlModelFqn: string }>(); const [isEdit, setIsEdit] = useState(false); + const [feedCount, setFeedCount] = useState(0); + const [entityFieldThreadCount, setEntityFieldThreadCount] = useState< + EntityFieldThreadCount[] + >([]); + const [entityFieldTaskCount, setEntityFieldTaskCount] = useState< + EntityFieldThreadCount[] + >([]); const [mlModelPermissions, setPipelinePermissions] = useState( DEFAULT_ENTITY_PERMISSION @@ -127,6 +137,22 @@ const MlModelDetail: FC = ({ }; }, [mlModelDetail]); + const fetchEntityFeedCount = () => { + getFeedCounts( + EntityType.MLMODEL, + mlModelFqn, + setEntityFieldThreadCount, + setEntityFieldTaskCount, + setFeedCount + ); + }; + + useEffect(() => { + if (mlModelPermissions.ViewAll || mlModelPermissions.ViewBasic) { + fetchEntityFeedCount(); + } + }, [mlModelPermissions, mlModelFqn]); + const handleTabChange = (activeKey: string) => { if (activeKey !== activeTab) { history.push(getMlModelDetailsPath(mlModelFqn, activeKey)); @@ -442,7 +468,7 @@ const MlModelDetail: FC = ({ Promise.resolve()} + onFeedUpdate={fetchEntityFeedCount} /> ), diff --git a/openmetadata-ui/src/main/resources/ui/src/components/MlModelDetail/MlModelDetail.interface.ts b/openmetadata-ui/src/main/resources/ui/src/components/MlModelDetail/MlModelDetail.interface.ts index fda74efc23b2..3a725eb7a43d 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/MlModelDetail/MlModelDetail.interface.ts +++ b/openmetadata-ui/src/main/resources/ui/src/components/MlModelDetail/MlModelDetail.interface.ts @@ -14,12 +14,10 @@ import { HTMLAttributes } from 'react'; import { CreateThread } from '../../generated/api/feed/createThread'; import { Mlmodel } from '../../generated/entity/data/mlmodel'; -import { EntityFieldThreadCount } from '../../interface/feed.interface'; export interface MlModelDetailProp extends HTMLAttributes { mlModelDetail: Mlmodel; version?: string; - feedCount: number; followMlModelHandler: () => Promise; unFollowMlModelHandler: () => Promise; descriptionUpdateHandler: (updatedMlModel: Mlmodel) => Promise; @@ -28,7 +26,5 @@ export interface MlModelDetailProp extends HTMLAttributes { settingsUpdateHandler: (updatedMlModel: Mlmodel) => Promise; versionHandler: () => void; onExtensionUpdate: (updatedMlModel: Mlmodel) => Promise; - entityFieldThreadCount: EntityFieldThreadCount[]; - entityFieldTaskCount: EntityFieldThreadCount[]; createThread: (data: CreateThread) => void; } diff --git a/openmetadata-ui/src/main/resources/ui/src/components/PipelineDetails/PipelineDetails.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/PipelineDetails/PipelineDetails.component.tsx index b9e271e1c300..591d666f8989 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/PipelineDetails/PipelineDetails.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/PipelineDetails/PipelineDetails.component.tsx @@ -700,7 +700,7 @@ const PipelineDetails = ({ Promise.resolve()} + onFeedUpdate={getEntityFeedCount} /> ), diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ProfilerDashboard/component/DataQualityTab.tsx b/openmetadata-ui/src/main/resources/ui/src/components/ProfilerDashboard/component/DataQualityTab.tsx index 6ebe33963c63..d4a0425b355b 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/ProfilerDashboard/component/DataQualityTab.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/ProfilerDashboard/component/DataQualityTab.tsx @@ -34,7 +34,7 @@ import { usePermissionProvider } from 'components/PermissionProvider/PermissionP import { ResourceEntity } from 'components/PermissionProvider/PermissionProvider.interface'; import { TestCaseStatus } from 'generated/configuration/testResultNotificationConfiguration'; import { Operation } from 'generated/entity/policies/policy'; -import { isUndefined } from 'lodash'; +import { isUndefined, sortBy } from 'lodash'; import { putTestCaseResult, removeTestCaseFromTestSuite } from 'rest/testAPI'; import { checkPermission } from 'utils/PermissionsUtils'; import { showErrorToast } from 'utils/ToastUtils'; @@ -90,6 +90,24 @@ const DataQualityTab: React.FC = ({ ); }, [permissions]); + const sortedData = useMemo( + () => + sortBy(testCases, (test) => { + switch (test.testCaseResult?.testCaseStatus) { + case TestCaseStatus.Failed: + return 0; + case TestCaseStatus.Aborted: + return 1; + case TestCaseStatus.Success: + return 2; + + default: + return 3; + } + }), + [testCases] + ); + const handleCancel = () => { setSelectedTestCase(undefined); }; @@ -356,7 +374,7 @@ const DataQualityTab: React.FC = ({ className="test-case-table-container" columns={columns} data-testid="test-case-table" - dataSource={testCases} + dataSource={sortedData} expandable={{ ...getTableExpandableConfig(), expandRowByClick: true, diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ProfilerDashboard/component/ProfilerDetailsCard.tsx b/openmetadata-ui/src/main/resources/ui/src/components/ProfilerDashboard/component/ProfilerDetailsCard.tsx index 403778b58ba0..7e56c43cee86 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/ProfilerDashboard/component/ProfilerDetailsCard.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/ProfilerDashboard/component/ProfilerDetailsCard.tsx @@ -11,7 +11,7 @@ * limitations under the License. */ -import { Card, Col, Row } from 'antd'; +import { Card, Col, Row, Typography } from 'antd'; import React, { useState } from 'react'; import { CartesianGrid, @@ -40,7 +40,8 @@ const ProfilerDetailsCard: React.FC = ({ tickFormatter, name, curveType, -}) => { + title, +}: ProfilerDetailsCardProps) => { const { data, information } = chartCollection; const [activeKeys, setActiveKeys] = useState([]); @@ -55,6 +56,11 @@ const ProfilerDetailsCard: React.FC = ({ className="shadow-none global-border-radius" data-testid="profiler-details-card-container"> + {title && ( + + {title} + + )} = ({ props: any ): ReactElement => { const { cx = 0, cy = 0, payload } = props; - let fill = - payload.status === TestCaseStatus.Success ? '#28A745' : undefined; + let fill = payload.status === TestCaseStatus.Success ? GREEN_3 : undefined; if (isUndefined(fill)) { - fill = payload.status === TestCaseStatus.Failed ? '#CB2431' : '#EFAE2F'; + fill = payload.status === TestCaseStatus.Failed ? RED_3 : YELLOW_2; } return ( @@ -165,9 +169,9 @@ const TestSummary: React.FC = ({ return ( diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ProfilerDashboard/profilerDashboard.interface.ts b/openmetadata-ui/src/main/resources/ui/src/components/ProfilerDashboard/profilerDashboard.interface.ts index fc479250f2bf..708b616bb720 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/ProfilerDashboard/profilerDashboard.interface.ts +++ b/openmetadata-ui/src/main/resources/ui/src/components/ProfilerDashboard/profilerDashboard.interface.ts @@ -52,6 +52,7 @@ export interface ProfilerDetailsCardProps { showYAxisCategory?: boolean; chartCollection: MetricChartType; name: string; + title?: string; tickFormatter?: string; curveType?: CurveType; } diff --git a/openmetadata-ui/src/main/resources/ui/src/components/TableProfiler/Component/ColumnProfileTable.tsx b/openmetadata-ui/src/main/resources/ui/src/components/TableProfiler/Component/ColumnProfileTable.tsx index fa1ecc8fc512..a18b287804b9 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/TableProfiler/Component/ColumnProfileTable.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/TableProfiler/Component/ColumnProfileTable.tsx @@ -14,6 +14,7 @@ import { Button, Space, Table, Typography } from 'antd'; import { ColumnsType } from 'antd/lib/table'; import FilterTablePlaceHolder from 'components/common/error-with-placeholder/FilterTablePlaceHolder'; +import { TableProfilerTab } from 'components/ProfilerDashboard/profilerDashboard.interface'; import { isEmpty, isUndefined } from 'lodash'; import Qs from 'qs'; import React, { FC, useEffect, useMemo, useState } from 'react'; @@ -24,15 +25,12 @@ import { DEFAULT_TEST_VALUE, INITIAL_TEST_RESULT_SUMMARY, } from '../../../constants/profiler.constant'; -import { ProfilerDashboardType } from '../../../enums/table.enum'; import { ColumnProfile } from '../../../generated/entity/data/table'; import { formatNumberWithComma } from '../../../utils/CommonUtils'; import { updateTestResults } from '../../../utils/DataQualityAndProfilerUtils'; -import { getProfilerDashboardWithFqnPath } from '../../../utils/RouterUtils'; import { getEncodedFqn } from '../../../utils/StringsUtils'; import Searchbar from '../../common/searchbar/Searchbar'; import TestIndicator from '../../common/TestIndicator/TestIndicator'; -import { ProfilerDashboardTab } from '../../ProfilerDashboard/profilerDashboard.interface'; import { ColumnProfileTableProps, columnTestResultType, @@ -93,7 +91,7 @@ const ColumnProfileTable: FC = ({ title: t('label.data-type'), dataIndex: 'dataTypeDisplay', key: 'dataType', - width: 250, + width: 150, render: (dataTypeDisplay: string) => { return ( @@ -167,21 +165,20 @@ const ColumnProfileTable: FC = ({ render: (_, record) => ( - {record.testCount || 0} + to={{ + search: Qs.stringify({ + activeTab: TableProfilerTab.DATA_QUALITY, + }), + }}> + {record.testCount ?? 0} ), - sorter: (col1, col2) => (col1.testCount || 0) - (col2.testCount || 0), + sorter: (col1, col2) => (col1.testCount ?? 0) - (col2.testCount ?? 0), }, { title: t('label.status'), dataIndex: 'dataQualityTest', key: 'dataQualityTest', - width: 120, render: (_, record) => { const summary = columnTestSummary?.[ @@ -270,7 +267,7 @@ const ColumnProfileTable: FC = ({ }} pagination={false} rowKey="name" - scroll={{ x: 1500 }} + scroll={{ x: true }} size="small" /> > diff --git a/openmetadata-ui/src/main/resources/ui/src/components/TableProfiler/Component/SingleColumnProfile.tsx b/openmetadata-ui/src/main/resources/ui/src/components/TableProfiler/Component/SingleColumnProfile.tsx index 74de665173c7..e12fe8a81257 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/TableProfiler/Component/SingleColumnProfile.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/TableProfiler/Component/SingleColumnProfile.tsx @@ -223,21 +223,27 @@ const SingleColumnProfile: FC = ({ data-testid="profiler-tab-container" gutter={[16, 16]}> - + @@ -247,6 +253,7 @@ const SingleColumnProfile: FC = ({ @@ -254,14 +261,12 @@ const SingleColumnProfile: FC = ({ className="shadow-none global-border-radius" data-testid="histogram-metrics"> - - + + {t('label.data-distribution')} - + - + diff --git a/openmetadata-ui/src/main/resources/ui/src/components/TableProfiler/Component/TableProfilerChart.tsx b/openmetadata-ui/src/main/resources/ui/src/components/TableProfiler/Component/TableProfilerChart.tsx index 5cd7d5adb35f..ecd3d3089436 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/TableProfiler/Component/TableProfilerChart.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/TableProfiler/Component/TableProfilerChart.tsx @@ -11,10 +11,11 @@ * limitations under the License. */ -import { Card, Col, Row } from 'antd'; +import { Card, Col, Row, Typography } from 'antd'; import { AxiosError } from 'axios'; import { DateRangeObject } from 'components/ProfilerDashboard/component/TestSummary'; import React, { useEffect, useState } from 'react'; +import { useTranslation } from 'react-i18next'; import { useParams } from 'react-router-dom'; import { getSystemProfileList, getTableProfilesList } from 'rest/tableAPI'; import { @@ -40,6 +41,7 @@ const TableProfilerChart = ({ showOperationGraph = false, }: TableProfilerChartProps) => { const { datasetFQN } = useParams<{ datasetFQN: string }>(); + const { t } = useTranslation(); const [rowCountMetrics, setRowCountMetrics] = useState( INITIAL_ROW_METRIC_VALUE @@ -111,6 +113,7 @@ const TableProfilerChart = ({ chartCollection={rowCountMetrics} curveType="stepAfter" name="rowCount" + title={t('label.data-volume')} /> {showOperationGraph && ( @@ -120,6 +123,11 @@ const TableProfilerChart = ({ className="shadow-none global-border-radius" data-testid="operation-date-metrics"> + + + {t('label.table-update-plural')} + + + + + {t('label.volume-change')} + + = ({ {overallSummery.map((summery) => ( - + { showSuccessToast(t('server.task-resolved-successfully')); + rest.onUpdateEntityDetails?.(); history.push(getEntityLink(entityType ?? '', entityFQN ?? '')); }) .catch((err: AxiosError) => showErrorToast(err)); diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Task/TaskTab/TaskTab.interface.ts b/openmetadata-ui/src/main/resources/ui/src/components/Task/TaskTab/TaskTab.interface.ts index 44cfac07f6fc..de784903b577 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Task/TaskTab/TaskTab.interface.ts +++ b/openmetadata-ui/src/main/resources/ui/src/components/Task/TaskTab/TaskTab.interface.ts @@ -20,6 +20,7 @@ export type TaskTabProps = { task: Thread; owner?: EntityReference; tags?: TagLabel[]; + onUpdateEntityDetails?: () => void; description?: string; } & ( | TableTaskTabProps diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Team/TeamDetails/TeamDetailsV1.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Team/TeamDetails/TeamDetailsV1.tsx index 743b7825b3de..cfb166ed338a 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Team/TeamDetails/TeamDetailsV1.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Team/TeamDetails/TeamDetailsV1.tsx @@ -1077,7 +1077,7 @@ const TeamDetailsV1 = ({ onChange={updateActiveTab} /> - + {currentTab === TeamsPageTab.TEAMS && (currentTeam.childrenCount === 0 && !searchTerm ? ( fetchErrorPlaceHolder({ @@ -1113,6 +1113,7 @@ const TeamDetailsV1 = ({ {t('label.deleted')} + = ({ followTopicHandler, unFollowTopicHandler, versionHandler, - feedCount, - entityFieldThreadCount, createThread, - entityFieldTaskCount, + onTopicUpdate, }: TopicDetailsProps) => { const { t } = useTranslation(); @@ -73,6 +76,13 @@ const TopicDetails: React.FC = ({ const history = useHistory(); const [isEdit, setIsEdit] = useState(false); const [threadLink, setThreadLink] = useState(''); + const [feedCount, setFeedCount] = useState(0); + const [entityFieldThreadCount, setEntityFieldThreadCount] = useState< + EntityFieldThreadCount[] + >([]); + const [entityFieldTaskCount, setEntityFieldTaskCount] = useState< + EntityFieldThreadCount[] + >([]); const [threadType, setThreadType] = useState( ThreadType.Conversation @@ -261,6 +271,22 @@ const TopicDetails: React.FC = ({ } }; + const getEntityFeedCount = () => { + getFeedCounts( + EntityType.TOPIC, + topicFQN, + setEntityFieldThreadCount, + setEntityFieldTaskCount, + setFeedCount + ); + }; + + useEffect(() => { + if (topicPermissions.ViewAll || topicPermissions.ViewBasic) { + getEntityFeedCount(); + } + }, [topicPermissions, topicFQN]); + const tabs = useMemo( () => [ { @@ -355,7 +381,7 @@ const TopicDetails: React.FC = ({ Promise.resolve()} + onFeedUpdate={getEntityFeedCount} /> ), diff --git a/openmetadata-ui/src/main/resources/ui/src/components/TopicDetails/TopicDetails.interface.ts b/openmetadata-ui/src/main/resources/ui/src/components/TopicDetails/TopicDetails.interface.ts index 60231c142429..f1e389c2327f 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/TopicDetails/TopicDetails.interface.ts +++ b/openmetadata-ui/src/main/resources/ui/src/components/TopicDetails/TopicDetails.interface.ts @@ -14,13 +14,9 @@ import { CreateThread } from '../../generated/api/feed/createThread'; import { CleanupPolicy, Topic } from '../../generated/entity/data/topic'; import { SchemaType } from '../../generated/type/schema'; -import { EntityFieldThreadCount } from '../../interface/feed.interface'; export interface TopicDetailsProps { topicDetails: Topic; - feedCount: number; - entityFieldThreadCount: EntityFieldThreadCount[]; - entityFieldTaskCount: EntityFieldThreadCount[]; createThread: (data: CreateThread) => void; followTopicHandler: () => Promise; unFollowTopicHandler: () => Promise; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/TopicDetails/TopicDetails.test.tsx b/openmetadata-ui/src/main/resources/ui/src/components/TopicDetails/TopicDetails.test.tsx index 7d693ce957d0..65714b0396f7 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/TopicDetails/TopicDetails.test.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/TopicDetails/TopicDetails.test.tsx @@ -54,9 +54,6 @@ const topicDetailsProps: TopicDetailsProps = { unFollowTopicHandler: jest.fn(), onTopicUpdate: jest.fn(), versionHandler: jest.fn(), - feedCount: 0, - entityFieldThreadCount: [], - entityFieldTaskCount: [], createThread: jest.fn(), }; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Users/Users.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Users/Users.component.tsx index d7ec9995412d..10aadc0ce066 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Users/Users.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Users/Users.component.tsx @@ -25,7 +25,7 @@ import { SearchedDataProps } from 'components/searched-data/SearchedData.interfa import TabsLabel from 'components/TabsLabel/TabsLabel.component'; import TeamsSelectable from 'components/TeamsSelectable/TeamsSelectable'; import { EntityType } from 'enums/entity.enum'; -import { isEmpty, toLower } from 'lodash'; +import { isEmpty, noop, toLower } from 'lodash'; import { observer } from 'mobx-react'; import React, { Fragment, @@ -729,7 +729,7 @@ const Users = ({ Promise.resolve()} + onFeedUpdate={noop} /> ); diff --git a/openmetadata-ui/src/main/resources/ui/src/components/common/SummaryCard/SummaryCard.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/common/SummaryCard/SummaryCard.component.tsx index dfbb80a1b426..74ee76376290 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/common/SummaryCard/SummaryCard.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/common/SummaryCard/SummaryCard.component.tsx @@ -55,7 +55,13 @@ export const SummaryCard = ({ {showProgressBar && ( - + `${percent}%`} + percent={percent} + type="circle" + width={65} + /> )} ); diff --git a/openmetadata-ui/src/main/resources/ui/src/constants/Color.constants.ts b/openmetadata-ui/src/main/resources/ui/src/constants/Color.constants.ts new file mode 100644 index 000000000000..c71412ac63bc --- /dev/null +++ b/openmetadata-ui/src/main/resources/ui/src/constants/Color.constants.ts @@ -0,0 +1,18 @@ +/* + * 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. + */ +// keeping same name as variable.less + +export const GREEN_3 = '#48ca9e'; +export const GREEN_3_OPACITY = '#48ca9e30'; +export const YELLOW_2 = '#ffbe0e'; +export const RED_3 = '#f24822'; diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json index 4d8c62a3197e..5046638a613b 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json @@ -190,6 +190,7 @@ "dashboard-lowercase-plural": "dashboards", "dashboard-name": "Dashboard Name", "dashboard-plural": "Dashboards", + "data-aggregation": "Data Aggregation", "data-asset": "Data Asset", "data-asset-name": "Data Asset Name", "data-asset-plural": "Data Assets", @@ -197,6 +198,7 @@ "data-asset-type": "Data Asset Type", "data-assets-report": "Data Assets Report", "data-assets-with-tier-plural": "Data Assets with Tiers", + "data-count-plural": "Data Counts", "data-distribution": "Data Distribution", "data-entity": "Data {{entity}}", "data-insight": "Data Insight", @@ -215,9 +217,12 @@ "data-model": "Data Model", "data-model-plural": "Data Models", "data-model-type": "Data Model Type", + "data-proportion-plural": "Data Proportions", "data-quality": "Data Quality", "data-quality-test": "Data Quality Test", + "data-quartile-plural": "Data Quartiles", "data-type": "Data Type", + "data-volume": "Data Volume", "database": "Database", "database-lowercase": "database", "database-name": "Database Name", @@ -875,6 +880,7 @@ "table-plural": "Tables", "table-profile": "Table Profile", "table-tests-summary": "Table Tests Summary", + "table-update-plural": "Table Updates", "tag": "Tag", "tag-category-lowercase": "tag category", "tag-lowercase": "tag", @@ -997,6 +1003,7 @@ "view-more": "View more", "view-new-count": "View {{count}} new", "view-plural": "Views", + "volume-change": "Volume Change", "warning": "Warning", "web-analytics-report": "Web Analytics Report", "webhook": "Webhook", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/es-es.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/es-es.json index fc7afc8c60ad..0fe4d9b41d21 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/es-es.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/es-es.json @@ -190,6 +190,7 @@ "dashboard-lowercase-plural": "dashboards", "dashboard-name": "Nombre del dashboard", "dashboard-plural": "Dashboards", + "data-aggregation": "Data Aggregation", "data-asset": "Activo de datos", "data-asset-name": "Nombre del activo de datos", "data-asset-plural": "Activos de datos", @@ -197,6 +198,7 @@ "data-asset-type": "Tipo de activo de datos", "data-assets-report": "Informe de activos de datos", "data-assets-with-tier-plural": "Activos de datos con niveles", + "data-count-plural": "Data Counts", "data-distribution": "Distribución de datos", "data-entity": "{{entity}} de datos", "data-insight": "Visión de datos", @@ -215,9 +217,12 @@ "data-model": "Data Model", "data-model-plural": "Data Models", "data-model-type": "Data Model Type", + "data-proportion-plural": "Data Proportions", "data-quality": "Data Quality", "data-quality-test": "Prueba de calidad de datos", + "data-quartile-plural": "Data Quartiles", "data-type": "Tipo de datos", + "data-volume": "Data Volume", "database": "Base de datos", "database-lowercase": "base de datos", "database-name": "Nombre de la base de datos", @@ -875,6 +880,7 @@ "table-plural": "Tablas", "table-profile": "Table Profile", "table-tests-summary": "Resumen de Tests de la Tabla", + "table-update-plural": "Table Updates", "tag": "Etiqueta", "tag-category-lowercase": "categoría de etiqueta", "tag-lowercase": "etiqueta", @@ -997,6 +1003,7 @@ "view-more": "Ver más", "view-new-count": "Ver {{count}} nuevo", "view-plural": "Vistas", + "volume-change": "Volume Change", "warning": "Warning", "web-analytics-report": "Informe de análisis web", "webhook": "Webhook", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/fr-fr.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/fr-fr.json index 111d4fa2a444..a9160fe2f381 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/fr-fr.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/fr-fr.json @@ -190,6 +190,7 @@ "dashboard-lowercase-plural": "tableaux de bord", "dashboard-name": "Nom du Tableau de Bord", "dashboard-plural": "Tableaux de Bord", + "data-aggregation": "Data Aggregation", "data-asset": "Actif de Données", "data-asset-name": "Resources de Données par Nom", "data-asset-plural": "Resources de Données", @@ -197,6 +198,7 @@ "data-asset-type": "Type de Resources de Données", "data-assets-report": "Rapport des Actifs de Donnés", "data-assets-with-tier-plural": "Actifs de Donnés avec Niveau", + "data-count-plural": "Data Counts", "data-distribution": "Distribution des Données", "data-entity": "Donnée {{entity}}", "data-insight": "Aperçu des Données", @@ -215,9 +217,12 @@ "data-model": "Modèle de Donné", "data-model-plural": "Modèles de Donnés", "data-model-type": "Type de Modèle de Donné", + "data-proportion-plural": "Data Proportions", "data-quality": "Qualité des Données", "data-quality-test": "Test de Qualité des Données", + "data-quartile-plural": "Data Quartiles", "data-type": "Type de donnée", + "data-volume": "Data Volume", "database": "Base de Données", "database-lowercase": "base de données", "database-name": "Nom de la Base de Données", @@ -875,6 +880,7 @@ "table-plural": "Tables", "table-profile": "Table Profile", "table-tests-summary": "Résumé des tests de la table", + "table-update-plural": "Table Updates", "tag": "Tag", "tag-category-lowercase": "catégorie du tag", "tag-lowercase": "tag", @@ -997,6 +1003,7 @@ "view-more": "Voir plus", "view-new-count": "Voir {{count}} nouveau", "view-plural": "Voir", + "volume-change": "Volume Change", "warning": "Attention", "web-analytics-report": "Rapport Analytique Web", "webhook": "Webhook", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/ja-jp.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/ja-jp.json index ce3abee87440..074672ea0bf2 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/ja-jp.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/ja-jp.json @@ -190,6 +190,7 @@ "dashboard-lowercase-plural": "dashboards", "dashboard-name": "ダッシュボード名", "dashboard-plural": "ダッシュボード", + "data-aggregation": "Data Aggregation", "data-asset": "データアセット", "data-asset-name": "データアセット名", "data-asset-plural": "データアセット", @@ -197,6 +198,7 @@ "data-asset-type": "データアセットの型", "data-assets-report": "データアセットのレポート", "data-assets-with-tier-plural": "階層化されたデータアセット", + "data-count-plural": "Data Counts", "data-distribution": "Data Distribution", "data-entity": "データ {{entity}}", "data-insight": "データインサイト", @@ -215,9 +217,12 @@ "data-model": "Data Model", "data-model-plural": "Data Models", "data-model-type": "Data Model Type", + "data-proportion-plural": "Data Proportions", "data-quality": "Data Quality", "data-quality-test": "データ品質テスト", + "data-quartile-plural": "Data Quartiles", "data-type": "データ型", + "data-volume": "Data Volume", "database": "データベース", "database-lowercase": "データベース", "database-name": "データベース名", @@ -875,6 +880,7 @@ "table-plural": "テーブル", "table-profile": "Table Profile", "table-tests-summary": "Table Tests Summary", + "table-update-plural": "Table Updates", "tag": "タグ", "tag-category-lowercase": "タグのカテゴリ", "tag-lowercase": "タグ", @@ -997,6 +1003,7 @@ "view-more": "もっと見る", "view-new-count": "View {{count}} new", "view-plural": "Views", + "volume-change": "Volume Change", "warning": "Warning", "web-analytics-report": "Web Analytics Report", "webhook": "ウェブフック", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/pt-br.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/pt-br.json index 0ee78d891d8a..fbc9e65f1f19 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/pt-br.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/pt-br.json @@ -190,6 +190,7 @@ "dashboard-lowercase-plural": "dashboards", "dashboard-name": "Nome do dashboard", "dashboard-plural": "Dashboards", + "data-aggregation": "Data Aggregation", "data-asset": "Recurso de dados", "data-asset-name": "Nome do recurso", "data-asset-plural": "Nomes dos recursos", @@ -197,6 +198,7 @@ "data-asset-type": "Tipo de recurso de dados", "data-assets-report": "Relatório de recurso de dados", "data-assets-with-tier-plural": "Recursos de dados hierárquicos", + "data-count-plural": "Data Counts", "data-distribution": "Distribuição de dados", "data-entity": "Dados {{entity}}", "data-insight": "Visão dos Dados", @@ -215,9 +217,12 @@ "data-model": "Data Model", "data-model-plural": "Data Models", "data-model-type": "Data Model Type", + "data-proportion-plural": "Data Proportions", "data-quality": "Data Quality", "data-quality-test": "Teste de qualidade de dados", + "data-quartile-plural": "Data Quartiles", "data-type": "Tipo de dado", + "data-volume": "Data Volume", "database": "Banco de dados", "database-lowercase": "banco de dados", "database-name": "Nome do banco de dados", @@ -875,6 +880,7 @@ "table-plural": "Tabelas", "table-profile": "Table Profile", "table-tests-summary": "Resumo dos Testes da Tabela", + "table-update-plural": "Table Updates", "tag": "Tag", "tag-category-lowercase": "categoria de tag", "tag-lowercase": "tag", @@ -997,6 +1003,7 @@ "view-more": "Ver mais", "view-new-count": "Ver {{count}} novo", "view-plural": "Visualizações", + "volume-change": "Volume Change", "warning": "Warning", "web-analytics-report": "Relatório de análise da web", "webhook": "Webhook", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/zh-cn.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/zh-cn.json index 897b80d5c0d1..e4dd1dbbf22f 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/zh-cn.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/zh-cn.json @@ -190,6 +190,7 @@ "dashboard-lowercase-plural": "仪表板", "dashboard-name": "仪表板名称", "dashboard-plural": "仪表板", + "data-aggregation": "Data Aggregation", "data-asset": "数据资产", "data-asset-name": "数据资产名", "data-asset-plural": "数据资产", @@ -197,6 +198,7 @@ "data-asset-type": "数据资产类型", "data-assets-report": "数据资产报告", "data-assets-with-tier-plural": "带有分级信息的数据资产", + "data-count-plural": "Data Counts", "data-distribution": "数据分发", "data-entity": "数据{{entity}}", "data-insight": "数据洞察", @@ -215,9 +217,12 @@ "data-model": "数据模型", "data-model-plural": "数据模型", "data-model-type": "数据模型类型", + "data-proportion-plural": "Data Proportions", "data-quality": "数据质控", "data-quality-test": "数据质控测试", + "data-quartile-plural": "Data Quartiles", "data-type": "数据类型", + "data-volume": "Data Volume", "database": "数据库", "database-lowercase": "数据库", "database-name": "数据库名称", @@ -875,6 +880,7 @@ "table-plural": "数据表", "table-profile": "数据表分析", "table-tests-summary": "数据表测试概要", + "table-update-plural": "Table Updates", "tag": "标签", "tag-category-lowercase": "标签分类", "tag-lowercase": "标签", @@ -997,6 +1003,7 @@ "view-more": "查看更多", "view-new-count": "查看{{count}}个新的", "view-plural": "查看", + "volume-change": "Volume Change", "warning": "警告", "web-analytics-report": "网络分析报告", "webhook": "Webhook", diff --git a/openmetadata-ui/src/main/resources/ui/src/mocks/TestSuite.mock.ts b/openmetadata-ui/src/main/resources/ui/src/mocks/TestSuite.mock.ts index 657b4f591275..d3b0c3963e77 100644 --- a/openmetadata-ui/src/main/resources/ui/src/mocks/TestSuite.mock.ts +++ b/openmetadata-ui/src/main/resources/ui/src/mocks/TestSuite.mock.ts @@ -379,7 +379,7 @@ export const MOCK_TEST_CASE = [ ], testCaseResult: { timestamp: 1677046336, - testCaseStatus: 'Success', + testCaseStatus: 'Failed', result: 'Found 99 value(s) matching regex pattern vs 99 value(s) in the column.', testResultValue: [ diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/ContainerPage/ContainerPage.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/ContainerPage/ContainerPage.tsx index f8cacf433d69..63c4013b9d26 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/ContainerPage/ContainerPage.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/ContainerPage/ContainerPage.tsx @@ -674,7 +674,8 @@ const ContainerPage = () => { Promise.resolve()} + onFeedUpdate={getEntityFeedCount} + onUpdateEntityDetails={() => fetchContainerDetail(containerName)} /> ), diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/DashboardDetailsPage/DashboardDetailsPage.component.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/DashboardDetailsPage/DashboardDetailsPage.component.tsx index bfeb26df4230..2dbfe1209de0 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/DashboardDetailsPage/DashboardDetailsPage.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/DashboardDetailsPage/DashboardDetailsPage.component.tsx @@ -36,12 +36,10 @@ import { EntityType } from '../../enums/entity.enum'; import { CreateThread } from '../../generated/api/feed/createThread'; import { Chart } from '../../generated/entity/data/chart'; import { Dashboard } from '../../generated/entity/data/dashboard'; -import { EntityFieldThreadCount } from '../../interface/feed.interface'; import { addToRecentViewed, getCurrentUserId, getEntityMissingError, - getFeedCounts, } from '../../utils/CommonUtils'; import { defaultFields, @@ -69,14 +67,6 @@ const DashboardDetailsPage = () => { const [charts, setCharts] = useState([]); const [isError, setIsError] = useState(false); - const [feedCount, setFeedCount] = useState(0); - const [entityFieldThreadCount, setEntityFieldThreadCount] = useState< - EntityFieldThreadCount[] - >([]); - const [entityFieldTaskCount, setEntityFieldTaskCount] = useState< - EntityFieldThreadCount[] - >([]); - const [dashboardPermissions, setDashboardPermissions] = useState( DEFAULT_ENTITY_PERMISSION ); @@ -102,16 +92,6 @@ const DashboardDetailsPage = () => { } }; - const getEntityFeedCount = () => { - getFeedCounts( - EntityType.DASHBOARD, - dashboardFQN, - setEntityFieldThreadCount, - setEntityFieldTaskCount, - setFeedCount - ); - }; - const saveUpdatedDashboardData = (updatedData: Dashboard) => { const jsonPatch = compare( omitBy(dashboardDetails, isUndefined), @@ -183,8 +163,6 @@ const DashboardDetailsPage = () => { [key]: response[key], }; }); - - getEntityFeedCount(); } catch (error) { showErrorToast(error as AxiosError); } @@ -198,7 +176,6 @@ const DashboardDetailsPage = () => { ...prev, followers: [...(prev?.followers ?? []), ...newValue], })); - getEntityFeedCount(); } catch (error) { showErrorToast( error as AxiosError, @@ -221,8 +198,6 @@ const DashboardDetailsPage = () => { (follower) => follower.id !== oldValue[0].id ) ?? [], })); - - getEntityFeedCount(); } catch (error) { showErrorToast( error as AxiosError, @@ -267,7 +242,6 @@ const DashboardDetailsPage = () => { // which leads to wrong PATCH payload sent after further tags removal return sortTagsForCharts(charts); }); - getEntityFeedCount(); } catch (error) { showErrorToast( error as AxiosError, @@ -288,7 +262,6 @@ const DashboardDetailsPage = () => { const createThread = async (data: CreateThread) => { try { await postThread(data); - getEntityFeedCount(); } catch (error) { showErrorToast( error as AxiosError, @@ -302,7 +275,6 @@ const DashboardDetailsPage = () => { useEffect(() => { if (dashboardPermissions.ViewAll || dashboardPermissions.ViewBasic) { fetchDashboardDetail(dashboardFQN); - getEntityFeedCount(); } }, [dashboardFQN, dashboardPermissions]); @@ -331,9 +303,6 @@ const DashboardDetailsPage = () => { charts={charts} createThread={createThread} dashboardDetails={dashboardDetails} - entityFieldTaskCount={entityFieldTaskCount} - entityFieldThreadCount={entityFieldThreadCount} - feedCount={feedCount} followDashboardHandler={followDashboard} unFollowDashboardHandler={unFollowDashboard} versionHandler={versionHandler} diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/DataModelPage/DataModelPage.component.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/DataModelPage/DataModelPage.component.tsx index 31f21c20a2c0..f7d95741b40f 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/DataModelPage/DataModelPage.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/DataModelPage/DataModelPage.component.tsx @@ -22,13 +22,11 @@ import { ResourceEntity, } from 'components/PermissionProvider/PermissionProvider.interface'; import { ERROR_PLACEHOLDER_TYPE } from 'enums/common.enum'; -import { EntityType } from 'enums/entity.enum'; import { compare } from 'fast-json-patch'; import { CreateThread } from 'generated/api/feed/createThread'; import { DashboardDataModel } from 'generated/entity/data/dashboardDataModel'; import { Include } from 'generated/type/include'; import { LabelType, State, TagSource } from 'generated/type/tagLabel'; -import { EntityFieldThreadCount } from 'interface/feed.interface'; import { isUndefined, omitBy } from 'lodash'; import { observer } from 'mobx-react'; import { EntityTags } from 'Models'; @@ -48,11 +46,7 @@ import { removeDataModelFollower, } from 'rest/dataModelsAPI'; import { postThread } from 'rest/feedsAPI'; -import { - getCurrentUserId, - getEntityMissingError, - getFeedCounts, -} from 'utils/CommonUtils'; +import { getCurrentUserId, getEntityMissingError } from 'utils/CommonUtils'; import { getSortedDataModelColumnTags } from 'utils/DataModelsUtils'; import { DEFAULT_ENTITY_PERMISSION } from 'utils/PermissionsUtils'; import { getTagsWithoutTier, getTierTags } from 'utils/TableUtils'; @@ -73,13 +67,6 @@ const DataModelsPage = () => { {} as DashboardDataModel ); - const [feedCount, setFeedCount] = useState(0); - const [entityFieldThreadCount, setEntityFieldThreadCount] = useState< - EntityFieldThreadCount[] - >([]); - - const [, setEntityFieldTaskCount] = useState([]); - // get current user details const currentUser = useMemo( () => AppState.getCurrentUserDetails(), @@ -102,16 +89,6 @@ const DataModelsPage = () => { }; }, [dataModelData]); - const getEntityFeedCount = () => { - getFeedCounts( - EntityType.DASHBOARD_DATA_MODEL, - dashboardDataModelFQN, - setEntityFieldThreadCount, - setEntityFieldTaskCount, - setFeedCount - ); - }; - const fetchResourcePermission = async (dashboardDataModelFQN: string) => { setIsLoading(true); try { @@ -134,7 +111,6 @@ const DataModelsPage = () => { const createThread = async (data: CreateThread) => { try { await postThread(data); - getEntityFeedCount(); } catch (error) { showErrorToast( error as AxiosError, @@ -180,7 +156,6 @@ const DataModelsPage = () => { description: newDescription, version, })); - getEntityFeedCount(); } catch (error) { showErrorToast(error as AxiosError); } @@ -226,7 +201,6 @@ const DataModelsPage = () => { tags: newTags, version, })); - getEntityFeedCount(); } catch (error) { showErrorToast(error as AxiosError); } @@ -245,7 +219,6 @@ const DataModelsPage = () => { owner: newOwner, version, })); - getEntityFeedCount(); } catch (error) { showErrorToast(error as AxiosError); } @@ -274,7 +247,6 @@ const DataModelsPage = () => { tags: newTags, version, })); - getEntityFeedCount(); } } catch (error) { showErrorToast(error as AxiosError); @@ -295,7 +267,6 @@ const DataModelsPage = () => { columns: getSortedDataModelColumnTags(newColumns), version, })); - getEntityFeedCount(); } catch (error) { showErrorToast(error as AxiosError); } @@ -313,7 +284,6 @@ const DataModelsPage = () => { [key]: response[key], version: response.version, })); - getEntityFeedCount(); } catch (error) { showErrorToast(error as AxiosError); } @@ -322,7 +292,6 @@ const DataModelsPage = () => { useEffect(() => { if (hasViewPermission) { fetchDataModelDetails(dashboardDataModelFQN); - getEntityFeedCount(); } }, [dashboardDataModelFQN, dataModelPermissions]); @@ -352,8 +321,6 @@ const DataModelsPage = () => { createThread={createThread} dataModelData={dataModelData} dataModelPermissions={dataModelPermissions} - entityFieldThreadCount={entityFieldThreadCount} - feedCount={feedCount} handleColumnUpdateDataModel={handleColumnUpdateDataModel} handleFollowDataModel={handleFollowDataModel} handleUpdateDescription={handleUpdateDescription} diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/DatabaseSchemaPage/DatabaseSchemaPage.component.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/DatabaseSchemaPage/DatabaseSchemaPage.component.tsx index 1b522b2415f1..f756513e89e8 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/DatabaseSchemaPage/DatabaseSchemaPage.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/DatabaseSchemaPage/DatabaseSchemaPage.component.tsx @@ -741,7 +741,8 @@ const DatabaseSchemaPage: FunctionComponent = () => { Promise.resolve()} + onFeedUpdate={getEntityFeedCount} + onUpdateEntityDetails={getDetailsByFQN} /> )} diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/MlModelPage/MlModelPage.component.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/MlModelPage/MlModelPage.component.tsx index 520bbc047819..28e2196355d0 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/MlModelPage/MlModelPage.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/MlModelPage/MlModelPage.component.tsx @@ -35,11 +35,9 @@ import { getVersionPath } from '../../constants/constants'; import { EntityType } from '../../enums/entity.enum'; import { CreateThread } from '../../generated/api/feed/createThread'; import { Mlmodel } from '../../generated/entity/data/mlmodel'; -import { EntityFieldThreadCount } from '../../interface/feed.interface'; import { getCurrentUserId, getEntityMissingError, - getFeedCounts, sortTagsCaseInsensitive, } from '../../utils/CommonUtils'; import { getEntityName } from '../../utils/EntityUtils'; @@ -59,14 +57,6 @@ const MlModelPage = () => { DEFAULT_ENTITY_PERMISSION ); - const [feedCount, setFeedCount] = useState(0); - const [entityFieldThreadCount, setEntityFieldThreadCount] = useState< - EntityFieldThreadCount[] - >([]); - const [entityFieldTaskCount, setEntityFieldTaskCount] = useState< - EntityFieldThreadCount[] - >([]); - const [currentVersion, setCurrentVersion] = useState(); const { getEntityPermissionByFqn } = usePermissionProvider(); @@ -90,16 +80,6 @@ const MlModelPage = () => { } }; - const fetchEntityFeedCount = () => { - getFeedCounts( - EntityType.MLMODEL, - mlModelFqn, - setEntityFieldThreadCount, - setEntityFieldTaskCount, - setFeedCount - ); - }; - const fetchMlModelDetails = async (name: string) => { setIsDetailLoading(true); try { @@ -113,6 +93,12 @@ const MlModelPage = () => { } }; + useEffect(() => { + if (mlModelPermissions.ViewAll || mlModelPermissions.ViewBasic) { + fetchMlModelDetails(mlModelFqn); + } + }, [mlModelPermissions, mlModelFqn]); + const saveUpdatedMlModelData = (updatedData: Mlmodel) => { const jsonPatch = compare(omitBy(mlModelDetail, isUndefined), updatedData); @@ -128,7 +114,6 @@ const MlModelPage = () => { ...preVDetail, description: description, })); - fetchEntityFeedCount(); } catch (error) { showErrorToast(error as AxiosError); } @@ -142,7 +127,6 @@ const MlModelPage = () => { ...preVDetail, followers: [...(mlModelDetail.followers || []), ...newValue], })); - fetchEntityFeedCount(); } catch (error) { showErrorToast( error as AxiosError, @@ -163,7 +147,6 @@ const MlModelPage = () => { (follower) => follower.id !== oldValue[0].id ), })); - fetchEntityFeedCount(); } catch (error) { showErrorToast( error as AxiosError, @@ -182,7 +165,6 @@ const MlModelPage = () => { tags: sortTagsCaseInsensitive(res.tags || []), })); setCurrentVersion(res.version?.toString()); - fetchEntityFeedCount(); } catch (error) { showErrorToast( error as AxiosError, @@ -205,7 +187,6 @@ const MlModelPage = () => { tags: res.tags, })); setCurrentVersion(res.version?.toString()); - fetchEntityFeedCount(); } catch (error) { showErrorToast( error as AxiosError, @@ -224,7 +205,6 @@ const MlModelPage = () => { mlFeatures: response.mlFeatures, })); setCurrentVersion(response.version?.toString()); - fetchEntityFeedCount(); } catch (error) { showErrorToast(error as AxiosError); } @@ -235,7 +215,6 @@ const MlModelPage = () => { const data = await saveUpdatedMlModelData(updatedMlModel); setMlModelDetail(data); setCurrentVersion(data.version?.toString()); - fetchEntityFeedCount(); } catch (error) { showErrorToast( error as AxiosError, @@ -249,7 +228,6 @@ const MlModelPage = () => { const createThread = async (data: CreateThread) => { try { await postThread(data); - fetchEntityFeedCount(); } catch (error) { showErrorToast( error as AxiosError, @@ -266,13 +244,6 @@ const MlModelPage = () => { ); }; - useEffect(() => { - if (mlModelPermissions.ViewAll || mlModelPermissions.ViewBasic) { - fetchMlModelDetails(mlModelFqn); - fetchEntityFeedCount(); - } - }, [mlModelPermissions, mlModelFqn]); - useEffect(() => { fetchResourcePermission(mlModelFqn); }, [mlModelFqn]); @@ -302,9 +273,6 @@ const MlModelPage = () => { { return; } try { - const response = await searchQuery({ - query: WILD_CARD_CHAR, - pageNumber: 0, - pageSize: 0, - queryFilter: createQueryFilter([], tableDetails.id), - searchIndex: SearchIndex.QUERY, - includeDeleted: false, - trackTotalHits: true, - fetchSource: false, + const response = await getQueriesList({ + limit: 0, + entityId: tableDetails.id, }); - setQueryCount(response.hits.total.value); + setQueryCount(response.paging.total); } catch (error) { setQueryCount(0); } @@ -516,6 +509,7 @@ const TableDetailsPageV1 = () => { owner={tableDetails?.owner} tags={tableDetails?.tags} onFeedUpdate={getEntityFeedCount} + onUpdateEntityDetails={fetchTableDetails} /> ), @@ -564,7 +558,10 @@ const TableDetailsPageV1 = () => { }, { label: ( - + ), isHidden: !( tablePermissions.ViewAll || @@ -786,10 +783,14 @@ const TableDetailsPageV1 = () => { } }; - if (loading || !tableDetails) { + if (loading) { return ; } + if (!tableDetails) { + return ; + } + return ( { const [isLoading, setLoading] = useState(true); const [isError, setIsError] = useState(false); - const [feedCount, setFeedCount] = useState(0); - const [entityFieldThreadCount, setEntityFieldThreadCount] = useState< - EntityFieldThreadCount[] - >([]); - const [entityFieldTaskCount, setEntityFieldTaskCount] = useState< - EntityFieldThreadCount[] - >([]); - const [topicPermissions, setTopicPermissions] = useState( DEFAULT_ENTITY_PERMISSION ); - const getEntityFeedCount = () => { - getFeedCounts( - EntityType.TOPIC, - topicFQN, - setEntityFieldThreadCount, - setEntityFieldTaskCount, - setFeedCount - ); - }; - const { id: topicId, version: currentVersion } = topicDetails; const saveUpdatedTopicData = (updatedData: Topic) => { @@ -110,7 +90,6 @@ const TopicDetailsPage: FunctionComponent = () => { [key]: res[key], }; }); - getEntityFeedCount(); } catch (error) { showErrorToast(error as AxiosError); } @@ -181,7 +160,6 @@ const TopicDetailsPage: FunctionComponent = () => { ...prev, followers: [...(prev?.followers ?? []), ...newValue], })); - getEntityFeedCount(); } catch (error) { showErrorToast( error as AxiosError, @@ -202,7 +180,6 @@ const TopicDetailsPage: FunctionComponent = () => { (follower) => follower.id !== oldValue[0].id ), })); - getEntityFeedCount(); } catch (error) { showErrorToast( error as AxiosError, @@ -223,7 +200,6 @@ const TopicDetailsPage: FunctionComponent = () => { const createThread = async (data: CreateThread) => { try { await postThread(data); - getEntityFeedCount(); } catch (error) { showErrorToast( error as AxiosError, @@ -241,7 +217,6 @@ const TopicDetailsPage: FunctionComponent = () => { useEffect(() => { if (topicPermissions.ViewAll || topicPermissions.ViewBasic) { fetchTopicDetail(topicFQN); - getEntityFeedCount(); } }, [topicPermissions, topicFQN]); @@ -262,9 +237,6 @@ const TopicDetailsPage: FunctionComponent = () => { return ( { Promise.resolve()} + onFeedUpdate={getEntityFeedCount} /> )}