mirror of
https://github.com/tiennm99/coolify.git
synced 2026-05-03 20:21:22 +00:00
fix: add missing formatBytes helper function
The formatBytes function was used in the view but never defined, causing a runtime error. This function was needed to display S3 file sizes in human-readable format (e.g., "1.5 MB" instead of "1572864"). Added formatBytes() helper to bootstrap/helpers/shared.php: - Converts bytes to human-readable format (B, KB, MB, GB, TB, PB) - Uses base 1024 for proper binary conversion - Configurable precision (defaults to 2 decimal places) - Handles zero bytes case 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -35,7 +35,7 @@ class InstanceSettings extends Model
|
||||
protected static function booted(): void
|
||||
{
|
||||
static::updated(function ($settings) {
|
||||
if ($settings->wasChanged('helper_version')) {
|
||||
if ($settings->wasChanged('helper_version') || $settings->wasChanged('dev_helper_version')) {
|
||||
Server::chunkById(100, function ($servers) {
|
||||
foreach ($servers as $server) {
|
||||
PullHelperImageJob::dispatch($server);
|
||||
|
||||
Reference in New Issue
Block a user