mirror of
https://github.com/retspen/webvirtcloud
synced 2026-12-03 17:36:05 +00:00
feat(ui): what a job, a tag or a backup names links to its page
- A job's page and the Jobs list link what the job works on: a VM's page for who may see the VM (not when a copy on another host has its UUID); a host's, a backup target's, or the Computes page for a bulk migration, for a superuser (operations.views.link_resources). A backup's or a pool's job has none: a restore names the new VM, and a pool may be gone. - The Tags page's VM and host counts open the VM list or the Computes page with that tag only: a list with that tag takes ?tag=name, and the address loses it (the rest stays), so the list's own reload keeps what is chosen afterwards. The bulk bar sends back to the list's path. - A Backups row links its target, and a removed VM's badge the Removed VMs page while the VM is listed there.
This commit is contained in:
parent
fb81e7adca
commit
2373d73b37
14 changed files with 154 additions and 12 deletions
|
|
@ -191,6 +191,19 @@ if (typeof module !== "undefined") {
|
|||
if (!tagPills) {
|
||||
keep("", key + "_tag"); // no row has a tag: none is kept to come back later
|
||||
}
|
||||
// a link may ask for one tag's rows (the Tags page: ?tag=name): only that tag then, on a
|
||||
// list that has it. The address loses it, so the list's own reload keeps what is chosen afterwards.
|
||||
var query = new URLSearchParams(window.location.search);
|
||||
if (query.has("tag") && chooseTag && chooseTag(query.get("tag"))) {
|
||||
search.value = "";
|
||||
keep("");
|
||||
if (chooseState) {
|
||||
chooseState("");
|
||||
}
|
||||
filterTable(document);
|
||||
query.delete("tag");
|
||||
history.replaceState(null, "", window.location.pathname + (query.size ? "?" + query : "") + window.location.hash);
|
||||
}
|
||||
document.addEventListener("click", function (event) {
|
||||
var more = event.target.closest("[data-show-tags]");
|
||||
if (more) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue