mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-20 00:34:44 +02:00
Fix total disk storage (#1040)
This commit is contained in:
parent
d8e8240756
commit
d79d461e7c
@ -89,8 +89,10 @@ class ServerOverview extends StatsOverviewWidget
|
|||||||
return 'Unavailable';
|
return 'Unavailable';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$totalBytes = $this->server->disk * (config('panel.use_binary_prefix') ? 1024 * 1024 : 1000 * 1000);
|
||||||
|
|
||||||
$used = convert_bytes_to_readable($disk);
|
$used = convert_bytes_to_readable($disk);
|
||||||
$total = convert_bytes_to_readable($this->server->disk);
|
$total = convert_bytes_to_readable($totalBytes);
|
||||||
|
|
||||||
return $used . ($this->server->disk > 0 ? ' / ' . $total : ' / ∞');
|
return $used . ($this->server->disk > 0 ? ' / ' . $total : ' / ∞');
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user