Skip to content

Commit 734be8c

Browse files
committed
Fix ServerResource metric to display disk space in megabytes
1 parent 31c9d7c commit 734be8c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/Nova/Metrics/ServerResource.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public function __construct($type = 'space')
1919

2020
public function name()
2121
{
22-
return $this->type === 'space' ? 'Disk Space (GB)' : 'Inode Usage';
22+
return $this->type === 'space' ? 'Disk Space (MB)' : 'Inode Usage';
2323
}
2424

2525
/**
@@ -31,8 +31,8 @@ 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 / 1024, 2) : $used;
35-
$total = $this->type === 'space' ? round((int) config('app.disk_space_limit') / 1024 / 1024 / 1024, 2) : (int) config('app.disk_inode_limit');
34+
$value = $this->type === 'space' ? round($used / 1024, 2) : $used;
35+
$total = $this->type === 'space' ? round((int) config('app.disk_space_limit') / 1024 / 1024, 2) : (int) config('app.disk_inode_limit');
3636

3737
return $this->result([
3838
'Used' => $value,

0 commit comments

Comments
 (0)