Skip to content

Commit 76eb8b1

Browse files
committed
fix(topics): drop tilde prefix when retention is infinite
1 parent 52585ce commit 76eb8b1

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

frontend/src/components/pages/topics/quick-info.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,10 @@ export const TopicQuickInfoStatistic = (p: { topic: Topic }) => {
125125
<Text as="dt" fontWeight="bold">
126126
Retention Time:
127127
</Text>
128-
<Text as="dd">~{formatConfigValue(retentionMs.name, retentionMs.value, 'friendly')}</Text>
128+
<Text as="dd">
129+
{retentionMs.value !== '-1' && '~'}
130+
{formatConfigValue(retentionMs.name, retentionMs.value, 'friendly')}
131+
</Text>
129132
</Flex>
130133
<Box>
131134
<Divider orientation="vertical" />
@@ -135,7 +138,8 @@ export const TopicQuickInfoStatistic = (p: { topic: Topic }) => {
135138
Retention Size:
136139
</Text>
137140
<Text as="dd">
138-
~{formatConfigValue(retentionBytes.name, retentionBytes.value, 'friendly')}
141+
{retentionBytes.value !== '-1' && '~'}
142+
{formatConfigValue(retentionBytes.name, retentionBytes.value, 'friendly')}
139143
{Number.isFinite(Number(retentionBytes.value)) &&
140144
Number(retentionBytes.value) !== -1 &&
141145
' / partition'}

0 commit comments

Comments
 (0)