Skip to content

Commit 3e74485

Browse files
committed
added tooltip for error in table
1 parent 4742805 commit 3e74485

File tree

2 files changed

+21
-15
lines changed

2 files changed

+21
-15
lines changed

thingconnect.pulse.client/src/components/HistoryTable.tsx

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {
1414
import { ChevronLeft, ChevronRight, AlertCircle, CheckCircle, Clock } from 'lucide-react';
1515
import type { RollupBucket, DailyBucket, RawCheck } from '@/api/types';
1616
import type { BucketType } from '@/types/bucket';
17+
import { Tooltip } from './ui/tooltip';
1718

1819
export interface HistoryTableProps {
1920
data:
@@ -193,18 +194,20 @@ export function HistoryTable({ data, bucket, pageSize = 20, isLoading }: History
193194
</Text>
194195
</Table.Cell>
195196
<Table.Cell>
196-
<Text
197-
fontSize='sm'
198-
color={row.error ? 'red.600' : 'gray.500'}
199-
_dark={{ color: row.error ? 'red.400' : 'gray.400' }}
200-
maxW='200px'
201-
overflow='hidden'
202-
textOverflow='ellipsis'
203-
whiteSpace='nowrap'
204-
title={row.error || undefined}
205-
>
206-
{row.error || '-'}
207-
</Text>
197+
<Tooltip content={row.error || '-'}>
198+
<Text
199+
fontSize='sm'
200+
color={row.error ? 'red.600' : 'gray.500'}
201+
_dark={{ color: row.error ? 'red.400' : 'gray.400' }}
202+
maxW='200px'
203+
overflow='hidden'
204+
textOverflow='ellipsis'
205+
whiteSpace='nowrap'
206+
title={row.error || undefined}
207+
>
208+
{row.error || '-'}
209+
</Text>
210+
</Tooltip>
208211
</Table.Cell>
209212
</>
210213
) : (

thingconnect.pulse.client/src/components/RecentChecksTable.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { ChevronLeft, ChevronRight, CloudOff } from 'lucide-react';
1212
import { formatDistanceToNow } from 'date-fns';
1313
import type { RawCheck } from '@/api/types';
1414
import { useMemo, useState } from 'react';
15+
import { Tooltip } from './ui/tooltip';
1516
interface RecentChecksTableProps {
1617
checks: RawCheck[];
1718
pageSize?: number;
@@ -74,9 +75,11 @@ export function RecentChecksTable({ checks, pageSize = 10 }: RecentChecksTablePr
7475
<Text fontSize='sm'>{check.rttMs ? `${check.rttMs}ms` : '-'}</Text>
7576
</Table.Cell>
7677
<Table.Cell w='25%'>
77-
<Text flex='1' fontSize='sm' color='gray.500' lineClamp={1}>
78-
{check.error || '-'}
79-
</Text>
78+
<Tooltip content={check.error || '-'}>
79+
<Text flex='1' fontSize='sm' color='gray.500' lineClamp={1}>
80+
{check.error || '-'}
81+
</Text>
82+
</Tooltip>
8083
</Table.Cell>
8184
</Table.Row>
8285
))}

0 commit comments

Comments
 (0)