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:
parent
1c3993133e
commit
e802fa07e2
13 changed files with 975 additions and 749 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue