function updateMetrics() { fetch('/api/metrics') .then(response => response.json()) .then(data => { document.getElementById('network-health').innerHTML = `
CPU: ${data.network_health.cpu_percent}%
Memory: ${data.network_health.memory_percent}%
Connections: ${data.network_health.network_connections}
${data.latency.toFixed(2)} ms
Download: ${data.bandwidth.download.toFixed(2)} Mbps
Upload: ${data.bandwidth.upload.toFixed(2)} Mbps