1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-11 12:46:49 +00:00

feat(storages): volume clone runs as a job

This commit is contained in:
catborise 2026-10-14 23:34:21 +03:00
parent bb91c13926
commit 49232c6e1d
10 changed files with 178 additions and 42 deletions

View file

@ -2,6 +2,7 @@
{% load static %}
{% load vm_states %}
{% load i18n %}
{% load operations %}
{% load bootstrap_icons %}
{% block title %}{% trans "Instance" %} - {{ instance.name }}{% endblock %}
@ -682,14 +683,7 @@
return true;
});
</script>
<script src="{% static 'operations/job_panel.js' %}"></script>
<script>
jobPanel(document.getElementById("job-panel"), {
resource: "{% url 'operation-resource' %}?key=instance%3A{{ instance.uuid|urlencode }}",
job: function (id) { return "{% url 'operation-list' %}" + id + "/"; },
cancel: function (id) { return "{% url 'operation-list' %}" + id + "/cancel/"; },
}, "{{ csrf_token }}", {{ remembered_jobs|safe }});
</script>
{% job_panel_script job_resource %}
<script src="{% static 'js/instance_tabs.js' %}"></script>
<script>
// Open the tab whose control targets "#<pane id>"

View file

@ -205,7 +205,7 @@ def _instance_page(request, pk, instance, compute):
instance.drbd = drbd_status(request, pk)
instance.save()
remembered_jobs = json.dumps(jobs.take_remembered(request, claims.instance_key(instance.uuid)))
job_resource = claims.instance_key(instance.uuid)
return render(request, "instance.html", locals(),)