improve layout of Sidekiq dashboard panel

This commit is contained in:
Andreas Nedbal 2022-12-25 00:18:17 +01:00
parent cf88da111c
commit be452c48b0
1 changed files with 27 additions and 28 deletions

View File

@ -1,31 +1,30 @@
.card
.card-body
%h2
Sidekiq
%a{ href: sidekiq_web_path } View dashboard
.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?
.alert.alert-danger{ role: :alert }
.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
%table.table
%tbody
%tr
%th Processes
%td= @sidekiq[:processes].count
%tr
%th Enqueued
%td= @sidekiq[:stats].enqueued
%tr
%th Retries
%td= @sidekiq[:stats].retry_size
%tr
%th Dead
%td= @sidekiq[:stats].dead_size
.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
- parent_layout "admin"