Skip to content

Commit

Permalink
Merge pull request #31 from mvenghaus/feature/queue-stats-pending-jobs
Browse files Browse the repository at this point in the history
Pending jobs stats + german language
  • Loading branch information
Baptiste Bouillot authored Feb 15, 2024
2 parents e07fdfb + 88d108b commit 05faa0d
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 0 deletions.
20 changes: 20 additions & 0 deletions resources/lang/de/translations.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

return [
'breadcrumb' => 'Queue Job Monitor',
'title' => 'Queued Jobs',
'navigation_label' => 'Jobs',
'navigation_group' => 'System',
'total_jobs' => 'Ausgeführte Jobs',
'pending_jobs' => 'Wartende Jobs',
'execution_time' => 'Gesamtlaufzeit',
'average_time' => 'Durchschnittliche Laufzeit',
'succeeded' => 'Erfolgreich',
'failed' => 'Fehlgeschlagen',
'running' => 'Läuft',
'status' => 'Status',
'name' => 'Name',
'queue' => 'Queue',
'progress' => 'Fortschritt',
'started_at' => 'Gestartet am',
];
1 change: 1 addition & 0 deletions resources/lang/en/translations.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
'navigation_label' => 'Jobs',
'navigation_group' => 'System',
'total_jobs' => 'Total Jobs Executed',
'pending_jobs' => 'Pending Jobs',
'execution_time' => 'Total Execution Time',
'average_time' => 'Average Execution Time',
'succeeded' => 'Succeeded',
Expand Down
1 change: 1 addition & 0 deletions resources/lang/es/translations.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
'navigation_label' => 'Trabajos',
'navigation_group' => 'Sistema',
'total_jobs' => 'Total Trabajos Ejecutados',
'pending_jobs' => 'Trabajos Pendientes',
'execution_time' => 'Tiempo Total de Ejecución',
'average_time' => 'Tiempo Promedio de Ejecución',
'succeeded' => 'Exitoso',
Expand Down
1 change: 1 addition & 0 deletions resources/lang/fr/translations.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
'navigation_label' => 'Jobs',
'navigation_group' => 'Système',
'total_jobs' => 'Total Jobs Executé(s)',
'pending_jobs' => 'Jobs en attente',
'execution_time' => "Temps Total d'Execution",
'average_time' => "Temps moyen d'Execution",
'succeeded' => 'Succes',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Filament\Widgets\StatsOverviewWidget as BaseWidget;
use Filament\Widgets\StatsOverviewWidget\Card;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Queue;

class QueueStatsOverview extends BaseWidget
{
Expand All @@ -23,6 +24,7 @@ protected function getCards(): array

return [
Card::make(__('filament-jobs-monitor::translations.total_jobs'), $aggregatedInfo->count ?? 0),
Card::make(__('filament-jobs-monitor::translations.pending_jobs'), Queue::size()),
Card::make(__('filament-jobs-monitor::translations.execution_time'), ($aggregatedInfo->total_time_elapsed ?? 0).'s'),
Card::make(__('filament-jobs-monitor::translations.average_time'), ceil((float) $aggregatedInfo->average_time_elapsed).'s' ?? 0),
];
Expand Down

0 comments on commit 05faa0d

Please sign in to comment.