Skip to content

tweak health script #87

Merged
merged 1 commit into from
Dec 23, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Workbench/scripts/gethealth.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
healthstatus = '<font color="grey">unknown</font>'
for line in pipe.stdout:
if ('(' in line):
healthstatus=line.split('(')[1].split(')')[0].strip()
if (healthstatus == "healthy"):
healthstatus=line.strip()
if ("healthy" in healthstatus):
healthstatus='<font color="green">' + healthstatus + '</font>'
elif (healthstatus == "unhealthy"):
elif ("unhealthy" in healthstatus):
healthstatus='<font color="red">' + healthstatus + '</font>'
else:
healthstatus='<font color="blue">' + healthstatus + '</font>'
Expand Down