mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-15 18:15:49 +00:00
fix(ui): handle null values in postgres metrics (#6388)
This commit is contained in:
1 parent
dbed6c270e
commit
f01341bfbf
1 file changed
+4
-1
@@ -320,7 +320,10 @@ class StandalonePostgresql extends BaseModel
|
|||||||
}
|
}
|
||||||
$metrics = json_decode($metrics, true);
|
$metrics = json_decode($metrics, true);
|
||||||
$parsedCollection = collect($metrics)->map(function ($metric) {
|
$parsedCollection = collect($metrics)->map(function ($metric) {
|
||||||
return [(int) $metric['time'], (float) $metric['percent']];
|
return [
|
||||||
|
(int) $metric['time'],
|
||||||
|
(float) ($metric['percent'] ?? 0.0)
|
||||||
|
];
|
||||||
});
|
});
|
||||||
|
|
||||||
return $parsedCollection->toArray();
|
return $parsedCollection->toArray();
|
||||||
|
|||||||
Reference in new issue
Block a user