diff --git a/frontend/src/components/fleet/SNMPMetricsSection.tsx b/frontend/src/components/fleet/SNMPMetricsSection.tsx new file mode 100644 index 0000000..a9e85fc --- /dev/null +++ b/frontend/src/components/fleet/SNMPMetricsSection.tsx @@ -0,0 +1,51 @@ +import { useQuery } from '@tanstack/react-query' +import { Activity } from 'lucide-react' +import { snmpProfilesApi } from '@/lib/api' + +interface SNMPMetricsSectionProps { + tenantId: string + deviceId: string + snmpProfileId: string | null +} + +/** + * Displays the assigned SNMP profile info for an SNMP device. + * + * Standard metrics (interfaces, health) flow through existing hypertables + * and are shown by InterfaceGauges. Custom OID charting is Phase 20 (PROF-03). + */ +export function SNMPMetricsSection({ tenantId, snmpProfileId }: SNMPMetricsSectionProps) { + if (!snmpProfileId) return null + + const { data: profile } = useQuery({ + queryKey: ['snmp-profile', tenantId, snmpProfileId], + queryFn: () => snmpProfilesApi.get(tenantId, snmpProfileId!), + enabled: !!snmpProfileId, + }) + + return ( +