diff --git a/renderer.py b/renderer.py index 08b824d..8c6c48a 100644 --- a/renderer.py +++ b/renderer.py @@ -321,12 +321,11 @@ def thread_machine_content(machine, machine_content, idx, all_routes, failover_p # IF it isn't, add it. app.logger.info("New HA pair found: %s", str(route["prefix"])) failover_pair_prefixes.append(str(route["prefix"])) - else: + if route["enabled"] and route_info["enabled"]: # If it is already in the array. . . # Show as HA only if both routes are enabled: - if route["enabled"] and route_info["enabled"]: - app.logger.debug("Both routes are enabled. Setting as HA [%s] (%s) ", str(machine["name"]), str(route["prefix"])) - ha_enabled = True + app.logger.debug("Both routes are enabled. Setting as HA [%s] (%s) ", str(machine["name"]), str(route["prefix"])) + ha_enabled = True # If the route is an exit node and already counted as a failover route, it IS a failover route, so display it. if route["prefix"] != "0.0.0.0/0" and route["prefix"] != "::/0" and route["prefix"] in failover_pair_prefixes: route_enabled = "red"