1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-12-02 17:06:09 +00:00
webvirtcloud/admin/templates/admin/tombstone_list.html
catborise 981ff7b294 fix: a backup's files say so on the pool page; Removed VMs names schedules and backups
On a backup target's pool every backup file was "Not used on this host" and
listed with the unused volumes, though its deletion there is refused: it is
deleted with its backup. The column now says "Backup of <VM>" and counts it
as in use. A VM kept on the Removed VMs page for its schedules or backups
alone showed no owner and no reason; its row now names its schedules and
counts its backups.
2026-11-20 09:03:52 +03:00

65 lines
4 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{% extends "base.html" %}
{% load i18n %}
{% load static %}
{% load bootstrap_icons %}
{% block title %}{% trans "Removed VMs" %}{% endblock %}
{% block page_heading %}{% trans "Removed VMs" %}{% endblock page_heading %}
{% block content %}
<p class="text-body-secondary">{% trans "VMs that vanished from their compute. Their owners, tags, protection and schedules come back if the same UUID shows up again before the record expires; their backups come back with them." %}</p>
{% if not tombstones %}
<div class="alert alert-info shadow-sm">
{% bs_icon 'info-circle' %} {% trans "No removed VMs" %}
</div>
{% else %}
<div class="card mb-3">
<div class="card-header d-flex flex-wrap align-items-center gap-2">
<span class="me-auto">{% trans "Removed VMs" %} <span class="badge text-bg-light border">{{ tombstones|length }}</span></span>
<input id="filter" class="form-control form-control-sm w-auto" type="search" placeholder="{% trans "Search" %}" aria-label="{% trans "Search removed VMs" %}">
</div>
<div class="list-group list-group-flush searchable">
{% for tombstone in tombstones %}
<div class="list-group-item py-3" data-search="{{ tombstone.name }} {{ tombstone.uuid }} {{ tombstone.host }} {{ tombstone.owner_names|join:' ' }} {{ tombstone.tags|join:' ' }}">
<div class="row g-2 align-items-center">
<div class="col-12 col-md-4">
<span class="fw-semibold text-break">{{ tombstone.name }}</span>
{% if tombstone.is_template %}<span class="badge text-bg-light border">{% trans "Template" %}</span>{% endif %}
{% if tombstone.protected %}<span class="badge text-bg-light border">{% trans "Protected" %}</span>{% endif %}
{% include 'common/tag_badges.html' with tags=tombstone.tags %}
<div class="font-monospace small text-body-secondary text-break mt-1">{{ tombstone.uuid }}</div>
</div>
<div class="col-12 col-md-5 small">
<div>
{% trans "Left" %} <span class="fw-semibold">{{ tombstone.host }}</span>
<span class="text-body-secondary">· {% trans "Owners" %}:</span> {{ tombstone.owner_names|join:", "|default:"–" }}
</div>
{% if tombstone.policy_names or tombstone.backup_count %}
<div class="mt-1">
{% if tombstone.policy_names %}<span class="text-body-secondary">{% trans "Schedules" %}:</span> {{ tombstone.policy_names|join:", " }}{% endif %}
{% if tombstone.backup_count %}{% if tombstone.policy_names %} · {% endif %}{% blocktrans count counter=tombstone.backup_count %}{{ counter }} backup{% plural %}{{ counter }} backups{% endblocktrans %}{% endif %}
</div>
{% endif %}
<div class="text-body-secondary mt-1">
{% trans "Removed" %} <span class="text-nowrap">{{ tombstone.removed|date:"Y-m-d H:i" }}</span>
· {% trans "expires" %} <span class="text-nowrap">{{ tombstone.expires|date:"Y-m-d H:i" }}</span>
</div>
</div>
<div class="col-12 col-md-3 text-md-end">
<a class="btn btn-sm btn-outline-danger" href="{% url 'admin:tombstone_delete' tombstone.id %}">{% trans "Delete" %}</a>
</div>
</div>
</div>
{% endfor %}
</div>
<div role="status">
<div id="no-match" class="text-center text-body-secondary py-3" hidden>{% trans "No removed VM matches the search." %}</div>
</div>
</div>
{% endif %}
{% endblock content %}
{% block script %}
{% if tombstones %}<script src="{% static 'js/table_filter.js' %}"></script>{% endif %}
{% endblock script %}