|
|
@ -208,7 +208,7 @@
|
|
|
|
window.location = '{{base_url}}execute/' + $(this).data("taskid");
|
|
|
|
window.location = '{{base_url}}execute/' + $(this).data("taskid");
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
$('a:not(.tabs), button:not(.cancel, #download_log)').click(function(){
|
|
|
|
$('a:not(.tabs), button:not(.cancel, #download_log), #restart').click(function(){
|
|
|
|
$('#loader').addClass('active');
|
|
|
|
$('#loader').addClass('active');
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
@ -217,7 +217,7 @@
|
|
|
|
url: "{{base_url}}shutdown",
|
|
|
|
url: "{{base_url}}shutdown",
|
|
|
|
async: false
|
|
|
|
async: false
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.fail(function(){
|
|
|
|
.always(function(){
|
|
|
|
document.open();
|
|
|
|
document.open();
|
|
|
|
document.write('Bazarr has shutdown.');
|
|
|
|
document.write('Bazarr has shutdown.');
|
|
|
|
document.close();
|
|
|
|
document.close();
|
|
|
@ -227,12 +227,19 @@
|
|
|
|
$('#restart').click(function(){
|
|
|
|
$('#restart').click(function(){
|
|
|
|
$.ajax({
|
|
|
|
$.ajax({
|
|
|
|
url: "{{base_url}}restart",
|
|
|
|
url: "{{base_url}}restart",
|
|
|
|
async: false
|
|
|
|
async: true
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.done(function(){
|
|
|
|
.done(function(){
|
|
|
|
document.open();
|
|
|
|
setTimeout(function(){ setInterval(ping, 2000); },8000);
|
|
|
|
document.write('Bazarr is restarting. Please reload page manually until it come back (should be less than 30 seconds).');
|
|
|
|
|
|
|
|
document.close();
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function ping() {
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
|
|
|
|
url: window.location.href,
|
|
|
|
|
|
|
|
success: function(result) {
|
|
|
|
|
|
|
|
window.location.reload();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</script>
|