97 lines
2.3 KiB
TypeScript
97 lines
2.3 KiB
TypeScript
import { NetworkDevice, NetworkDeviceType, BandwidthHistoryPoint } from '../types';
|
|
|
|
export const initialNetworkDevices: NetworkDevice[] = [
|
|
{
|
|
id: 'net-1',
|
|
name: 'Router Utama - Jabar',
|
|
type: NetworkDeviceType.ROUTER,
|
|
ipAddress: '192.168.1.1',
|
|
macAddress: '00:1B:44:11:3A:B7',
|
|
locationId: 'loc1',
|
|
status: 'online',
|
|
uptime: '32 hari, 4 jam',
|
|
latency: 5,
|
|
trafficIn: 120.5,
|
|
trafficOut: 88.2,
|
|
bandwidthUsage: 45,
|
|
},
|
|
{
|
|
id: 'net-2',
|
|
name: 'Switch Kandang A',
|
|
type: NetworkDeviceType.SWITCH,
|
|
ipAddress: '192.168.1.10',
|
|
macAddress: 'A1:2C:4E:13:6B:C8',
|
|
locationId: 'coop1',
|
|
status: 'online',
|
|
uptime: '15 hari, 2 jam',
|
|
latency: 2,
|
|
trafficIn: 60.1,
|
|
trafficOut: 45.3,
|
|
bandwidthUsage: 78,
|
|
},
|
|
{
|
|
id: 'net-3',
|
|
name: 'AP Lantai 2 - Kandang A',
|
|
type: NetworkDeviceType.ACCESS_POINT,
|
|
ipAddress: '192.168.1.11',
|
|
macAddress: 'B2:3D:5F:14:7C:D9',
|
|
locationId: 'floor2',
|
|
status: 'degraded',
|
|
uptime: '3 hari, 1 jam',
|
|
latency: 45,
|
|
trafficIn: 15.2,
|
|
trafficOut: 10.1,
|
|
bandwidthUsage: 92,
|
|
},
|
|
{
|
|
id: 'net-4',
|
|
name: 'Router Cabang - Sumatra',
|
|
type: NetworkDeviceType.ROUTER,
|
|
ipAddress: '192.168.2.1',
|
|
macAddress: 'C3:4E:6G:15:8D:E0',
|
|
locationId: 'loc2',
|
|
status: 'online',
|
|
uptime: '50 hari, 8 jam',
|
|
latency: 15,
|
|
trafficIn: 80.3,
|
|
trafficOut: 60.7,
|
|
bandwidthUsage: 35,
|
|
},
|
|
{
|
|
id: 'net-5',
|
|
name: 'Switch Kandang K-01',
|
|
type: NetworkDeviceType.SWITCH,
|
|
ipAddress: '192.168.3.10',
|
|
macAddress: 'D4:5F:7H:16:9E:F1',
|
|
locationId: 'coop5',
|
|
status: 'offline',
|
|
uptime: 'N/A',
|
|
latency: 0,
|
|
trafficIn: 0,
|
|
trafficOut: 0,
|
|
bandwidthUsage: 0,
|
|
},
|
|
{
|
|
id: 'net-6',
|
|
name: 'AP Lantai 1 - Kandang C',
|
|
type: NetworkDeviceType.ACCESS_POINT,
|
|
ipAddress: '192.168.1.25',
|
|
macAddress: 'E5:6G:8I:17:0F:G2',
|
|
locationId: 'floor5',
|
|
status: 'online',
|
|
uptime: '22 hari, 5 jam',
|
|
latency: 8,
|
|
trafficIn: 25.8,
|
|
trafficOut: 18.4,
|
|
bandwidthUsage: 65,
|
|
},
|
|
];
|
|
|
|
export const initialBandwidthHistory: BandwidthHistoryPoint[] = Array.from(
|
|
{ length: 24 },
|
|
(_, i) => ({
|
|
time: `${String(i).padStart(2, '0')}:00`,
|
|
usage: 100 + Math.sin(i / 3) * 40 + Math.random() * 20,
|
|
})
|
|
);
|