fix issues in server
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Terminal } from 'xterm';
|
||||
import Terminal from 'xterm';
|
||||
import { FitAddon } from 'xterm-addon-fit';
|
||||
|
||||
// DOM Elements
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { Terminal } from 'xterm';
|
||||
import Terminal from 'xterm';
|
||||
import { FitAddon } from 'xterm-addon-fit';
|
||||
|
||||
// DOM Elements
|
||||
|
||||
+9
-1
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user