Fix bugs with huey

This commit is contained in:
ssamson-tis
2015-07-08 16:02:14 +02:00
parent 4c188d8f94
commit 9a561e66bb
4 changed files with 92 additions and 50 deletions
+7 -1
View File
@@ -76,8 +76,9 @@
//Refresh periode in seconds
var refresh = 10;
var refresh = 5;
var done = false;
var error = "";
function status(){
$.getJSON("/status.json", function(data) {
$("#table tbody").remove();
@@ -95,11 +96,16 @@ function status(){
}
$('#table-design').append('</tr>');
});
error = data.error;
});
if (done){
bootbox.alert('Backup finished');
window.clearInterval(timer);
};
if( error != ""){
window.clearInterval(timer);
bootbox.alert("Error: " + error);
};
};
var timer = window.setInterval(function(){
status();