diff --git a/app/Filament/Resources/ResultResource.php b/app/Filament/Resources/ResultResource.php index 77cdc69d5..395a9e807 100644 --- a/app/Filament/Resources/ResultResource.php +++ b/app/Filament/Resources/ResultResource.php @@ -100,10 +100,12 @@ public static function table(Table $table): Table return $table ->columns([ TextColumn::make('id') - ->label('ID'), + ->label('ID') + ->sortable(), TextColumn::make('server') ->getStateUsing(fn (Result $record): ?string => ! blank($record->server_id) ? $record->server_id.' ('.$record->server_name.')' : null) - ->toggleable(), + ->toggleable() + ->sortable(), IconColumn::make('successful') ->boolean() ->toggleable(), @@ -112,25 +114,31 @@ public static function table(Table $table): Table ->toggleable(), TextColumn::make('download') ->label('Download (Mbps)') - ->getStateUsing(fn (Result $record): ?string => ! blank($record->download) ? toBits(convertSize($record->download), 2) : null), + ->getStateUsing(fn (Result $record): ?string => ! blank($record->download) ? toBits(convertSize($record->download), 2) : null) + ->sortable(), TextColumn::make('upload') ->label('Upload (Mbps)') - ->getStateUsing(fn (Result $record): ?string => ! blank($record->upload) ? toBits(convertSize($record->upload), 2) : null), + ->getStateUsing(fn (Result $record): ?string => ! blank($record->upload) ? toBits(convertSize($record->upload), 2) : null) + ->sortable(), TextColumn::make('ping') ->label('Ping (Ms)') - ->toggleable(), + ->toggleable() + ->sortable(), TextColumn::make('download_jitter') ->getStateUsing(fn (Result $record): ?string => json_decode($record->data, true)['download']['latency']['jitter'] ?? null) ->toggleable() - ->toggledHiddenByDefault(), + ->toggledHiddenByDefault() + ->sortable(), TextColumn::make('upload_jitter') ->getStateUsing(fn (Result $record): ?string => json_decode($record->data, true)['upload']['latency']['jitter'] ?? null) ->toggleable() - ->toggledHiddenByDefault(), + ->toggledHiddenByDefault() + ->sortable(), TextColumn::make('ping_jitter') ->getStateUsing(fn (Result $record): ?string => json_decode($record->data, true)['ping']['jitter'] ?? null) ->toggleable() - ->toggledHiddenByDefault(), + ->toggledHiddenByDefault() + ->sortable(), TextColumn::make('created_at') ->label('Created') ->dateTime($settings->time_format ?? 'M j, Y G:i:s')