mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-06 20:22:14 +00:00
fix: add runtime type guard for cpu.value in monitoring tab
Closes #4062
This commit is contained in:
+2
-2
@@ -220,11 +220,11 @@ export const ContainerFreeMonitoring = ({
|
|||||||
<CardContent>
|
<CardContent>
|
||||||
<div className="flex flex-col gap-2 w-full">
|
<div className="flex flex-col gap-2 w-full">
|
||||||
<span className="text-sm text-muted-foreground">
|
<span className="text-sm text-muted-foreground">
|
||||||
Used: {currentData.cpu.value}
|
Used: {String(currentData.cpu.value ?? "0%")}
|
||||||
</span>
|
</span>
|
||||||
<Progress
|
<Progress
|
||||||
value={Number.parseInt(
|
value={Number.parseInt(
|
||||||
currentData.cpu.value.replace("%", ""),
|
String(currentData.cpu.value ?? "0%").replace("%", ""),
|
||||||
10,
|
10,
|
||||||
)}
|
)}
|
||||||
className="w-[100%]"
|
className="w-[100%]"
|
||||||
|
|||||||
Reference in New Issue
Block a user