import React from 'react'; import { NetworkDevice, NetworkDeviceType } from '../../types'; const deviceConfig: { [key in NetworkDeviceType]: { icon: string; color: string } } = { [NetworkDeviceType.ROUTER]: { icon: 'fa-route', color: 'text-blue-500' }, [NetworkDeviceType.SWITCH]: { icon: 'fa-network-wired', color: 'text-green-600' }, [NetworkDeviceType.ACCESS_POINT]: { icon: 'fa-wifi', color: 'text-purple-500' }, }; const statusConfig: { [key in NetworkDevice['status']]: { text: string; bg: string; pulse: boolean }; } = { online: { text: 'Online', bg: 'bg-green-500', pulse: true }, offline: { text: 'Offline', bg: 'bg-red-500', pulse: false }, degraded: { text: 'Terdegradasi', bg: 'bg-yellow-500', pulse: true }, }; const Stat: React.FC<{ icon: string; value: string; label: string }> = ({ icon, value, label }) => (
{device.type}
{locationName}
{device.ipAddress}
{device.macAddress}
Penggunaan Bandwidth
{device.bandwidthUsage}%