Skip to content

Commit 4b3e44f

Browse files
authored
fix: fixes cpu limit not working correctly (#4356)
1 parent 51fce48 commit 4b3e44f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

assets/components/LogViewer/MultiContainerStat.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ const limits = computed(() => {
117117
totalCpu += hostTotalCpu;
118118
} else {
119119
// All containers have limits, sum them up (capped at host total)
120-
const sumCpu = hostContainers.reduce((sum, c) => sum + 1, 0);
120+
const sumCpu = hostContainers.reduce((sum, c) => sum + (c.cpuLimit || 0), 0);
121121
totalCpu += Math.min(sumCpu, hostTotalCpu);
122122
}
123123

0 commit comments

Comments
 (0)