Skip to content

Commit 31c9d7c

Browse files
committed
Fix ServerResource metric to calculate disk space in gigabytes
1 parent 467ddf9 commit 31c9d7c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/Nova/Metrics/ServerResource.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function calculate(NovaRequest $request): PartitionResult
3131
$process = new Process($command, '/home');
3232
$process->run();
3333
$used = (int) $process->getOutput();
34-
$value = $this->type === 'space' ? round($used / 1024, 2) : $used;
34+
$value = $this->type === 'space' ? round($used / 1024 / 1024, 2) : $used;
3535
$total = $this->type === 'space' ? round((int) config('app.disk_space_limit') / 1024 / 1024 / 1024, 2) : (int) config('app.disk_inode_limit');
3636

3737
return $this->result([

0 commit comments

Comments
 (0)