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

fix(computes): Bulk Migrate replaces Evacuate, and its list has Select all

The owner found "Evacuate" ("Boşalt") a poor name: the button, page and
job are now Bulk Migrate ("Toplu Taşı"), as Proxmox calls it, and so
are the URL, view, template, script, job kind and claim. The VM list
gets a Select all box in its header, which ticks every VM that can
migrate. The unclear Check button goes: another destination reloads the
list itself, and a host with one destination names it instead of
offering a choice.
This commit is contained in:
catborise 2026-11-15 19:32:54 +03:00
parent d20254f757
commit 60c581e5e1
17 changed files with 356 additions and 279 deletions

17
static/js/bulk_migrate.js Normal file
View file

@ -0,0 +1,17 @@
// The Bulk Migrate page: another destination reloads the list; the header
// box ticks or unticks every VM that can migrate, "Also migrate the
// shut-off VMs" the shut-off ones.
function tick(selector, checked) {
document.querySelectorAll(selector).forEach(function (box) {
box.checked = checked;
});
}
document.getElementById("bulk-migrate-target")?.addEventListener("change", function (event) {
event.target.form.submit();
});
document.getElementById("bulk-migrate-all")?.addEventListener("change", function (event) {
tick("input[name=instance]:not(:disabled)", event.target.checked);
});
document.getElementById("bulk-migrate-shut-off")?.addEventListener("change", function (event) {
tick("input[data-shut-off]:not(:disabled)", event.target.checked);
});

View file

@ -1,6 +0,0 @@
// The evacuate page: "Also migrate the shut-off VMs" ticks or unticks them.
document.getElementById("evacuate-shut-off")?.addEventListener("change", function (event) {
document.querySelectorAll("input[data-shut-off]:not(:disabled)").forEach(function (box) {
box.checked = event.target.checked;
});
});