1
0
mirror of https://github.com/amir20/dozzle.git synced 2025-12-30 17:47:28 +01:00

fix: fixes negative CPU values when container stops

This commit is contained in:
Amir Raminfar
2023-09-28 09:46:45 -07:00
parent d3814455cb
commit 666ad7ba05

View File

@@ -1,7 +1,7 @@
<template>
<div class="flex gap-4" v-if="container.stat">
<stat-monitor :data="memoryData" label="mem" :stat-value="formatBytes(unref(container.stat).memoryUsage)" />
<stat-monitor :data="cpuData" label="load" :stat-value="unref(container.stat).cpu + '%'" />
<stat-monitor :data="cpuData" label="load" :stat-value="Math.max(0, unref(container.stat).cpu) + '%'" />
</div>
</template>