feat: métriques serveur dans footer dashboard + notification offline WS
This commit is contained in:
+10
-1
@@ -141,5 +141,14 @@ const Grid = (() => {
|
||||
|
||||
function getAgent(id) { return _agents.get(id); }
|
||||
|
||||
return { refresh, update, getAgent, fmt, fmtPct };
|
||||
function updateStatus(agentId, status) {
|
||||
const entry = _agents.get(agentId);
|
||||
if (!entry) return;
|
||||
entry.agent.status = status;
|
||||
const el = document.getElementById('tile-' + agentId);
|
||||
if (el) el.outerHTML = renderTile(entry.agent, entry.metrics);
|
||||
updateStats();
|
||||
}
|
||||
|
||||
return { refresh, update, updateStatus, getAgent, fmt, fmtPct };
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user