{# Hani #1 2026-11-22: a backup run followed live - each device (later each VM) in turn: waiting, a spinner while it is backed up, then ✓ per file (.backup and .rsc) or ✗ with the reason; then the next one. backup-progress.js asks /settings/backups/jobs/ every 2 s while the run goes and updates these rows; without it the page shows the state when it was opened. Expects `job`. #} {% macro kb(n) %}{% if n is none %}{% elif n >= 1073741824 %}{{ (n / 1073741824)|round(1) }} GB{% elif n >= 1048576 %}{{ (n / 1048576)|round(1) }} MB{% elif n >= 1024 %}{{ (n / 1024)|round|int }} KB{% else %}{{ n }} B{% endif %}{% endmacro %} {% set vm_action = (job.title or '').startswith('VM action') %}{# R90.8: start/shut down/restart/stop follow the same rows #} {% set states = {'waiting': ('Waiting', 'status-neutral'), 'running': ('Working' if vm_action else 'Backing up', 'status-warning'), 'done': ('Done', 'status-success'), 'failed': ('Failed', 'status-danger'), 'skipped': ('Not run', 'status-neutral')} %}

{{ job.title }} {{ {'running': 'Running', 'done': 'Done', 'failed': 'Finished with failures', 'interrupted': 'Interrupted'}[job.state] }} {{ job.done }} of {{ job.total }} done

    {% for i in job["items"] %}{% set label, css = states[i.state] %}
  1. {% if i.state == 'running' %}{% elif i.state == 'done' %}✓{% elif i.state == 'failed' %}✗{% else %}·{% endif %} {{ i.name }}{% if i.target %} {{ i.target }}{% endif %} {{ label }} {% for f in i.files %}✓ {{ f.name.rsplit('.', 1)[-1] if '.' in f.name else f.kind }} {{ kb(f.size) }}{% if f.kind == 'backup' %} · {{ 'encrypted' if f.encrypted else 'not encrypted' }}{% endif %} {% if f.kind == 'vzdump' %}✓ Proxmox {% if f.check == 'ok' %}✓ on the storage{% elif f.check == 'missing' %}✗ not found on the storage{% else %}storage not checked by NEXXVU{% endif %} {% endif %}{% endfor %} {{ i.message or '' }}
  2. {% endfor %}
{% if job.summary and job.state != 'running' %}{% else %}{% endif %}