mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-11 12:46:49 +00:00
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.
This commit is contained in:
parent
71db69b294
commit
4ae3fb2d53
7 changed files with 157 additions and 0 deletions
|
|
@ -319,6 +319,9 @@ class InstanceTombstone(models.Model):
|
|||
owners = models.JSONField(default=list) # [{"user": id, "is_change": .., "is_delete": .., "is_vnc": ..}]
|
||||
removed = models.DateTimeField(auto_now_add=True)
|
||||
|
||||
def __str__(self):
|
||||
return "%s (%s)" % (self.name, self.uuid)
|
||||
|
||||
|
||||
class PermissionSet(models.Model):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue