Skip to content

Commit 94c3f51

Browse files
committed
fix: review
1 parent c16b62e commit 94c3f51

File tree

3 files changed

+27
-11
lines changed

3 files changed

+27
-11
lines changed

src/containers/Tenant/Diagnostics/TopicData/TopicData.scss

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
@use '../../../../styles/mixins.scss';
2-
31
.ydb-diagnostics-topic-data {
42
&__partition-select {
53
min-width: 150px;

src/containers/Tenant/Diagnostics/TopicData/columns/Columns.scss

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,15 @@
1818
display: flex;
1919
}
2020
}
21-
&__offset_link {
21+
&__offset {
2222
width: 100%;
2323
height: 100%;
24+
}
25+
&__offset_link {
2426
@extend .link;
2527
}
2628
&__offset_removed {
29+
cursor: not-allowed;
2730
text-decoration: line-through;
2831
}
2932

@@ -34,4 +37,7 @@
3437
&__help {
3538
white-space: pre-wrap;
3639
}
40+
&__help-popover {
41+
display: flex;
42+
}
3743
}

src/containers/Tenant/Diagnostics/TopicData/columns/columns.tsx

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import React from 'react';
22

3+
import {TriangleExclamation} from '@gravity-ui/icons';
34
import DataTable from '@gravity-ui/react-data-table';
4-
import {HelpMark, Text} from '@gravity-ui/uikit';
5+
import {ActionTooltip, Icon, Popover, Text} from '@gravity-ui/uikit';
56
import {isNil} from 'lodash';
67
import {Link} from 'react-router-dom';
78

@@ -88,6 +89,9 @@ export const tsDiffColumn: Column<TopicMessageEnhanced> = {
8889
header: TOPIC_DATA_COLUMNS_TITLES[TOPIC_DATA_COLUMNS_IDS.TS_DIFF],
8990
align: DataTable.RIGHT,
9091
render: ({row}) => {
92+
if (isNil(row.TimestampDiff)) {
93+
return EMPTY_DATA_PLACEHOLDER;
94+
}
9195
const numericValue = safeParseNumber(row.TimestampDiff);
9296
return (
9397
<span className={b('ts-diff', {danger: numericValue >= 100_000})}>
@@ -271,10 +275,11 @@ function Offset({offset, removed, notLoaded}: PartitionIdProps) {
271275

272276
if (removed) {
273277
return (
274-
<Text className={b('offset', {removed: true})} variant="body-2">
275-
{offset}
276-
<HelpMark>{i18n('description_removed-message')}</HelpMark>
277-
</Text>
278+
<ActionTooltip title={i18n('description_removed-message')} placement={'right'}>
279+
<Text className={b('offset', {removed: true})} variant="body-2">
280+
{offset}
281+
</Text>
282+
</ActionTooltip>
278283
);
279284
}
280285

@@ -297,9 +302,16 @@ function Offset({offset, removed, notLoaded}: PartitionIdProps) {
297302
{offset}
298303
</Text>
299304
{notLoaded && (
300-
<HelpMark>
301-
<Text className={b('help')}>{i18n('description_not-loaded-message')}</Text>
302-
</HelpMark>
305+
<Popover
306+
content={
307+
<Text className={b('help')}>{i18n('description_not-loaded-message')}</Text>
308+
}
309+
className={b('help-popover')}
310+
>
311+
<Text color="secondary" className={b('help-popover')}>
312+
<Icon data={TriangleExclamation} />
313+
</Text>
314+
</Popover>
303315
)}
304316
</Link>
305317
);

0 commit comments

Comments
 (0)