mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Make dashboard Sidekiq's default home page, fixes #722
This commit is contained in:
parent
f235f600db
commit
9cc6bea2a3
2 changed files with 8 additions and 8 deletions
|
@ -105,7 +105,7 @@ module Sidekiq
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
get "/" do
|
get "/workers" do
|
||||||
slim :index
|
slim :index
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -203,7 +203,7 @@ module Sidekiq
|
||||||
redirect "#{root_path}scheduled"
|
redirect "#{root_path}scheduled"
|
||||||
end
|
end
|
||||||
|
|
||||||
get '/dashboard' do
|
get '/' do
|
||||||
@redis_info = Sidekiq.redis { |conn| conn.info }.select{ |k, v| redis_keys.include? k }
|
@redis_info = Sidekiq.redis { |conn| conn.info }.select{ |k, v| redis_keys.include? k }
|
||||||
stats_history = Sidekiq::Stats::History.new((params[:days] || 30).to_i)
|
stats_history = Sidekiq::Stats::History.new((params[:days] || 30).to_i)
|
||||||
@processed_history = stats_history.processed
|
@processed_history = stats_history.processed
|
||||||
|
@ -231,11 +231,11 @@ module Sidekiq
|
||||||
|
|
||||||
def self.tabs
|
def self.tabs
|
||||||
@tabs ||= {
|
@tabs ||= {
|
||||||
"Workers" =>'',
|
"Dashboard" => '',
|
||||||
"Queues" =>'queues',
|
"Workers" => 'workers',
|
||||||
"Retries" =>'retries',
|
"Queues" => 'queues',
|
||||||
"Scheduled" =>'scheduled',
|
"Retries" => 'retries',
|
||||||
"Dashboard" =>'dashboard'
|
"Scheduled" => 'scheduled',
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ html
|
||||||
span.title Status
|
span.title Status
|
||||||
== slim :_status
|
== slim :_status
|
||||||
== slim :_summary
|
== slim :_summary
|
||||||
- unless current_path.include?("dashboard")
|
- unless current_path == ''
|
||||||
.row
|
.row
|
||||||
.span2
|
.span2
|
||||||
- if params[:poll]
|
- if params[:poll]
|
||||||
|
|
Loading…
Add table
Reference in a new issue