diff --git a/src/pages/Infrastructure.tsx b/src/pages/Infrastructure.tsx index 53bbd1e..48b6a4a 100644 --- a/src/pages/Infrastructure.tsx +++ b/src/pages/Infrastructure.tsx @@ -1,6 +1,6 @@ import { useState } from 'react' import { PieChart, Pie, Cell, ResponsiveContainer, LineChart, Line, XAxis } from 'recharts' -import { Plus, Server, Activity, AlertTriangle, DollarSign, Globe2 } from 'lucide-react' +import { Plus, Server, Activity, AlertTriangle, DollarSign } from 'lucide-react' const subTabs = ['Overview'] @@ -19,15 +19,27 @@ const costData = [ { name: 'Network', value: 15, color: '#7A7D85' }, ] -const regions = [ - { name: 'us-east-1', x: '22%', y: '38%', resources: 42 }, - { name: 'us-west-2', x: '12%', y: '42%', resources: 18 }, - { name: 'eu-west-1', x: '48%', y: '30%', resources: 31 }, - { name: 'ap-southeast-1', x: '78%', y: '58%', resources: 22 }, - { name: 'sa-east-1', x: '32%', y: '72%', resources: 9 }, - { name: 'ap-northeast-1', x: '85%', y: '40%', resources: 6 }, +const nodes = [ + { name: 'web-frontend-lb', status: 'healthy' }, + { name: 'app-server-01', status: 'healthy' }, + { name: 'app-server-02', status: 'healthy' }, + { name: 'app-server-03', status: 'warning' }, + { name: 'db-primary-01', status: 'healthy' }, + { name: 'db-replica-02', status: 'healthy' }, + { name: 'cache-cluster-02', status: 'critical' }, + { name: 'batch-worker-04', status: 'healthy' }, + { name: 'storage-node-01', status: 'healthy' }, + { name: 'storage-node-02', status: 'healthy' }, + { name: 'monitoring-01', status: 'healthy' }, + { name: 'vpn-gateway', status: 'warning' }, ] +const nodeStatusColor: Record = { + healthy: '#2ECC71', + warning: '#E67E22', + critical: '#E74C3C', +} + const trendData = Array.from({ length: 14 }, (_, i) => ({ day: i, compute: 60 + i * 0.6 + Math.sin(i / 2) * 3, @@ -219,17 +231,32 @@ export default function Infrastructure() { - {/* Infrastructure Map — expanded */} + {/* Node Status — expanded */}
-

Infrastructure Map

-
- - {regions.map((r) => ( -
-
+

Node Status

+
+ {nodes.map((node) => ( +
+
+ + +
+ {node.name}
))}