feat(dashboard): make device hostnames clickable in events timeline
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -5,6 +5,7 @@ import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'
|
|||||||
import { Skeleton } from '@/components/ui/skeleton'
|
import { Skeleton } from '@/components/ui/skeleton'
|
||||||
import { cn } from '@/lib/utils'
|
import { cn } from '@/lib/utils'
|
||||||
import { eventsApi, type DashboardEvent, type EventsParams } from '@/lib/eventsApi'
|
import { eventsApi, type DashboardEvent, type EventsParams } from '@/lib/eventsApi'
|
||||||
|
import { DeviceLink } from '@/components/ui/device-link'
|
||||||
|
|
||||||
export interface EventsTimelineProps {
|
export interface EventsTimelineProps {
|
||||||
tenantId: string
|
tenantId: string
|
||||||
@@ -171,7 +172,14 @@ export function EventsTimeline({ tenantId, isSuperAdmin }: EventsTimelineProps)
|
|||||||
{event.description}
|
{event.description}
|
||||||
{event.device_hostname && (
|
{event.device_hostname && (
|
||||||
<span className="ml-1 text-text-secondary">
|
<span className="ml-1 text-text-secondary">
|
||||||
— {event.device_hostname}
|
—{' '}
|
||||||
|
{event.device_id ? (
|
||||||
|
<DeviceLink tenantId={tenantId} deviceId={event.device_id}>
|
||||||
|
{event.device_hostname}
|
||||||
|
</DeviceLink>
|
||||||
|
) : (
|
||||||
|
event.device_hostname
|
||||||
|
)}
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
Reference in New Issue
Block a user