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:
Jason Staack
2026-03-18 11:18:40 -05:00
parent 7c45b18870
commit e5a5d735a6

View File

@@ -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">
&mdash; {event.device_hostname} &mdash;{' '}
{event.device_id ? (
<DeviceLink tenantId={tenantId} deviceId={event.device_id}>
{event.device_hostname}
</DeviceLink>
) : (
event.device_hostname
)}
</span> </span>
)} )}
</p> </p>