--- // src/pages/dashboard.astro - Converted from static dashboard.html import BaseLayout from '../layouts/BaseLayout.astro'; import Header from '../components/Header.astro'; import Footer from '../components/Footer.astro'; const title = "ArgoBox Dashboard | Status and Metrics"; const description = "ArgoBox operations dashboard provides real-time monitoring and status updates for all lab services and infrastructure components."; // Placeholder data - In a real app, this would come from an API or state management const systemHealth = { cpu: 23, memory: 42, disk: 78, temp: 52, uptime: "14d 7h 32m" }; const network = { throughput: 12.4, latency: 4, connections: 127, packetLoss: 0.02, dns: 2 }; const kubernetes = { nodes: "3/3 Ready", pods: "42/44 Running", deployments: "11/12 Healthy", memoryPressure: "Low", load: 37 }; const storage = { nasStatus: "Online", raidHealth: "Optimal", iops: 243, diskIO: 2.4, backups: "Completed 07/24" }; const serviceStatus = [ { name: "Kubernetes API", status: "online" }, { name: "Container Registry", status: "online" }, { name: "Monitoring", status: "degraded" }, { name: "Authentication", status: "online" }, { name: "Database", status: "online" }, { name: "Storage", status: "online" }, { name: "CI/CD", status: "offline" }, { name: "Logging", status: "online" }, ]; const weeklyTraffic = [65, 80, 45, 90, 60, 75, 40]; // Example percentages const recentAlerts = [ { name: "CI/CD Pipeline Failure", level: "error", time: "3h ago" }, { name: "High Memory Usage", level: "warning", time: "6h ago" }, { name: "Monitoring Service Degraded", level: "warning", time: "12h ago" }, { name: "Backup Completed", level: "healthy", time: "1d ago" }, { name: "Security Update Available", level: "warning", time: "2d ago" }, ]; // Function to determine status class const getStatusClass = (value: number | string, type: 'percent' | 'temp' | 'loss' | 'latency' | 'dns' | 'status') => { if (type === 'status') { return value === 'Online' || value === 'Optimal' || value === 'Low' || value === 'Ready' || value === 'Running' || value === 'Completed' ? 'healthy' : value === 'Degraded' || value === 'Warning' ? 'warning' : 'error'; } if (typeof value !== 'number') return ''; if (type === 'percent') return value > 90 ? 'error' : value > 75 ? 'warning' : 'healthy'; if (type === 'temp') return value > 70 ? 'error' : value > 60 ? 'warning' : 'healthy'; if (type === 'loss') return value > 1 ? 'error' : value > 0.1 ? 'warning' : 'healthy'; if (type === 'latency' || type === 'dns') return value > 50 ? 'error' : value > 10 ? 'warning' : 'healthy'; return 'healthy'; }; --- {/* Add Font Awesome if not loaded globally */} {/* */}

Dashboard is Currently Offline

The live dashboard is currently in simulation mode using placeholder data. Real-time data is not available.

Infrastructure Status Dashboard

Monitoring and metrics for ArgoBox infrastructure components

System Health

CPU Usage {systemHealth.cpu}%
Memory Usage {systemHealth.memory}%
Disk Space {systemHealth.disk}%
Temperature {systemHealth.temp}°C
Uptime {systemHealth.uptime}

Network

Throughput {network.throughput} MB/s
Latency {network.latency}ms
Active Connections {network.connections}
Packet Loss {network.packetLoss}%
DNS Response {network.dns}ms

Kubernetes

Node Status {kubernetes.nodes}
Pods {kubernetes.pods}
Deployments {kubernetes.deployments}
Memory Pressure {kubernetes.memoryPressure}
Cluster Load {kubernetes.load}%

Storage

NAS Status {storage.nasStatus}
RAID Health {storage.raidHealth}
IOPS {storage.iops}
Disk I/O {storage.diskIO} MB/s
Backups {storage.backups}

Service Status

{serviceStatus.map(service => (
{service.name}
))}

Weekly Traffic

{weeklyTraffic.map(value => (
))}
Mon
Tue
Wed
Thu
Fri
Sat
Sun

Recent Alerts

{recentAlerts.map(alert => (
{alert.name} {alert.time}
))}