From 2f15baee387996e6ab7d0ae180f71e899d51c9a4 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 18 Jun 2026 17:56:11 +0000 Subject: [PATCH] Replace Infrastructure world map with a Node Status grid A world map didn't fit a small-scale infra. Show servers as a tile grid with colored status dots (healthy/warning/critical) instead. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01BbJV5nm8KPVH1oNJYKpnoF --- src/pages/Infrastructure.tsx | 57 ++++++++++++++++++++++++++---------- 1 file changed, 42 insertions(+), 15 deletions(-) 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}
))}