mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-14 06:17:36 +00:00
Merge remote-tracking branch 'origin/main' into 11244-deprecated-docker-flags
This commit is contained in:
commit
4a7e77f809
15 files changed
+357
-10
No files matched your search
@@ -4724,6 +4724,23 @@ function downsampleLTTB(array $data, int $threshold): array
|
||||
return $sampled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert Sentinel container memory samples from bytes to megabytes.
|
||||
*
|
||||
* Sentinel stores container `used` memory in bytes. Application and database
|
||||
* metric charts label the series as megabytes, so the values must be converted
|
||||
* before they are sent to the frontend.
|
||||
*
|
||||
* @param array<int, array{0: int|float, 1: int|float}> $metrics
|
||||
* @return array<int, array{0: int, 1: float}>
|
||||
*/
|
||||
function convertContainerMemoryBytesToMegabytes(array $metrics): array
|
||||
{
|
||||
return array_map(static function (array $point): array {
|
||||
return [(int) $point[0], round(((float) $point[1]) / 1024 / 1024, 2)];
|
||||
}, $metrics);
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolve shared environment variable patterns like {{environment.VAR}}, {{project.VAR}}, {{team.VAR}}.
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user