1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-12-03 01:16:10 +00:00
webvirtcloud/vmbackups/templates/vmbackups/restore.html
catborise 4881c3cd3e fix(ui): forms ask one thing at a time, offer the host's pools and say less twice
- A backup schedule asks Which VMs first (a compute's, chosen VMs or a
  tag's) and shows that one field only (policy_scope.js); the other two
  are not read, so a choice left in them is neither saved nor an error.
- A backup target's, a restore's and a disk restore's storage pool
  field offers the chosen compute's active file pools, the ones a
  restore copies into (a target's: directory and NFS only), from
  vmbackups.views.pools, which reads them without a refresh
  (pool_choices.js); a name can still be typed and is checked as before.
- A field's label is no longer repeated inside it as a placeholder, and
  a list's empty choice says Choose… instead of Django's dashes
  (webvirtcloud.bootstrap.FieldRenderer).
- The schedule, target, e-mail OTP and VM delete forms put Cancel and
  their main button at the right, as the other forms do.
2026-11-22 00:25:53 +03:00

26 lines
1.4 KiB
HTML

{% extends "base.html" %}
{% load i18n %}
{% load static %}
{% load bootstrap_icons %}
{% load django_bootstrap5 %}
{% load operations %}
{% block title %}{% trans "Restore backup" %}{% 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" %}{% 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 as a new VM with its own UUID and MAC addresses.{% endblocktrans %}</p>
{% include "vmbackups/damage_warning.html" %}
<div class="card" style="max-width: 40rem;">
<div class="card-body">
<form method="post">
{% csrf_token %}{% submission_key %}
{% if place %}<p>{% blocktrans with compute=place.compute.name pool=place.pool %}On {{ compute }}, in storage pool {{ pool }}: the VM's host and the pool of its first disk.{% endblocktrans %}</p>{% endif %}
{% bootstrap_form form %}
<button type="submit" class="btn btn-primary">{% bs_icon 'arrow-clockwise' %} {% trans "Restore" %}</button>
</form>
</div>
</div>
{% endblock %}
{% block script %}<script src="{% static 'vmbackups/pool_choices.js' %}"></script>{% endblock %}