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 565118ca4ae..05986706fbf 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 @@ -11,13 +11,19 @@ * limitations under the License. */ -import { Tooltip } from 'antd'; +import { Space, Table, Tooltip } from 'antd'; +import { ColumnsType } from 'antd/lib/table'; import { AxiosError } from 'axios'; -import classNames from 'classnames'; import { compare } from 'fast-json-patch'; import { isUndefined } from 'lodash'; import { EntityTags, ExtraInfo, TagOption } from 'Models'; -import React, { RefObject, useCallback, useEffect, useState } from 'react'; +import React, { + RefObject, + useCallback, + useEffect, + useMemo, + useState, +} from 'react'; import { Link } from 'react-router-dom'; import { FQN_SEPARATOR_CHAR } from '../../constants/char.constants'; import { EntityField } from '../../constants/feed.constants'; @@ -38,7 +44,6 @@ import { getEntityName, getEntityPlaceHolder, getOwnerValue, - isEven, } from '../../utils/CommonUtils'; import { getEntityFeedLink } from '../../utils/EntityUtils'; import { getDefaultValue } from '../../utils/FeedElementUtils'; @@ -481,6 +486,121 @@ const DashboardDetails = ({ [paging] ); + const tableColumn: ColumnsType = useMemo( + () => [ + { + title: 'Chart Name', + dataIndex: 'chartName', + key: 'chartName', + width: 200, + render: (_, record) => ( + + + {getEntityName(record as unknown as EntityReference)} + + + + ), + }, + { + title: 'Chart Type', + dataIndex: 'chartType', + key: 'chartType', + width: 100, + }, + { + title: 'Description', + dataIndex: 'description', + key: 'description', + width: 300, + render: (text, record, index) => ( + +
+ {text ? ( + + ) : ( + No description + )} +
+ {!deleted && ( + + + + )} +
+ ), + }, + { + title: 'Tags', + dataIndex: 'tags', + key: 'tags', + width: 300, + render: (text, record, index) => ( +
handleTagContainerClick(record, index)}> + {deleted ? ( +
+ +
+ ) : ( + { + handleChartTagSelection(); + }} + onSelectionChange={(tags) => { + handleChartTagSelection(tags, { + chart: record, + index, + }); + }} + /> + )} +
+ ), + }, + ], + [ + dashboardPermissions.EditAll, + dashboardPermissions.EditTags, + editChartTags, + tagList, + deleted, + ] + ); + return (
@@ -567,132 +687,14 @@ const DashboardDetails = ({ />
-
- - - - - - - - - - - {charts.map((chart, index) => ( - - - - - - - ))} - -
Chart NameChart TypeDescriptionTags
- - - - {getEntityName( - chart as unknown as EntityReference - )} - - - - - - {chart.chartType} - -
-
-
- {chart.description ? ( - - ) : ( - - No description - - )} -
- {!deleted && ( - - - - )} -
-
-
- handleTagContainerClick(chart, index) - }> - {deleted ? ( -
- -
- ) : ( - { - handleChartTagSelection(); - }} - onSelectionChange={(tags) => { - handleChartTagSelection(tags, { - chart, - index, - }); - }} - /> - )} -
-
+ )} {activeTab === 2 && ( diff --git a/openmetadata-ui/src/main/resources/ui/src/components/DashboardVersion/DashboardVersion.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/DashboardVersion/DashboardVersion.component.tsx index 1e913f283c4..7c6114e4d28 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/DashboardVersion/DashboardVersion.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/DashboardVersion/DashboardVersion.component.tsx @@ -11,10 +11,12 @@ * limitations under the License. */ +import { Space, Table } from 'antd'; +import { ColumnsType } from 'antd/lib/table'; import classNames from 'classnames'; import { isUndefined } from 'lodash'; import { ExtraInfo } from 'Models'; -import React, { FC, useEffect, useState } from 'react'; +import React, { FC, useEffect, useMemo, useState } from 'react'; import { Link } from 'react-router-dom'; import { FQN_SEPARATOR_CHAR } from '../../constants/char.constants'; import { EntityField } from '../../constants/feed.constants'; @@ -22,9 +24,9 @@ import { OwnerType } from '../../enums/user.enum'; import { ChangeDescription, Dashboard, + EntityReference, } from '../../generated/entity/data/dashboard'; import { TagLabel } from '../../generated/type/tagLabel'; -import { isEven } from '../../utils/CommonUtils'; import { getDescriptionDiff, getDiffByFieldName, @@ -212,6 +214,51 @@ const DashboardVersion: FC = ({ ); }, [currentVersionData]); + const tableColumn: ColumnsType = useMemo( + () => [ + { + title: 'Chart Name', + dataIndex: 'name', + key: 'name', + render: (text, record) => ( + + + {record.displayName} + + + + ), + }, + { + title: 'Chart Type', + dataIndex: 'type', + key: 'type', + }, + { + title: 'Description', + dataIndex: 'description', + key: 'description', + render: (text) => + text ? ( + + ) : ( + No description + ), + }, + { + title: 'Tags', + dataIndex: 'tags', + key: 'tags', + }, + ], + [] + ); + return (
= ({ description={getDashboardDescription()} />
-
-
- - - - - - - - - - {(currentVersionData as Dashboard)?.charts?.map( - (chart, index) => ( - - - - - - ) - )} - -
Chart NameChart TypeDescriptionTags
- - - - {chart.displayName} - - - - - {chart.type} - {chart.description ? ( - - ) : ( - - No description - - )} - -
+
+ diff --git a/openmetadata-ui/src/main/resources/ui/src/components/PipelineVersion/PipelineVersion.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/PipelineVersion/PipelineVersion.component.tsx index 192f77a6842..20e0145b2d3 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/PipelineVersion/PipelineVersion.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/PipelineVersion/PipelineVersion.component.tsx @@ -11,10 +11,12 @@ * limitations under the License. */ +import { Space, Table } from 'antd'; +import { ColumnsType } from 'antd/lib/table'; import classNames from 'classnames'; import { isUndefined } from 'lodash'; import { ExtraInfo } from 'Models'; -import React, { FC, useEffect, useState } from 'react'; +import React, { FC, useEffect, useMemo, useState } from 'react'; import { Link } from 'react-router-dom'; import { FQN_SEPARATOR_CHAR } from '../../constants/char.constants'; import { EntityField } from '../../constants/feed.constants'; @@ -22,9 +24,9 @@ import { OwnerType } from '../../enums/user.enum'; import { ChangeDescription, Pipeline, + Task, } from '../../generated/entity/data/pipeline'; import { TagLabel } from '../../generated/type/tagLabel'; -import { isEven } from '../../utils/CommonUtils'; import { getDescriptionDiff, getDiffByFieldName, @@ -212,6 +214,46 @@ const PipelineVersion: FC = ({ ); }, [currentVersionData]); + const tableColumn: ColumnsType = useMemo( + () => [ + { + title: 'Task Name', + dataIndex: 'displayName', + key: 'displayName', + render: (text, record) => ( + + + {text} + + + + ), + }, + { + title: 'Description', + dataIndex: 'description', + key: 'description', + render: (text) => + text ? ( + + ) : ( + No description + ), + }, + { + title: 'Task Type', + dataIndex: 'taskType', + key: 'taskType', + }, + ], + [] + ); + return (
= ({ description={getPipelineDescription()} />
-
-
- - - - - - - - - {(currentVersionData as Pipeline)?.tasks?.map( - (task, index) => ( - - - - - - ) - )} - -
Task NameDescriptionTask Type
- - - - {task.displayName} - - - - - -
-
- {task.description ? ( - - ) : ( - - No description - - )} -
- -
-
- {task.taskType} -
+
+ 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 d956c566d80..705790e976e 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 @@ -11,9 +11,9 @@ * limitations under the License. */ -import { Col, Row, Space } from 'antd'; +import { Col, Row, Space, Table as TableAntd } from 'antd'; +import { ColumnsType } from 'antd/lib/table'; import { AxiosError } from 'axios'; -import classNames from 'classnames'; import { compare, Operation } from 'fast-json-patch'; import { startCase } from 'lodash'; import { observer } from 'mobx-react'; @@ -23,6 +23,7 @@ import React, { FunctionComponent, RefObject, useEffect, + useMemo, useRef, useState, } from 'react'; @@ -81,7 +82,6 @@ import jsonData from '../../jsons/en'; import { getEntityName, getPartialNameFromTableFQN, - isEven, } from '../../utils/CommonUtils'; import { databaseSchemaDetailsTabs, @@ -516,60 +516,49 @@ const DatabaseSchemaPage: FunctionComponent = () => { } }; + const tableColumn: ColumnsType
= useMemo( + () => [ + { + title: 'Table Name', + dataIndex: 'name', + key: 'name', + render: (text: string, record: Table) => { + return ( + + {text} + + ); + }, + }, + { + title: 'Description', + dataIndex: 'description', + key: 'description', + render: (text: string) => + text?.trim() ? ( + + ) : ( + No description + ), + }, + ], + [] + ); + const getSchemaTableList = () => { return ( -
-
- - - - - - - - {tableData.length > 0 ? ( - tableData.map((table, index) => ( - - - - - )) - ) : ( - - - - )} - -
- Table Name - - Description -
- - {table.name} - - - {table.description?.trim() ? ( - - ) : ( - No description - )} -
- No records found. -
-
+ ); }; 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 4a6701d3d6a..3049437af0c 100644 --- a/openmetadata-ui/src/main/resources/ui/src/styles/position.less +++ b/openmetadata-ui/src/main/resources/ui/src/styles/position.less @@ -11,6 +11,13 @@ * limitations under the License. */ +.relative { + position: relative; +} +.absolute { + position: absolute; +} + .align-start { align-items: start; }