Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

details action #51

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions resources/lang/cs/translations.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@
'queue' => 'Fronta',
'progress' => 'Pokrok',
'started_at' => 'Čas spuštění',
'details' => 'Podrobnosti',
];
1 change: 1 addition & 0 deletions resources/lang/de/translations.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@
'queue' => 'Queue',
'progress' => 'Fortschritt',
'started_at' => 'Gestartet am',
'details' => 'Details',
];
1 change: 1 addition & 0 deletions resources/lang/en/translations.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@
'queue' => 'Queue',
'progress' => 'Progress',
'started_at' => 'Started at',
'details' => 'Details',
];
1 change: 1 addition & 0 deletions resources/lang/es/translations.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@
'queue' => 'Cola',
'progress' => 'Progreso',
'started_at' => 'Iniciado a las',
'details' => 'Detalles',
];
1 change: 1 addition & 0 deletions resources/lang/fr/translations.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@
'queue' => 'File',
'progress' => 'Progression',
'started_at' => 'Débuté à',
'details' => 'Détails',
];
3 changes: 2 additions & 1 deletion resources/lang/it/translations.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@
"status" => "Stato",
"succeeded" => "Riuscito",
"title" => "Lavori in coda",
"total_jobs" => "Totale lavori eseguiti"
"total_jobs" => "Totale lavori eseguiti",
"details" => "Dettagli"
];
1 change: 1 addition & 0 deletions resources/lang/sk/translations.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@
'queue' => 'Front',
'progress' => 'Progres',
'started_at' => 'Začaté',
'details' => 'Detaily',
];
8 changes: 8 additions & 0 deletions resources/views/queue-monitor-details.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<h3>Attempts</h3>
<code>{{ $attempts }}</code>

<h3>Failed</h3>
<code>{{ $failed }}</code>

<h3>Exception</h3>
<code>{{ $exception_message }}</code>
1 change: 1 addition & 0 deletions src/FilamentJobsMonitorServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class FilamentJobsMonitorServiceProvider extends PackageServiceProvider
public function configurePackage(Package $package): void
{
$package->name(static::$name)
->hasViews()
->hasConfigFile()
->hasTranslations()
->hasMigration('create_filament-jobs-monitor_table');
Expand Down
12 changes: 12 additions & 0 deletions src/Resources/QueueMonitorResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use Filament\Tables\Table;
use Illuminate\Contracts\Database\Eloquent\Builder;
use Illuminate\Support\Str;
use Filament\Tables\Actions\Action as FilamentTableAction;

class QueueMonitorResource extends Resource
{
Expand Down Expand Up @@ -74,6 +75,17 @@ public static function table(Table $table): Table
->sortable(),
])
->defaultSort('started_at', 'desc')
->actions([
FilamentTableAction::make('details')
->label(__('filament-jobs-monitor::translations.details'))
->icon('heroicon-o-information-circle')
->modalContent(fn (QueueMonitor $queueMonitor) => view('filament-jobs-monitor::queue-monitor-details',[
'exception_message' => $queueMonitor->exception_message,
'failed' => $queueMonitor->failed,
'attempts' => $queueMonitor->attempt,
]))
->modalSubmitAction(false),
])
->bulkActions([
DeleteBulkAction::make(),
])
Expand Down