diff --git a/clusters.html b/clusters.html index d7f76e4..fc4d113 100644 --- a/clusters.html +++ b/clusters.html @@ -558,8 +558,8 @@
Jarvis Discord Bot

Cluster Status

-

Live service telemetry from the cog endpoint at /clusters on port - 8080, including uptime, machine health, and shard-level cluster data. +

Live service telemetry from the /clusters endpoint, including uptime, + machine health, and shard-level cluster data.

@@ -693,6 +693,15 @@

Clusters

return `${formatNumber(value, 1)}%`; } + function escapeHtml(value) { + return String(value) + .replace(/&/g, '&') + .replace(//g, '>') + .replace(/"/g, '"') + .replace(/'/g, '''); + } + function getStatusClass(status) { const normalized = String(status || 'Unknown').toLowerCase(); if (normalized.includes('online')) return 'status-online'; @@ -706,7 +715,7 @@

Clusters

const box = document.createElement('div'); box.className = 'gauge-box'; box.innerHTML = ` -
${name} Latency
+
${escapeHtml(name)} Latency
-- ms
`; @@ -772,16 +781,16 @@

Clusters

const card = document.createElement('div'); card.className = 'detail-card'; card.innerHTML = ` -

${title}

+

${escapeHtml(title)}

${rows.map(row => `
-
${row.label}
-
${row.value}
+
${escapeHtml(row.label)}
+
${escapeHtml(row.value)}
`).join('')}
- ${note ? `
${note}
` : ''} + ${note ? `
${escapeHtml(note)}
` : ''} `; return card; } @@ -1003,6 +1012,7 @@

${title}

const users = Number(cluster.users ?? 0); const density = servers > 0 ? (users / servers).toFixed(0) : '0'; const status = cluster.status || 'Unknown'; + const clusterName = cluster.name || `Shard ${shardId}`; const card = document.createElement('div'); card.className = 'cluster-card'; @@ -1010,10 +1020,10 @@

${title}

card.innerHTML = `
-

${cluster.name || `Shard ${shardId}`}

+

${escapeHtml(clusterName)}

Shard ${shardId} • ${formatNumber(latency, 0)} ms latency

-
${status}
+
${escapeHtml(status)}