fix issues in server

This commit is contained in:
Raven Scott
2025-11-24 07:31:08 -05:00
parent 2062909878
commit 8e4738b903
3 changed files with 11 additions and 3 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
import { Terminal } from 'xterm';
import Terminal from 'xterm';
import { FitAddon } from 'xterm-addon-fit';
// DOM Elements
+1 -1
View File
@@ -1,4 +1,4 @@
import { Terminal } from 'xterm';
import Terminal from 'xterm';
import { FitAddon } from 'xterm-addon-fit';
// DOM Elements
+9 -1
View File
@@ -1012,7 +1012,15 @@ async function handleStatsBroadcast() {
setInterval(async () => {
try {
await collectContainerStats(containerStats);
const aggregatedStats = Object.values(containerStats);
// Create clean stats objects without stream references for serialization
const aggregatedStats = Object.values(containerStats).map(statsData => ({
id: statsData.id,
name: statsData.name,
cpu: statsData.cpu,
memory: statsData.memory,
ip: statsData.ip
}));
// Only broadcast if there are stats to send
if (aggregatedStats.length > 0) {