1
0
mirror of https://github.com/amir20/dozzle.git synced 2025-12-21 13:23:07 +01:00

feat: makes host cards more responsive on mobile (#2949)

This commit is contained in:
Amir Raminfar
2024-05-12 19:45:54 -07:00
committed by GitHub
parent a712c8fa34
commit 0a2248dfe3
2 changed files with 20 additions and 13 deletions

View File

@@ -36,7 +36,7 @@ export class Container {
stats: Stat[],
public health?: ContainerHealth,
) {
this._stat = ref({ cpu: 0, memory: 0, memoryUsage: 0 });
this._stat = ref(stats.at(-1) || ({ cpu: 0, memory: 0, memoryUsage: 0 } as Stat));
this._statsHistory = useSimpleRefHistory(this._stat, { capacity: 300, deep: true, initial: stats });
this.movingAverageStat = useExponentialMovingAverage(this._stat, 0.2);