Class: ActiveAdmin::SidekiqStats

Inherits:
Arbre::Component
  • Object
show all
Defined in:
lib/active_admin/sidekiq_stats.rb

Constant Summary collapse

CONTAINER_STYLE =
'display: flex; justify-content: center; align-items: center;'
VALUE_STYLE =
'display: flex; flex:1; justify-content: center; align-items: center; flex-direction: column; align-self: baseline; text-align: center;'

Instance Method Summary collapse

Instance Method Details

#build(attributes = {}) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/active_admin/sidekiq_stats.rb', line 8

def build(attributes = {})
  super(attributes)

  panel('Sidekiq Stats') do
    div(style: CONTAINER_STYLE) do
      begin
        build_fields
      rescue Redis::CannotConnectError
        h1 'Redis Connection Failed'
      end
    end
  end
end