Skip to content

Commit

Permalink
Merge pull request #15 from bcollins-oxford/patch-1
Browse files Browse the repository at this point in the history
Update QueueMonitorResource to Fix and apply sorting
  • Loading branch information
Baptiste Bouillot authored Aug 9, 2023
2 parents baad905 + d92e44e commit 6ce726d
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/Resources/QueueMonitorResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,15 @@ public static function form(Form $form): Form
->maxLength(255),
Forms\Components\TextInput::make('queue')
->maxLength(255),
Forms\Components\DateTimePicker::make('started_at')
->sortable(),
Forms\Components\DateTimePicker::make('started_at'),
Forms\Components\DateTimePicker::make('finished_at'),
Forms\Components\Toggle::make('failed')
->required(),
Forms\Components\TextInput::make('attempt')
->required(),
Forms\Components\Textarea::make('exception_message')
->maxLength(65535),
])->defaultSort('started_at', 'desc');
]);
}

public static function table(Table $table): Table
Expand All @@ -54,16 +53,16 @@ public static function table(Table $table): Table
'primary' => 'running',
'success' => 'succeeded',
'danger' => 'failed',
]),
])->sortable(),
Tables\Columns\TextColumn::make('name')
->label(__('filament-jobs-monitor::translations.name')),
->label(__('filament-jobs-monitor::translations.name'))->sortable(),
Tables\Columns\TextColumn::make('queue')
->label(__('filament-jobs-monitor::translations.queue')),
ProgressColumn::make('progress')->label(__('filament-jobs-monitor::translations.progress'))->color('warning'),
->label(__('filament-jobs-monitor::translations.queue'))->sortable(),
ProgressColumn::make('progress')->label(__('filament-jobs-monitor::translations.progress'))->color('warning')->sortable(),
Tables\Columns\TextColumn::make('started_at')
->label(__('filament-jobs-monitor::translations.started_at'))
->since(),
])
->since()->sortable(),
])->defaultSort('started_at', 'desc')
->bulkActions([
Tables\Actions\DeleteBulkAction::make(),
]);
Expand Down

0 comments on commit 6ce726d

Please sign in to comment.