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

fix(tags): third audit: host form and tag delete, hosts list badges

- A host's form saves the host and its tags in one transaction under the
  ownership lock: a tag the Tags page deletes meanwhile is made again,
  instead of a 500 after the host's other changes were saved.
- The hosts list shows three tags and "…" for the others, as the VM list.
- "…" shows the other tags on any page, the tag filter or not.
This commit is contained in:
catborise 2026-11-18 23:50:43 +03:00
parent 7810fb39fe
commit 6cdaa2affd
4 changed files with 46 additions and 22 deletions

View file

@ -82,7 +82,7 @@
</div>
<div class="small text-body-secondary font-monospace mt-1">{{ compute.hostname }}</div>
{% if compute.details %}<div class="small text-body-secondary">{{ compute.details }}</div>{% endif %}
{% with tags=compute.tags.all %}{% if tags %}<div class="mt-1">{% include 'common/tag_badges.html' with filter=True %}</div>{% endif %}{% endwith %}
{% with tags=compute.tags.all %}{% if tags %}<div class="mt-1">{% include 'common/tag_badges.html' with tags=tags|slice:":3" more=tags|slice:"3:" filter=True %}</div>{% endif %}{% endwith %}
{% if compute.status is not True %}
<div class="small text-danger">{{ compute.connection_error }}</div>
{% endif %}