Skip to content

Commit

Permalink
fix number format
Browse files Browse the repository at this point in the history
  • Loading branch information
saeedvaziry committed Apr 17, 2024
1 parent 5a9e8d6 commit e2dd917
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions resources/views/metrics/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,39 +63,39 @@ class="h-[200px] !p-0"
<x-simple-card class="grid grid-cols-1 gap-4 lg:grid-cols-2">
<span class="text-center lg:text-left">Total Memory</span>
<div class="text-center text-xl font-bold text-gray-600 dark:text-gray-400 lg:text-right">
{{ $lastMetric ? Number::format($lastMetric->memory_total / 1024, 0) : "-" }} MB
{{ $lastMetric ? number_format((int) ($lastMetric->memory_total / 1024)) : "-" }} MB
</div>
</x-simple-card>
<x-simple-card class="grid grid-cols-1 gap-4 lg:grid-cols-2">
<span class="text-center lg:text-left">Used Memory</span>
<div class="text-center text-xl font-bold text-gray-600 dark:text-gray-400 lg:text-right">
{{ $lastMetric ? Number::format($lastMetric->memory_used / 1024, 0) : "-" }} MB
{{ $lastMetric ? number_format((int) ($lastMetric->memory_used / 1024)) : "-" }} MB
</div>
</x-simple-card>
<x-simple-card class="grid grid-cols-1 gap-4 lg:grid-cols-2">
<span class="text-center lg:text-left">Free Memory</span>
<div class="text-center text-xl font-bold text-gray-600 dark:text-gray-400 lg:text-right">
{{ $lastMetric ? Number::format($lastMetric->memory_free / 1024, 0) : "-" }} MB
{{ $lastMetric ? number_format((int) ($lastMetric->memory_free / 1024)) : "-" }} MB
</div>
</x-simple-card>
</div>
<div class="grid grid-cols-1 gap-4">
<x-simple-card class="grid grid-cols-1 gap-4 lg:grid-cols-2">
<span class="text-center lg:text-left">Total Space</span>
<div class="text-center text-xl font-bold text-gray-600 dark:text-gray-400 lg:text-right">
{{ $lastMetric ? Number::format($lastMetric->disk_total) : "-" }} MB
{{ $lastMetric ? number_format($lastMetric->disk_total) : "-" }} MB
</div>
</x-simple-card>
<x-simple-card class="grid grid-cols-1 gap-4 lg:grid-cols-2">
<span class="text-center lg:text-left">Used Space</span>
<div class="text-center text-xl font-bold text-gray-600 dark:text-gray-400 lg:text-right">
{{ $lastMetric ? Number::format($lastMetric->disk_used) : "-" }} MB
{{ $lastMetric ? number_format($lastMetric->disk_used) : "-" }} MB
</div>
</x-simple-card>
<x-simple-card class="grid grid-cols-1 gap-4 lg:grid-cols-2">
<span class="text-center lg:text-left">Free Space</span>
<div class="text-center text-xl font-bold text-gray-600 dark:text-gray-400 lg:text-right">
{{ $lastMetric ? Number::format($lastMetric->disk_free) : "-" }} MB
{{ $lastMetric ? number_format($lastMetric->disk_free) : "-" }} MB
</div>
</x-simple-card>
</div>
Expand Down

0 comments on commit e2dd917

Please sign in to comment.