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

Update queues during live poll.

This commit is contained in:
Brandon Hilkert 2012-12-03 20:00:02 -05:00
parent db46142086
commit 7351fe300b
4 changed files with 17 additions and 18 deletions

View file

@ -67,6 +67,7 @@ $(function() {
$('.summary').replaceWith(responseHtml.find('.summary'));
$('.status').html(responseHtml.find('.status').html().toString());
$('.workers').replaceWith(responseHtml.find('.workers'));
$('.queues').replaceWith(responseHtml.find('.queues'));
$('time').timeago();
});
var currentTime = new Date();
@ -76,7 +77,7 @@ $(function() {
});
$(function() {
$('[data-confirm]').click(function() {
$(document).on("click", "[data-confirm]", function() {
return confirm($(this).attr('data-confirm'));
});
});

13
web/views/_queues.slim Normal file
View file

@ -0,0 +1,13 @@
table class="queues table table-hover table-bordered table-striped table-white"
thead
th Queue
th Size
th Actions
- queues.each do |(queue, size)|
tr
td
a href="#{root_path}queues/#{queue}" #{queue}
td= number_with_delimiter(size)
td width="20%"
form action="#{root_path}queues/#{queue}" method="post"
input.btn.btn-danger.btn-small type="submit" name="delete" value="Delete" data-confirm="Are you sure you want to delete the #{queue} queue?"

View file

@ -2,3 +2,4 @@ div
== slim :_summary
== slim :_workers
== slim :_status
== slim :_queues

View file

@ -1,19 +1,3 @@
h3 Queues
- if @queues.size > 0
table class="queues table table-hover table-bordered table-striped table-white"
thead
th Queue
th Size
th Actions
- queues.each do |(queue, size)|
tr
td
a href="#{root_path}queues/#{queue}" #{queue}
td= number_with_delimiter(size)
td width="20%"
form action="#{root_path}queues/#{queue}" method="post"
input.btn.btn-danger.btn-small type="submit" name="delete" value="Delete" data-confirm="Are you sure you want to delete the #{queue} queue?"
- else
p No queues found.
a href="#{root_path}" ← Back
== slim :_queues