feat(traffic): make device hostnames clickable in traffic page
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -6,6 +6,7 @@ import { useAuth, isSuperAdmin } from '@/lib/auth'
|
|||||||
import { useUIStore } from '@/lib/store'
|
import { useUIStore } from '@/lib/store'
|
||||||
import { Card, CardContent } from '@/components/ui/card'
|
import { Card, CardContent } from '@/components/ui/card'
|
||||||
import { cn } from '@/lib/utils'
|
import { cn } from '@/lib/utils'
|
||||||
|
import { DeviceLink } from '@/components/ui/device-link'
|
||||||
|
|
||||||
export const Route = createFileRoute('/_authenticated/traffic')({
|
export const Route = createFileRoute('/_authenticated/traffic')({
|
||||||
component: TrafficPage,
|
component: TrafficPage,
|
||||||
@@ -182,7 +183,11 @@ function TrafficPage() {
|
|||||||
className="border-b border-border/50 hover:bg-surface-hover transition-colors"
|
className="border-b border-border/50 hover:bg-surface-hover transition-colors"
|
||||||
>
|
>
|
||||||
<td className="px-4 py-3 text-sm text-text-secondary">
|
<td className="px-4 py-3 text-sm text-text-secondary">
|
||||||
|
{tenantId ? (
|
||||||
|
<DeviceLink tenantId={tenantId} deviceId={device.id}>
|
||||||
{device.hostname}
|
{device.hostname}
|
||||||
|
</DeviceLink>
|
||||||
|
) : device.hostname}
|
||||||
</td>
|
</td>
|
||||||
{superAdmin && !tenantId && (
|
{superAdmin && !tenantId && (
|
||||||
<td className="px-4 py-3 text-sm font-mono text-text-muted">
|
<td className="px-4 py-3 text-sm font-mono text-text-muted">
|
||||||
|
|||||||
Reference in New Issue
Block a user