fix vm
This commit is contained in:
@@ -114,12 +114,9 @@ def display_virtual_machines():
|
||||
table.add_column("Memory (GB)", justify="right", style="cyan")
|
||||
table.add_column("Storage", style="magenta")
|
||||
table.add_column("Type", style="green")
|
||||
table.add_column("Time on Duty", justify="right", style="magenta")
|
||||
|
||||
vms = fetch_all("virtual_machines")
|
||||
for vm in vms:
|
||||
# Convert time_on_duty to a human-readable format
|
||||
time_on_duty = calculate_time_on_duty_hours(vm[7]) # Ensure index 7 corresponds to time_on_duty
|
||||
table.add_row(
|
||||
f"{vm[0]}",
|
||||
vm[1],
|
||||
@@ -127,12 +124,12 @@ def display_virtual_machines():
|
||||
f"{vm[3]}",
|
||||
vm[4],
|
||||
vm[5],
|
||||
vm[6],
|
||||
time_on_duty
|
||||
vm[6]
|
||||
)
|
||||
|
||||
console.print(table)
|
||||
|
||||
|
||||
def display_kubernetes_nodes():
|
||||
config.load_incluster_config()
|
||||
v1 = client.CoreV1Api()
|
||||
|
||||
Reference in New Issue
Block a user