Round of storage (GB)

This commit is contained in:
Mario
2024-08-05 00:05:35 +02:00
parent 44a91358ff
commit eaf0c775ac
2 changed files with 1 additions and 1 deletions

View File

@@ -150,7 +150,7 @@ class VPSServer(models.Model):
self.name = f"{vm_name} ({hostname})" if hostname else vm_name self.name = f"{vm_name} ({hostname})" if hostname else vm_name
self.cpu = status_data.get('cpus', 0) self.cpu = status_data.get('cpus', 0)
self.ram = status_data.get('maxmem', 0) / (1024 * 1024 * 1024) # Convert to GB self.ram = status_data.get('maxmem', 0) / (1024 * 1024 * 1024) # Convert to GB
self.storage = status_data.get('maxdisk', 0) / (1024 * 1024 * 1024) # Convert to GB self.storage = round(status_data.get('maxdisk', 0) / (1024 * 1024 * 1024)) # Convert to GB
# Try to get IP addresses # Try to get IP addresses
ipv4_addresses = [] ipv4_addresses = []