Round of storage (GB)
This commit is contained in:
Binary file not shown.
@@ -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 = []
|
||||||
|
|||||||
Reference in New Issue
Block a user