1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-12-03 09:26:03 +00:00
webvirtcloud/vmbackups/templates/vmbackups/restore_over.html
catborise 2c8493ba8c fix: a test alert button; damage shown and warned of on restore
Audit of the alerts and backup verification: an operator could learn
that the alert mail or webhook works only from a real failure. Settings
> Alerts gets "Send a test alert", sent at once to the channels saved,
each channel's result shown. A damaged backup's reasons were only in a
tooltip, so not on a touch screen: they show under the badge. A restore
of a backup that a verification found damaged, or of an incremental on
a damaged base (shown as Ready), said nothing: the restore pages warn.
2026-11-19 17:24:18 +03:00

40 lines
2.6 KiB
HTML

{% extends "base.html" %}
{% load i18n %}
{% load bootstrap_icons %}
{% load operations %}
{% block title %}{% trans "Restore over the VM" %}{% endblock %}
{% block page_heading %}<a href="{% if user.is_superuser %}{% url 'vmbackups:index' %}{% else %}{% url 'instances:instance' backup.instance_id %}#backups{% endif %}">{% trans "Backups" %}</a> / {% trans "Restore over the VM" %}{% endblock page_heading %}
{% block content %}
<p>{% blocktrans with vm=backup.vm_name time=backup.created_at|date:"Y-m-d H:i" target=backup.target.name %}The backup of {{ vm }} taken {{ time }}, in {{ target }}, is restored over the VM: its disks are copied as new volumes and the VM is switched to them. Its settings, MAC addresses and UUID stay.{% endblocktrans %}</p>
{% include "vmbackups/damage_warning.html" %}
{% if problem %}
<div class="alert alert-warning" role="status">{% bs_icon 'exclamation-triangle' %} {{ problem }}</div>
{% else %}
<div class="card" style="max-width: 50rem;">
<div class="card-body">
<table class="table table-sm" id="restore-over-disks">
<thead><tr><th>{% trans "Disk" %}</th><th>{% trans "Now" %}</th><th>{% trans "After the restore" %}</th></tr></thead>
<tbody>
{% for disk in disks %}
<tr><td>{{ disk.dev }}</td><td class="text-break">{{ disk.old }}</td><td class="text-break">{{ disk.pool }} / {{ disk.name }}</td></tr>
{% endfor %}
</tbody>
</table>
<ul>
{% if user.is_superuser %}<li>{% trans "The old volumes stay in their pools until you delete them." %}</li>
{% else %}<li>{% trans "The disks the VM runs from now are deleted once it is switched to the new ones." %}</li>{% endif %}
{% if over.nvram %}<li>{% trans "The UEFI variables return to the backup's." %}</li>{% endif %}
{% if over.tpm %}<li>{% trans "The TPM state returns to the backup's." %}</li>{% endif %}
</ul>
<form method="post">
{% csrf_token %}{% submission_key %}
<button type="submit" class="btn btn-primary"
data-confirm="{% blocktrans with vm=backup.vm_name %}Restore the backup over {{ vm }}? What the VM wrote since the backup is no longer on the disks it runs from.{% endblocktrans %}">{% bs_icon 'arrow-clockwise' %} {% trans "Restore over the VM" %}</button>
</form>
</div>
</div>
{% endif %}
{% endblock %}