move sidekiq panel into separate partial

This commit is contained in:
Andreas Nedbal 2022-12-25 00:23:53 +01:00
parent c730faa1b9
commit 2e27c45bbe
2 changed files with 27 additions and 26 deletions

View File

@ -0,0 +1,26 @@
.card
.card-header
%a.d-flex{ href: sidekiq_web_path }
%strong Sidekiq
%i.fa.fa-chevron-right.ml-auto.align-self-center
- unless @sidekiq[:processes].count.positive?
.card-body.bg-danger.text-light
%strong There are no Sidekiq processes running.
Background jobs will not be processed.
%br
To fix this, run
%tt RAILS_ENV=#{Rails.env} bundle exec sidekiq
.list-group
.list-group-item.d-flex
%span Processes
%span.ml-auto= @sidekiq[:processes].count
.list-group-item.d-flex
%span Enqueued
%span.ml-auto= @sidekiq[:stats].enqueued
.list-group-item.d-flex
%span Retries
%span.ml-auto= @sidekiq[:stats].retry_size
.list-group-item.d-flex
%span Dead
%span.ml-auto= @sidekiq[:stats].dead_size

View File

@ -1,30 +1,5 @@
.row
.col-sm-6
.card
.card-header
%a.d-flex{ href: sidekiq_web_path }
%strong Sidekiq
%i.fa.fa-chevron-right.ml-auto.align-self-center
- unless @sidekiq[:processes].count.positive?
.card-body.bg-danger.text-light
%strong There are no Sidekiq processes running.
Background jobs will not be processed.
%br
To fix this, run
%tt RAILS_ENV=#{Rails.env} bundle exec sidekiq
.list-group
.list-group-item.d-flex
%span Processes
%span.ml-auto= @sidekiq[:processes].count
.list-group-item.d-flex
%span Enqueued
%span.ml-auto= @sidekiq[:stats].enqueued
.list-group-item.d-flex
%span Retries
%span.ml-auto= @sidekiq[:stats].retry_size
.list-group-item.d-flex
%span Dead
%span.ml-auto= @sidekiq[:stats].dead_size
= render "admin/dashboard/sidekiq"
- parent_layout "admin"