fix(ui): handle null values in postgres metrics (#6388)
This commit is contained in:
@@ -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