{% extends "page.html" %} {% block main %}
{% if ongoing_tasks or user.spawner.pending or existing_vm_status.name == 'poll_error' %} {% set button_status = "disabled" %} {% else %} {% set button_status = '' %} {% endif %} {% if ongoing_tasks %}
Can't start new backup/restore tasks while there are any active tasks
{% elif user.spawner.pending %}
Can't start new backup/restore tasks while there are spawn in process
{% elif existing_vm_status.name == 'poll_error' %}
QYP or VM status is unavailable, so backup and restore are blocked. {% if existing_vm %} Link to VM {% endif %}
{% endif %} {% if tasks %}

Current backup/restore tasks

{% for task in tasks %} {% endfor %}
ID Age Type Status
{{ task['id'] }} {{ task['age_min'] }} minutes ago {{ task['task_type'] }} {{ task['status'] }} {% set stop_disabled = "" if task['canceable'] else 'disabled' %} Stop
{% endif %} {% if user.spawner.active or existing_vm_status.is_running %}
Do backup
{% elif existing_vm_status.is_stopped %}
You have stopped VM {{ existing_vm.host }} and can start it via QYP just for backup purposes
{% elif existing_vm and not existing_vm_status.is_stopped and not existing_vm_status.is_running %}
You have VM {{ existing_vm.host }} in status {{ existing_vm_status.name }}; it must be running for backup purposes
{% endif %}

Last {{ backups_nu }} backups

WARNING! Restore might overwrite files on your machine!
{% if not backups %} {% endif %} {% for backup in backups %} {% endfor %}
ID Age Expires in Size Host
No backups yet
{{ backup['id'] }} {{ backup['age'] }} days ago {% if backup['expires'] %} {{ backup['expires'] }} days {% else %} never {% endif %} {{ backup['size'] }} MB {{ backup['host'] }} {% if not user.spawner.active %} Spawn and {% endif %}Restore
{% endblock %}