Skip to content

Queue Monitor fails when queue-monitor.ui.show_metrics == FALSE #165

@jschlies

Description

@jschlies

Looking at ShowQueueMonitorController, I see that when queue-monitor.ui.show_metrics == FALSE, $metrics is NULL and passed to view queue-monitor::jobs.

Looking in view queue-monitor::jobs, I see that $metrics->all() is called with no NULL check causing failure.

I suggest that view queue-monitor::jobs. should be updated to:
`

@if(config('queue-monitor.ui.show_metrics'))


@foreach($metrics->all() as $metric)
@include('queue-monitor::partials.metrics-card', [
'metric' => $metric,
])
@Endforeach

@endif

`
PHP 8.2

If I'm misinformed, please correct me, If asked, I will happily make a PR.

Otherwise, very happy with package

Thanks,
Jim

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions