1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

Slight restructure to the retry page, make code style not suck

This commit is contained in:
Mike Perham 2012-05-04 21:00:48 -07:00
parent 713c519576
commit 65e8980dc2
3 changed files with 25 additions and 15 deletions

View file

@ -137,6 +137,8 @@ module Sidekiq
get "/retries/:score" do get "/retries/:score" do
halt 404 unless params[:score] halt 404 unless params[:score]
@score = params[:score].to_f @score = params[:score].to_f
@retries = retries_with_score(@score)
redirect root_path if @retries.empty?
slim :retry slim :retry
end end

View file

@ -1,12 +1,11 @@
/* /*
*= require_self
*= require vendor/bootstrap *= require vendor/bootstrap
*= require vendor/bootstrap-responsive *= require vendor/bootstrap-responsive
*= require_self
*/ */
body { body {
position: relative; position: relative;
padding-top: 90px; padding-top: 90px;
background-color: #aaa;
} }
td form { td form {
@ -17,3 +16,8 @@ td form .btn {
margin: 0; margin: 0;
} }
code {
padding: 0;
border: 0;
background-color: inherit;
}

View file

@ -1,7 +1,7 @@
header header
h1 Retry Job h1 Job
- retries_with_score(@score).each do |msg| - @retries.each do |msg|
table class="table table-striped table-bordered" table class="table table-striped table-bordered"
tbody tbody
tr tr
@ -16,17 +16,6 @@ header
th Job Arguments th Job Arguments
td td
code= msg['args'].inspect[0..1000] code= msg['args'].inspect[0..1000]
tr
th Error Class
td
code= msg['error_class']
tr
th Error Message
td= msg['error_message']
- if !msg['error_backtrace'].nil?
tr
th Error Backtrace
td== msg['error_backtrace'].join("<br/>")
- if msg['retry_count'] > 0 - if msg['retry_count'] > 0
tr tr
th Retry Count th Retry Count
@ -42,6 +31,21 @@ header
th Next Retry th Next Retry
td== relative_time(Time.at(@score)) td== relative_time(Time.at(@score))
h1 Error
table class="table table-striped table-bordered"
tbody
tr
th Error Class
td
code= msg['error_class']
tr
th Error Message
td= msg['error_message']
- if !msg['error_backtrace'].nil?
tr
th Error Backtrace
td
code== msg['error_backtrace'].join("<br/>")
form.form-horizontal action="#{root_path}retries/#{@score}" method="post" form.form-horizontal action="#{root_path}retries/#{@score}" method="post"
a.btn href="#{root_path}" &larr; Back a.btn href="#{root_path}" &larr; Back
input.btn.btn-primary type="submit" name="retry" value="Retry Now" input.btn.btn-primary type="submit" name="retry" value="Retry Now"