Fix wrong finish staus on status.json
This commit is contained in:
parent
f826952327
commit
ec4bd696e1
@ -65,7 +65,7 @@
|
||||
|
||||
|
||||
//Refresh periode in seconds
|
||||
var refresh = 15;
|
||||
var refresh = 10;
|
||||
var done = false;
|
||||
function status(){
|
||||
$.getJSON("/status.json", function(data) {
|
||||
@ -79,7 +79,8 @@ function status(){
|
||||
done = false;
|
||||
}else{
|
||||
$('tbody').append('<td>'+val.status+'</td>');
|
||||
done = true;
|
||||
|
||||
done = data.finish;
|
||||
}
|
||||
$('#table-design').append('</tr>');
|
||||
});
|
||||
|
@ -222,7 +222,7 @@ def check_mount_disk(partition_name, refresh):
|
||||
@app.route('/status.json')
|
||||
def export_backup_status():
|
||||
exports = dbstat.query('select * from stats where TYPE="EXPORT" and backup_start>="%s"' % mindate)
|
||||
return jsonify(data=exports)
|
||||
return jsonify(data=exports,finish= ( len(os.listdir(spooler)) == 0 ))
|
||||
|
||||
@app.route('/backups.json')
|
||||
def last_backup_json():
|
||||
@ -244,6 +244,8 @@ def export_backup():
|
||||
backup_dict = read_config()
|
||||
sections = []
|
||||
for backup_types in backup_dict:
|
||||
if backup_types == "null_list":
|
||||
continue
|
||||
for section in backup_dict[backup_types]:
|
||||
if section.count > 0:
|
||||
sections.append(section[1])
|
||||
|
Loading…
Reference in New Issue
Block a user