Skip to content

Commit

Permalink
fix: fixes negative CPU values when container stops
Browse files Browse the repository at this point in the history
  • Loading branch information
amir20 committed Sep 28, 2023
1 parent d381445 commit 666ad7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion assets/components/LogViewer/ContainerStat.vue
Original file line number Diff line number Diff line change
@@ -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>

Expand Down

0 comments on commit 666ad7b

Please sign in to comment.