Localize Sidekiq dashboard panel

This commit is contained in:
Andreas Nedbal 2022-12-25 00:29:24 +01:00
parent 2e27c45bbe
commit 7cc57968bc
2 changed files with 19 additions and 10 deletions

View File

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

View File

@ -88,6 +88,19 @@ en:
title: "Create Announcement" title: "Create Announcement"
edit: edit:
title: "Edit Announcement" title: "Edit Announcement"
dashboard:
sidekiq:
title: "Sidekiq"
error_html: |
<strong>There are no Sidekiq processes running.</strong>
Background jobs will not be processed.
<br/>
To fix this, run
<tt>RAILS_ENV=%{env} bundle exec sidekiq</tt>
processes: "Processes"
enqueued: "Enqueued"
retries: "Retries"
dead: "Dead"
answerbox: answerbox:
header: header:
anon_hint: :inbox.entry.anon_hint anon_hint: :inbox.entry.anon_hint