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';
|
import { FitAddon } from 'xterm-addon-fit';
|
||||||
|
|
||||||
// DOM Elements
|
// DOM Elements
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
import { Terminal } from 'xterm';
|
import Terminal from 'xterm';
|
||||||
import { FitAddon } from 'xterm-addon-fit';
|
import { FitAddon } from 'xterm-addon-fit';
|
||||||
|
|
||||||
// DOM Elements
|
// DOM Elements
|
||||||
|
|||||||
+9
-1
@@ -1012,7 +1012,15 @@ async function handleStatsBroadcast() {
|
|||||||
setInterval(async () => {
|
setInterval(async () => {
|
||||||
try {
|
try {
|
||||||
await collectContainerStats(containerStats);
|
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
|
// Only broadcast if there are stats to send
|
||||||
if (aggregatedStats.length > 0) {
|
if (aggregatedStats.length > 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user