Fix backup status dots disappearing after page load
/api/backups returned plain filename strings while pages/backups.html's server-rendered dots came from get_local_backups_with_status()/ get_vm_backups_with_status(). platform.js's DOMContentLoaded handler always calls refreshBackupsList() (backups.html has #backup-history-list, which triggers it unconditionally), which re-fetches /api/backups and rebuilds #local-backup-list/#vm-backup-list via renderBackupList() — a version with zero knowledge of status, wiping out the dots seconds after initial paint. Switch /api/backups to the *_with_status() variants and have renderBackupList() render the same status-dot markup as the Jinja template, so the dot is sourced from persisted backup metadata on every render path, not just the first one.
This commit is contained in:
@@ -377,7 +377,7 @@ def api_container_status(name):
|
||||
@app.route('/api/backups')
|
||||
@login_required
|
||||
def api_backups():
|
||||
return jsonify({'local': get_local_backups(), 'vm': get_vm_backups()})
|
||||
return jsonify({'local': get_local_backups_with_status(), 'vm': get_vm_backups_with_status()})
|
||||
|
||||
|
||||
@app.route('/api/backups/log')
|
||||
|
||||
Reference in New Issue
Block a user