diff --git a/python/ambassador/diagnostics/envoy_stats.py b/python/ambassador/diagnostics/envoy_stats.py index 2d3ecbb209..4a8c954c85 100644 --- a/python/ambassador/diagnostics/envoy_stats.py +++ b/python/ambassador/diagnostics/envoy_stats.py @@ -130,9 +130,15 @@ def cluster_stats(self, name: str) -> Dict[str, Union[str, bool]]: elif pct < 90: color = "yellow" - cstat.update({"health": "%d%% healthy" % pct, "hmetric": int(pct), "hcolor": color}) + cstat.update({"health": "%d%% healthy" % pct, "hmetric": str(pct), "hcolor": color}) else: - cstat.update({"health": "no requests yet", "hmetric": "waiting", "hcolor": "grey"}) + cstat.update( + { + "health": "Unknown health: no requests yet", + "hmetric": "waiting", + "hcolor": "grey", + } + ) return cstat diff --git a/python/templates/diag.html b/python/templates/diag.html index b1cbeb3cfb..d35396f134 100644 --- a/python/templates/diag.html +++ b/python/templates/diag.html @@ -166,7 +166,6 @@

DEBUG MODE



{% if cluster_stats[cluster.name].valid %} - {{ 'Unknown health: ' if cluster._hmetric is not number }} {{ cluster._health }} {% else %} Unknown health: {{ cluster_stats[cluster.name].reason }}