feat(containers): reset pod CPU/MEM totals bij stoppen of fout van stats-stream
This commit is contained in:
+11
-1
@@ -903,7 +903,7 @@
|
||||
});
|
||||
|
||||
containersStatsES.onerror = () => {
|
||||
// EventSource reconnect automatisch; geen actie nodig
|
||||
resetPodTotals();
|
||||
};
|
||||
}
|
||||
|
||||
@@ -911,6 +911,16 @@
|
||||
if (!containersStatsES) return;
|
||||
containersStatsES.close();
|
||||
containersStatsES = null;
|
||||
resetPodTotals();
|
||||
}
|
||||
|
||||
function resetPodTotals() {
|
||||
document.querySelectorAll('[id^="podcpu-"]').forEach(el => {
|
||||
el.textContent = '-';
|
||||
});
|
||||
document.querySelectorAll('[id^="podmem-"]').forEach(el => {
|
||||
el.textContent = '-';
|
||||
});
|
||||
}
|
||||
|
||||
async function containerInspect(name) {
|
||||
|
||||
Reference in New Issue
Block a user