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

Merge branch 'master' of github.com:mperham/sidekiq

This commit is contained in:
Mike Perham 2012-08-19 11:31:29 -07:00
commit 8060cac909

View file

@ -20,6 +20,8 @@ $(function() {
}); });
$(function() { $(function() {
function pad(n) { return ('0' + n).slice(-2); }
$('a[name=poll]').data('polling', false); $('a[name=poll]').data('polling', false);
$('a[name=poll]').on('click', function(e) { $('a[name=poll]').on('click', function(e) {
@ -39,7 +41,7 @@ $(function() {
$('.workers').replaceWith(responseHtml.find('.workers')); $('.workers').replaceWith(responseHtml.find('.workers'));
}); });
var currentTime = new Date(); var currentTime = new Date();
$('.poll-status').text('Last polled at: ' + currentTime.getHours() + ':' + currentTime.getMinutes() + ':' + currentTime.getSeconds()); $('.poll-status').text('Last polled at: ' + currentTime.getHours() + ':' + pad(currentTime.getMinutes()) + ':' + pad(currentTime.getSeconds()));
}, 2000)); }, 2000));
$('.poll-status').text('Starting to poll...'); $('.poll-status').text('Starting to poll...');
pollLink.text('Stop Polling'); pollLink.text('Stop Polling');