1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-09 11:46:49 +00:00
webvirtcloud/admin/templates/admin/tombstone_list.html
catborise 4ae3fb2d53 feat(admin): list and remove the owners kept for vanished VMs
A VM that disappears from its compute keeps its owners in a tombstone
until INSTANCE_OWNERSHIP_RETENTION_DAYS pass, but nothing showed them.
Superusers now see them on the "Removed VMs" admin page (name, UUID,
owners, removed, expires) and can remove one, so a VM deleted on
purpose no longer hands its owners to a later VM with the same UUID.
2026-10-08 19:07:02 +03:00

63 lines
2.6 KiB
HTML

{% extends "base.html" %}
{% load i18n %}
{% load static %}
{% load bootstrap_icons %}
{% block title %}{% trans "Removed VMs" %}{% endblock %}
{% block content %}
<div class="row">
<div class="col-lg-12">
{% include 'search_block.html' %}
<h1 class="page-header">{% trans "Removed VMs" %}</h1>
<p class="text-muted">{% trans "VMs that vanished from their compute. Their owners come back if the same UUID shows up again before the record expires." %}</p>
</div>
</div>
<div class="row">
{% if not tombstones %}
<div class="col-lg-12">
<div class="alert alert-info shadow-sm">
{% bs_icon 'info-circle' %} {% trans "No removed VMs" %}
</div>
</div>
{% else %}
<div class="col-lg-12">
<table class="table table-striped table-hover">
<thead>
<tr>
<th span="col">{% trans "Name" %}</th>
<th span="col">{% trans "UUID" %}</th>
<th span="col">{% trans "Owners" %}</th>
<th span="col">{% trans "Removed" %}</th>
<th span="col">{% trans "Expires" %}</th>
<th span="col">{% trans "Actions" %}</th>
</tr>
</thead>
<tbody class="searchable">
{% for tombstone in tombstones %}
<tr>
<td>
<strong>{{ tombstone.name }}</strong>
{% if tombstone.is_template %}<span class="badge bg-secondary">{% trans "Template" %}</span>{% endif %}
</td>
<td>{{ tombstone.uuid }}</td>
<td>{{ tombstone.owner_names|join:", " }}</td>
<td>{{ tombstone.removed|date:"Y-m-d H:i" }}</td>
<td>{{ tombstone.expires|date:"Y-m-d H:i" }}</td>
<td>
<div class="float-end btn-group">
<a class="btn btn-danger" href="{% url 'admin:tombstone_delete' tombstone.id %}" title="{% trans "Delete" %}">
{% bs_icon 'x' %}
</a>
</div>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endif %}
</div>
{% endblock content %}
{% block script %}
<script src="{% static 'js/filter-table.js' %}"></script>
{% endblock script %}