import type { RecordValue } from './api'; export function OPNsenseDetails({ device }: { device: RecordValue }) { if (device.source_id !== 'opnsense.base') return null; const inventory = device.inventory as RecordValue | null; function list(key: string, title: string) { const report = inventory?.[key] as RecordValue | undefined; const available = report?.status === 'ok' || report?.status === 'partial'; const rows = Array.isArray(report?.entries) ? report.entries.filter((x): x is string => typeof x === 'string') : []; return
Nicht ermittelbar
: <> {report?.status === 'partial' &&Auszug – unvollständige Liste
} {rows.length ?{line}Keine Einträge gemeldet.
} >}