feat(templates): make device hostnames clickable in template push and progress
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -9,6 +9,7 @@ import { CheckCircle, XCircle, AlertTriangle, Loader2, Clock } from 'lucide-reac
|
||||
import { templatesApi } from '@/lib/templatesApi'
|
||||
import { cn } from '@/lib/utils'
|
||||
import { formatDateTime } from '@/lib/utils'
|
||||
import { DeviceLink } from '@/components/ui/device-link'
|
||||
|
||||
interface PushProgressPanelProps {
|
||||
tenantId: string
|
||||
@@ -110,7 +111,7 @@ export function PushProgressPanel({ tenantId, rolloutId, onClose }: PushProgress
|
||||
)}
|
||||
/>
|
||||
<div className="flex-1 min-w-0">
|
||||
<div className="text-xs text-text-primary truncate">{job.hostname}</div>
|
||||
<div className="text-xs text-text-primary truncate"><DeviceLink tenantId={tenantId} deviceId={job.device_id}>{job.hostname}</DeviceLink></div>
|
||||
{job.error_message && (
|
||||
<div className="text-[10px] text-error truncate">{job.error_message}</div>
|
||||
)}
|
||||
|
||||
@@ -29,6 +29,7 @@ import {
|
||||
type TemplateResponse,
|
||||
} from '@/lib/templatesApi'
|
||||
import { deviceGroupsApi, metricsApi } from '@/lib/api'
|
||||
import { DeviceLink } from '@/components/ui/device-link'
|
||||
import { PushProgressPanel } from './PushProgressPanel'
|
||||
|
||||
interface TemplatePushWizardProps {
|
||||
@@ -200,7 +201,7 @@ export function TemplatePushWizard({ open, onClose, tenantId, template }: Templa
|
||||
onCheckedChange={() => toggleDevice(device.id)}
|
||||
/>
|
||||
<div className="flex-1 min-w-0">
|
||||
<div className="text-xs text-text-primary truncate">{device.hostname}</div>
|
||||
<div className="text-xs text-text-primary truncate"><DeviceLink tenantId={tenantId} deviceId={device.id}>{device.hostname}</DeviceLink></div>
|
||||
<div className="text-[10px] text-text-muted">{device.ip_address}</div>
|
||||
</div>
|
||||
<div
|
||||
|
||||
Reference in New Issue
Block a user