Skip to content

fix(TableInfo): update column table info #1056

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 26, 2024
Merged

Conversation

artemmufazalov
Copy link
Member

@artemmufazalov artemmufazalov commented Jul 23, 2024

First part of #885 (there are some things about column tables to clarify and finish)

@artemmufazalov artemmufazalov marked this pull request as draft July 23, 2024 10:05
@artemmufazalov artemmufazalov force-pushed the 885-column-table-info branch from 4b8a113 to 68e8862 Compare July 23, 2024 11:20
Comment on lines 51 to 62
if (columnTable.Sharding?.HashSharding?.Columns) {
const columns = columnTable.Sharding.HashSharding.Columns.join(', ');
const content = `PARTITION BY HASH(${columns})`;

columnTableGeneralInfo.push({
label: 'Partitioning',
value: (
<Text variant="code-2" wordBreak="break-word">
{content}
</Text>
),
});
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before:
Screenshot 2024-07-23 at 15 16 04

After:
Screenshot 2024-07-23 at 13 02 56

Comment on lines +219 to +224
'GroupReadIops',
'GroupReadThroughput',
'GroupWriteIops',
'GroupWriteThroughput',
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed fields, that we don't display, but they are not processed properly by TS

Comment on lines +138 to 142
export const formatDateTime = (value?: number | string, defaultValue = '') => {
const formattedData = dateTimeParse(Number(value))?.format('YYYY-MM-DD HH:mm');

return Number(value) > 0 && formattedData ? formattedData : defaultValue;
return formattedData ?? defaultValue;
};
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not display N/A for undefined fields by default. In case below we just don't display date fields:
Screenshot 2024-07-23 at 15 18 10

@artemmufazalov artemmufazalov force-pushed the 885-column-table-info branch from 68e8862 to a881797 Compare July 23, 2024 12:53
Comment on lines +167 to +180
if (PathDescription?.TableStats) {
const {DataSize, RowCount} = PathDescription.TableStats;

overview.push(
{
label: i18n('summary.data-size'),
value: toFormattedSize(DataSize),
},
{
label: i18n('summary.row-count'),
value: formatNumber(RowCount),
},
);
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add Data size and Row count fields for entities, which have these params

Screenshot 2024-07-23 at 15 52 33

@artemmufazalov artemmufazalov force-pushed the 885-column-table-info branch from a881797 to 8366717 Compare July 23, 2024 12:57
@artemmufazalov artemmufazalov marked this pull request as ready for review July 23, 2024 12:57
@artemmufazalov artemmufazalov requested a review from Raubzeug July 23, 2024 12:57
Raubzeug
Raubzeug previously approved these changes Jul 24, 2024
const content = `PARTITION BY HASH(${columns})`;

columnTableGeneralInfo.push({
label: 'Partitioning',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i18n?

@artemmufazalov artemmufazalov merged commit 3305cdb into main Jul 26, 2024
4 checks passed
@artemmufazalov artemmufazalov deleted the 885-column-table-info branch July 26, 2024 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants