diff --git a/resources/views/livewire/queues.blade.php b/resources/views/livewire/queues.blade.php index b8bf7b03..fb05f995 100644 --- a/resources/views/livewire/queues.blade.php +++ b/resources/views/livewire/queues.blade.php @@ -26,132 +26,153 @@ -
- @foreach ($queues as $queue => $readings) -
-

- {{ Str::after($queue, ':') }} - @if ($showConnection) - ({{ Str::before($queue, ':') }}) - @endif -

- @php $latest = $readings->last() @endphp - @php - $highest = $readings->map(fn ($reading) => max( - $reading->queued, - $reading->processed, - $reading->failed, - ))->max() - @endphp +
-
{{ number_format($highest) }}
+ Livewire.hook('commit', ({ component, succeed }) => { + if (component.name === $wire.__instance.name) { + succeed(() => this.loadingNewDataset = false) + } + }) + } + }" + class="min-h-full flex flex-col" + :class="loadingNewDataset ? 'opacity-25 animate-pulse' : ''" + > + @if (count($queues) === 0) + + @else +
+ @foreach ($queues as $queue => $readings) +
+

+ {{ Str::after($queue, ':') }} + @if ($showConnection) + ({{ Str::before($queue, ':') }}) + @endif +

+ @php $latest = $readings->last() @endphp + @php + $highest = $readings->map(fn ($reading) => max( + $reading->queued, + $reading->processed, + $reading->failed, + ))->max() + @endphp -
+
{{ number_format($highest) }}
+ +
- + chart.data.labels = queues['{{ $queue }}'].map(reading => reading.date) + chart.data.datasets[0].data = queues['{{ $queue }}'].map(reading => reading.queued) + chart.data.datasets[1].data = queues['{{ $queue }}'].map(reading => reading.processed) + chart.data.datasets[2].data = queues['{{ $queue }}'].map(reading => reading.failed) + chart.update() + }) + } + }" + > + +
+
-
+ @endforeach
- @endforeach + @endif