add agent version

This commit is contained in:
2026-10-22 21:47:57 +02:00
parent 38f7efce6b
commit b33d495474
2 changed files with 13 additions and 3 deletions
+11 -2
View File
@@ -743,6 +743,7 @@
<span class="client-name" title="${esc(c.name)}">${esc(c.name)}</span>
<div style="display: flex; align-items: center;">
<span class="badge-id">ID: ${c.id.toUpperCase()}</span>
<span class="badge-id" id="agent-badge-${c.id}" style="display: none; margin-left: 6px; color: #38bdf8; border-color: rgba(56, 189, 248, 0.4); background: rgba(56, 189, 248, 0.1);" title="Versione Node Agent"></span>
<div id="type-badge-${c.id}" class="type-badge" style="display: none;"></div>
</div>
</div>
@@ -953,7 +954,11 @@
if (upSpan && healthObj.uptime) {
upSpan.innerText = fmtAge(healthObj.uptime);
}
let agentBadge = document.getElementById(`agent-badge-${c.id}`);
if (agentBadge && healthObj.agent_version) {
agentBadge.innerText = `Agent v${healthObj.agent_version}`;
agentBadge.style.display = 'inline-block';
}
const profBtnsDiv = document.getElementById(`prof-btns-${c.id}`);
const profKeys = JSON.stringify(healthObj.profiles || {});
@@ -976,7 +981,11 @@
}
}
} else { if (healthContainer) healthContainer.style.display = 'none'; }
} else {
if (healthContainer) healthContainer.style.display = 'none';
let agentBadge = document.getElementById(`agent-badge-${c.id}`);
if (agentBadge) agentBadge.style.display = 'none';
}
globalHealthData[c.id.toLowerCase()] = healthObj;