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

Merge pull request #464 from dleung/2.2.1-custom

Added option in views to expand the description past the limit
This commit is contained in:
Mike Perham 2012-10-23 10:42:40 -07:00
commit b86f077522
2 changed files with 16 additions and 4 deletions

View file

@ -5,10 +5,16 @@ table class="table table-striped table-bordered workers"
th Class
th Arguments
th Started
- workers.each do |(worker, msg)|
- workers.each_with_index do |(worker, msg), index|
tr
td= worker
td= msg['queue']
td= msg['payload']['class']
td= msg['payload']['args'].inspect[0..100]
td
- if msg['payload']['args'].to_s.size > 100
= msg['payload']['args'].inspect[0..100] + "... "
button data-toggle="collapse" data-target="#worker_#{index}" class="btn btn-mini" Show All
.collapse[id="worker_#{index}" style="max-width: 750px;"]= msg['payload']['args']
- else
= msg['payload']['args']
td== relative_time(msg['run_at'].is_a?(Numeric) ? Time.at(msg['run_at']) : Time.parse(msg['run_at']))

View file

@ -7,9 +7,15 @@ table class="table table-striped table-bordered"
tr
th Class
th Arguments
- @messages.each do |msg|
- @messages.each_with_index do |msg, index|
tr
td= msg['class']
td= msg['args'].inspect[0..100]
td
- if msg['args'] and msg['args'].to_s.size > 100
= msg['args'].inspect[0..100] + "... "
button data-toggle="collapse" data-target="#worker_#{index}" class="btn btn-mini" Show All
.collapse[id="worker_#{index}"]= msg['args']
- else
= msg['args']
== slim :_paging, :locals => { :url => "#{root_path}queues/#{@name}" }