1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-12-03 17:36:05 +00:00

feat(instances): a superuser tags the VMs chosen on the VM list

Tagging many VMs took each one's Settings tab. The VM list's bulk form now
has, for a superuser, a tag box (every tag offered) with Add tag and Remove
tag: under the ownership lock the tag is checked as on the Settings tab,
made if new, and added to (or removed from) the chosen VMs that lack (or
have) it, each with its own log row. Enter in the tag box sends nothing (it
would press Start, the form's first button); only the two tag actions are
taken, and none of the chosen VMs left makes no tag.
This commit is contained in:
catborise 2026-11-20 12:37:26 +03:00
parent 640511cfd4
commit 5c169ca504
10 changed files with 540 additions and 338 deletions

View file

@ -39,6 +39,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) {
if (event.key === "Enter") {
event.preventDefault();
}
});
}
form.addEventListener("submit", function () {
document.querySelectorAll("input[name='vm'][form='bulk-power']:checked").forEach(function (box) {
if (!box.getClientRects().length) {