1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-12-02 17:06:09 +00:00

feat(instances): snapshot the VMs chosen on the VM list

Taking the same snapshot of many VMs, before an update say, took each one's
Snapshots tab. The VM list's bulk form now has a snapshot name with Take
snapshots: an external snapshot, without memory and without freezing file
systems (the tab has those choices), queued as a snapshot.create job for
each chosen VM, with the tab's rules (change rights and the snapshot
permission). A VM refused or held is named and the others are queued; the
Jobs page follows them. Enter in any text box of the form sends nothing.
The power and snapshot views share one queuing helper.
This commit is contained in:
catborise 2026-11-20 14:04:48 +03:00
parent 1c3993133e
commit e802fa07e2
13 changed files with 975 additions and 749 deletions

View file

@ -40,15 +40,15 @@
later = setTimeout(update, 50);
}).observe(document.querySelector(".table-responsive") || document.body,
{attributes: true, attributeFilter: ["hidden", "class"], subtree: true});
// Enter in the tag box would send the form with its first button, Start: it sends nothing
var tagBox = document.getElementById("bulk-tag");
if (tagBox) {
tagBox.addEventListener("keydown", function (event) {
// Enter in a text box (a tag, a snapshot's name) would send the form with its first button,
// Start: it sends nothing
form.querySelectorAll("input[type='text']").forEach(function (box) {
box.addEventListener("keydown", function (event) {
if (event.key === "Enter") {
event.preventDefault();
}
});
}
});
form.addEventListener("submit", function (event) {
document.querySelectorAll("input[name='vm'][form='bulk-power']:checked").forEach(function (box) {
if (!box.getClientRects().length) {