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
|
|
@ -31,8 +31,9 @@
|
|||
{% for tag in tags %}
|
||||
<tr data-search="{{ tag.name }}">
|
||||
<td>{% include 'common/tag_badge.html' with tag=tag.name %}</td>
|
||||
<td>{{ tag.vm_count }}</td>
|
||||
<td>{{ tag.host_count }}</td>
|
||||
{# the VM list or the Computes page, showing the tag's only #}
|
||||
<td>{% if tag.vm_count %}<a href="{% url 'instances:index' %}?tag={{ tag.name|urlencode }}">{{ tag.vm_count }}</a>{% else %}0{% endif %}</td>
|
||||
<td>{% if tag.host_count %}<a href="{% url 'computes' %}?tag={{ tag.name|urlencode }}">{{ tag.host_count }}</a>{% else %}0{% endif %}</td>
|
||||
<td class="text-end text-nowrap">
|
||||
<a class="btn btn-sm btn-outline-secondary" href="{% url 'admin:tag_update' tag.id %}">{% trans "Rename" %}</a>
|
||||
<a class="btn btn-sm btn-outline-danger" href="{% url 'admin:tag_delete' tag.id %}">{% trans "Delete" %}</a>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue