diff --git a/deploy-board/deploy_board/templates/groups/health_check_activities.tmpl b/deploy-board/deploy_board/templates/groups/health_check_activities.tmpl index 092cbf39b9..8f42150567 100644 --- a/deploy-board/deploy_board/templates/groups/health_check_activities.tmpl +++ b/deploy-board/deploy_board/templates/groups/health_check_activities.tmpl @@ -14,7 +14,7 @@ Details {% for health_check in health_checks %} - + {{ health_check.start_time | convertTimestamp }} @@ -44,7 +44,13 @@ STATE SUCCEEDED {% elif health_check.status == "QUALIFIED" %} QUALIFIED (pending termination) - {% elif health_check.status == "TELETRAAN_STOP_REQUESTED" and health_check.state == "COMPLETED" %} + {% elif health_check.error_message and health_check.host_terminated == 1 %} + FAILED (terminated) + {% elif health_check.error_message and health_check.status == "TELETRAAN_STOP_REQUESTED" %} + FAILED (terminating) + {% elif health_check.error_message %} + FAILED (pending termination) + {% elif health_check.status == "TELETRAAN_STOP_REQUESTED" and health_check.host_terminated == 1 %} QUALIFIED (terminated) {% elif health_check.status == "TELETRAAN_STOP_REQUESTED" %} QUALIFIED (terminating) diff --git a/deploy-board/deploy_board/templates/groups/health_check_details.html b/deploy-board/deploy_board/templates/groups/health_check_details.html index 22ef73fdde..acf887b6bd 100644 --- a/deploy-board/deploy_board/templates/groups/health_check_details.html +++ b/deploy-board/deploy_board/templates/groups/health_check_details.html @@ -109,7 +109,13 @@

STATE SUCCEEDED {% elif health_check.status == "QUALIFIED" %} QUALIFIED (pending termination) - {% elif health_check.status == "TELETRAAN_STOP_REQUESTED" and health_check.state == "COMPLETED" %} + {% elif health_check.error_message and health_check.host_terminated == 1 %} + FAILED (terminated) + {% elif health_check.error_message and health_check.status == "TELETRAAN_STOP_REQUESTED" %} + FAILED (terminating) + {% elif health_check.error_message %} + FAILED (pending termination) + {% elif health_check.status == "TELETRAAN_STOP_REQUESTED" and health_check.host_terminated == 1 %} QUALIFIED (terminated) {% elif health_check.status == "TELETRAAN_STOP_REQUESTED" %} QUALIFIED (terminating) diff --git a/deploy-board/deploy_board/webapp/templatetags/utils.py b/deploy-board/deploy_board/webapp/templatetags/utils.py index 7ed26a2a28..e0be1e0eff 100644 --- a/deploy-board/deploy_board/webapp/templatetags/utils.py +++ b/deploy-board/deploy_board/webapp/templatetags/utils.py @@ -905,13 +905,11 @@ def genImageInfo(value): @register.filter("healthCheckStatusClass") -def healthCheckStatusClass(status): - if status == "FAILED": +def healthCheckStatusClass(error_message): + if error_message: return "danger" - elif status == "TELETRAAN_STOP_REQUESTED": - return "success" else: - return "" + return "success" @register.filter("healthCheckStatusIcon")