From 7c94ad964fd8d0daebf9f341cabe15b1258d8178 Mon Sep 17 00:00:00 2001 From: Boy132 Date: Wed, 8 Jan 2025 10:25:35 +0100 Subject: [PATCH] update health page with tailwind classes --- .../views/filament/pages/health.blade.php | 64 +++++++++---------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/resources/views/filament/pages/health.blade.php b/resources/views/filament/pages/health.blade.php index 13cf00aec7..f81d2ef7a1 100644 --- a/resources/views/filament/pages/health.blade.php +++ b/resources/views/filament/pages/health.blade.php @@ -2,11 +2,11 @@ if(! function_exists('backgroundColor')) { function backgroundColor($status) { return match ($status) { - Spatie\Health\Enums\Status::ok()->value => 'background-color: rgb(209 250 229);', // bg-emerald-100 - Spatie\Health\Enums\Status::warning()->value => 'background-color: rgb(254 249 195);', // bg-yellow-100 - Spatie\Health\Enums\Status::skipped()->value => 'background-color: rgb(219 234 254);', // bg-blue-100 - Spatie\Health\Enums\Status::failed()->value, Spatie\Health\Enums\Status::crashed()->value => 'background-color: rgb(254 226 226);', // bg-red-100 - default => 'background-color: rgb(243 244 246);' // bg-gray-100 + Spatie\Health\Enums\Status::ok()->value => 'bg-success-100 dark:bg-success-200', + Spatie\Health\Enums\Status::warning()->value => 'bg-warning-100 dark:bg-warning-200', + Spatie\Health\Enums\Status::skipped()->value => 'bg-info-100 dark:bg-info-200', + Spatie\Health\Enums\Status::failed()->value, Spatie\Health\Enums\Status::crashed()->value => 'bg-danger-100 dark:bg-danger-200', + default => 'bg-gray-100 dark:bg-gray-200' }; } } @@ -15,11 +15,11 @@ function backgroundColor($status) { function iconColor($status) { return match ($status) { - Spatie\Health\Enums\Status::ok()->value => 'color: rgb(16 185 129);', // text-emerald-500 - Spatie\Health\Enums\Status::warning()->value => 'color: rgb(234 179 8);', // text-yellow-500 - Spatie\Health\Enums\Status::skipped()->value => 'color: rgb(59 130 246);', // text-blue-500 - Spatie\Health\Enums\Status::failed()->value, Spatie\Health\Enums\Status::crashed()->value => 'color: rgb(239 68 68);', // text-red-500 - default => 'color: rgb(107 114 128);' // text-gray-500 + Spatie\Health\Enums\Status::ok()->value => 'text-success-500 dark:text-success-600', + Spatie\Health\Enums\Status::warning()->value => 'text-warning-500 dark:text-warning-600', + Spatie\Health\Enums\Status::skipped()->value => 'text-info-500 dark:text-info-600', + Spatie\Health\Enums\Status::failed()->value, Spatie\Health\Enums\Status::crashed()->value => 'text-danger-500 dark:text-danger-600', + default => 'text-gray-500 dark:text-gray-600' }; } } @@ -40,31 +40,31 @@ function icon($status) @if (count($checkResults?->storedCheckResults ?? [])) - - @foreach ($checkResults->storedCheckResults as $result) -
-
- -
-
-
- {{ $result->label }} -
-
- @if (!empty($result->notificationMessage)) - {{ $result->notificationMessage }} - @else - {{ $result->shortSummary }} - @endif -
-
-
- @endforeach -
+ + @foreach ($checkResults->storedCheckResults as $result) +
+
+ +
+
+
+ {{ $result->label }} +
+
+ @if (!empty($result->notificationMessage)) + {{ $result->notificationMessage }} + @else + {{ $result->shortSummary }} + @endif +
+
+
+ @endforeach +
@endif @if ($lastRanAt) -
+
Check results from {{ $lastRanAt->diffForHumans() }}
@endif