fix metrics page

This commit is contained in:
Saeed Vaziry 2024-04-13 22:44:11 +02:00
parent 52d195710b
commit f03a029e36
2 changed files with 8 additions and 8 deletions

View File

@ -63,19 +63,19 @@ 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->memory_total }} MB
{{ $lastMetric ? $lastMetric->memory_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 Memory</span>
<div class="text-center text-xl font-bold text-gray-600 dark:text-gray-400 lg:text-right">
{{ $lastMetric->memory_used }} MB
{{ $lastMetric ? $lastMetric->memory_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 Memory</span>
<div class="text-center text-xl font-bold text-gray-600 dark:text-gray-400 lg:text-right">
{{ $lastMetric->memory_free }} MB
{{ $lastMetric ? $lastMetric->memory_free : "-" }} MB
</div>
</x-simple-card>
</div>
@ -83,19 +83,19 @@ 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 Space</span>
<div class="text-center text-xl font-bold text-gray-600 dark:text-gray-400 lg:text-right">
{{ $lastMetric->disk_total }} MB
{{ $lastMetric ? $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->disk_used }} MB
{{ $lastMetric ? $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->disk_free }} MB
{{ $lastMetric ? $lastMetric->disk_free : "-" }} MB
</div>
</x-simple-card>
</div>

View File

@ -24,10 +24,10 @@ public function test_visit_metrics(): void
]);
$this->get(route('servers.metrics', ['server' => $this->server]))
->assertSuccessful()
->assertSee('CPU Load')
->assertSee('Memory Usage')
->assertSee('Disk Usage')
->assertSee('Resource Usage');
->assertSee('Disk Usage');
}
public function test_cannot_visit_metrics(): void