feat(ui): support table partitioned details (#13294)

* feat(ui): support table partitioned details

* fix import

---------

Co-authored-by: Sriharsha Chintalapani <harshach@users.noreply.github.com>
This commit is contained in:
Chirag Madlani 2023-10-13 13:04:38 +05:30 committed by GitHub
parent 208241780f
commit c705586a63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 48 additions and 0 deletions

View File

@ -970,6 +970,7 @@
"table-entity-text": "Table {{entityText}}",
"table-lowercase": "table",
"table-lowercase-plural": "tables",
"table-partitioned": "Table Partitioned",
"table-plural": "Tables",
"table-profile": "Table Profile",
"table-tests-summary": "Table Tests Summary",

View File

@ -970,6 +970,7 @@
"table-entity-text": "Tabla {{entityText}}",
"table-lowercase": "tabla",
"table-lowercase-plural": "tablas",
"table-partitioned": "Table Partitioned",
"table-plural": "Tablas",
"table-profile": "Table Profile",
"table-tests-summary": "Resumen de Tests de la Tabla",

View File

@ -970,6 +970,7 @@
"table-entity-text": "Table {{entityText}}",
"table-lowercase": "table",
"table-lowercase-plural": "tables",
"table-partitioned": "Table Partitioned",
"table-plural": "Tables",
"table-profile": "Profil de Table",
"table-tests-summary": "Résumé des Tests de la Table",

View File

@ -970,6 +970,7 @@
"table-entity-text": "テーブル {{entityText}}",
"table-lowercase": "テーブル",
"table-lowercase-plural": "tables",
"table-partitioned": "Table Partitioned",
"table-plural": "テーブル",
"table-profile": "Table Profile",
"table-tests-summary": "Table Tests Summary",

View File

@ -970,6 +970,7 @@
"table-entity-text": "Tabela {{entityText}}",
"table-lowercase": "tabela",
"table-lowercase-plural": "tables",
"table-partitioned": "Table Partitioned",
"table-plural": "Tabelas",
"table-profile": "Table Profile",
"table-tests-summary": "Resumo dos Testes da Tabela",

View File

@ -970,6 +970,7 @@
"table-entity-text": "Таблица {{entityText}}",
"table-lowercase": "таблица",
"table-lowercase-plural": "таблицы",
"table-partitioned": "Table Partitioned",
"table-plural": "Таблицы",
"table-profile": "Профиль таблицы",
"table-tests-summary": "Сводка по тестам",

View File

@ -970,6 +970,7 @@
"table-entity-text": "数据表{{entityText}}",
"table-lowercase": "数据表",
"table-lowercase-plural": "数据表",
"table-partitioned": "Table Partitioned",
"table-plural": "数据表",
"table-profile": "数据表分析",
"table-tests-summary": "数据表测试概要",

View File

@ -0,0 +1,37 @@
/*
* Copyright 2023 Collate.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Space, Typography } from 'antd';
import { t } from 'i18next';
import React from 'react';
import { TablePartition } from '../../../generated/entity/data/table';
interface PartitionedKeysProps {
tablePartition: TablePartition;
}
export const PartitionedKeys = ({ tablePartition }: PartitionedKeysProps) => {
return (
<Space className="p-b-sm" direction="vertical">
<Typography.Text className="right-panel-label">
{t('label.table-partitioned')}
</Typography.Text>
<Typography.Text>
{`${t('label.interval')} - ${tablePartition.intervalType}`}
</Typography.Text>
<Space>
{`${t('label.column-plural')} -
${tablePartition.columns?.map((column) => column)}`}
</Space>
</Space>
);
};

View File

@ -93,6 +93,7 @@ import { getTagsWithoutTier, getTierTags } from '../../utils/TableUtils';
import { createTagObject, updateTierTag } from '../../utils/TagsUtils';
import { showErrorToast, showSuccessToast } from '../../utils/ToastUtils';
import { FrequentlyJoinedTables } from './FrequentlyJoinedTables/FrequentlyJoinedTables.component';
import { PartitionedKeys } from './PartitionedKeys/PartitionedKeys.component';
import './table-details-page-v1.less';
import TableConstraints from './TableConstraints/TableConstraints';
@ -530,6 +531,9 @@ const TableDetailsPageV1 = () => {
onThreadLinkSelect={onThreadLinkSelect}
/>
<TableConstraints constraints={tableDetails?.tableConstraints} />
{tableDetails?.tablePartition ? (
<PartitionedKeys tablePartition={tableDetails.tablePartition} />
) : null}
</Space>
</Col>
</Row>