From 1b4c35819e38f7811b3d082b6eb456ea36af4dd0 Mon Sep 17 00:00:00 2001 From: Bozhidar Date: Mon, 29 Apr 2024 14:17:30 +0300 Subject: [PATCH] Update RemoteBackupServerResource.php --- web/app/Filament/Resources/RemoteBackupServerResource.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/web/app/Filament/Resources/RemoteBackupServerResource.php b/web/app/Filament/Resources/RemoteBackupServerResource.php index d5593c4..95fa92c 100644 --- a/web/app/Filament/Resources/RemoteBackupServerResource.php +++ b/web/app/Filament/Resources/RemoteBackupServerResource.php @@ -72,7 +72,12 @@ class RemoteBackupServerResource extends Resource Tables\Columns\TextColumn::make('name'), Tables\Columns\TextColumn::make('type')->badge(), Tables\Columns\TextColumn::make('hostname'), - Tables\Columns\TextColumn::make('status')->badge(), + Tables\Columns\TextColumn::make('status') + ->badge() + ->color(fn (string $state): string => match ($state) { + 'online' => 'success', + 'offline' => 'danger', + }) ]) ->filters([ //