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:
parent
db46142086
commit
7351fe300b
4 changed files with 17 additions and 18 deletions
|
@ -67,6 +67,7 @@ $(function() {
|
||||||
$('.summary').replaceWith(responseHtml.find('.summary'));
|
$('.summary').replaceWith(responseHtml.find('.summary'));
|
||||||
$('.status').html(responseHtml.find('.status').html().toString());
|
$('.status').html(responseHtml.find('.status').html().toString());
|
||||||
$('.workers').replaceWith(responseHtml.find('.workers'));
|
$('.workers').replaceWith(responseHtml.find('.workers'));
|
||||||
|
$('.queues').replaceWith(responseHtml.find('.queues'));
|
||||||
$('time').timeago();
|
$('time').timeago();
|
||||||
});
|
});
|
||||||
var currentTime = new Date();
|
var currentTime = new Date();
|
||||||
|
@ -76,7 +77,7 @@ $(function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
$('[data-confirm]').click(function() {
|
$(document).on("click", "[data-confirm]", function() {
|
||||||
return confirm($(this).attr('data-confirm'));
|
return confirm($(this).attr('data-confirm'));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
13
web/views/_queues.slim
Normal file
13
web/views/_queues.slim
Normal 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?"
|
|
@ -2,3 +2,4 @@ div
|
||||||
== slim :_summary
|
== slim :_summary
|
||||||
== slim :_workers
|
== slim :_workers
|
||||||
== slim :_status
|
== slim :_status
|
||||||
|
== slim :_queues
|
||||||
|
|
|
@ -1,19 +1,3 @@
|
||||||
h3 Queues
|
h3 Queues
|
||||||
|
|
||||||
- if @queues.size > 0
|
== slim :_queues
|
||||||
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
|
|
Loading…
Add table
Add a link
Reference in a new issue