Set maintenance colour in cluster detail

This commit is contained in:
Joshua Boniface 2023-02-22 18:20:18 -05:00
parent 45ad3b9a17
commit a49f3810d3
1 changed files with 3 additions and 1 deletions

View File

@ -585,7 +585,9 @@ def cluster_detail():
volumes = "N/A"
snapshots = "N/A"
else:
if cluster_details["data"]["cluster_health"]["health"] > 90:
if cluster_details["data"]["maintenance"] == "true":
health_colour = ansiprint.blue()
elif cluster_details["data"]["cluster_health"]["health"] > 90:
health_colour = ansiprint.green()
elif cluster_details["data"]["cluster_health"]["health"] > 50:
health_colour = ansiprint.yellow()