mirror of
https://github.com/retspen/webvirtcloud
synced 2026-12-03 09:26:03 +00:00
fix(tags): second audit: unchanged saves, report, other lists, hosts list
- Saving a VM's tags unchanged writes no audit row. - The VM report has a Tags column. - A host's VM list and a user's VMs (account page) show the VMs' tags. - The hosts list says "No host matches the filters." with Clear the filters, as the VM list does; the tag list keeps to a phone's width with a long tag. - A removed VM's delete page says its owners and tags no longer come back; the VM history rows say "owners and tags kept/restored". - The API's ?tag= is trimmed; Tom Select's "Add tag" line shows the name in lower case as it is made; Bulk Migrate's tag list goes back to its title after a choice, so the same tag can be chosen again.
This commit is contained in:
parent
45225df1a4
commit
b74e798e70
23 changed files with 376 additions and 324 deletions
|
|
@ -39,6 +39,7 @@ document.getElementById("bulk-migrate-tag")?.addEventListener("change", function
|
|||
document.querySelectorAll(".bulk-migrate-vm:not(:disabled)").forEach(function (box) {
|
||||
box.checked = (box.dataset.tags || "").split(" ").includes(tag);
|
||||
});
|
||||
event.target.value = ""; // back to its title: the same tag can be chosen again after other ticks
|
||||
}
|
||||
});
|
||||
document.addEventListener("change", function (event) {
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ document.querySelectorAll("select[data-tags]").forEach(function (select) {
|
|||
render: {
|
||||
// the page's own words (data-add): the library's are English
|
||||
option_create: function (data, escape) {
|
||||
return '<div class="create">' + escape(select.dataset.add.replace("%(tag)s", data.input)) + "</div>";
|
||||
return '<div class="create">' + escape(select.dataset.add.replace("%(tag)s", data.input.toLowerCase())) + "</div>";
|
||||
},
|
||||
no_results: null,
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue