This commit is contained in:
iFargle
2023-03-24 15:07:42 +09:00
parent 507f27ceaa
commit 86da72e4d1

View File

@@ -835,7 +835,6 @@ def render_routes():
<tbody>
"""
# Get exit route ID's for each node in the list:
# onclick="toggle_exit("""+exit_routes[0]+""", """+exit_routes[1]+""", '"""+machine["id"]+"""-exit', '"""+str(exit_route_enabled)+"""')
for node in exit_node_list:
node_exit_route_ids = []
exit_enabled = False
@@ -853,8 +852,8 @@ def render_routes():
if exit_available:
# Set up the display code:
enabled = "<a href='#'><i id='"+str(machine_id)+"-exit' onclick='toggle_exit("+node_exit_route_ids[0]+","+node_exit_route_ids[1]+", \"True\", \""+machine_id+"-exit\", \"routes\")' class='material-icons green-text text-lighten-2 tooltipped' data-tooltip='Click to disable'>fiber_manual_record</i></a>"
disabled = "<a href='#'><i id='"+str(machine_id)+"-exit' onclick='toggle_exit("+node_exit_route_ids[0]+","+node_exit_route_ids[1]+", \"False\", \""+machine_id+"-exit\", \"routes\")' class='material-icons red-text text-lighten-2 tooltipped' data-tooltip='Click to enable' >fiber_manual_record</i></a>"
enabled = "<a href='#'><i id='"+str(machine_id)+"-exit' onclick='toggle_exit("+node_exit_route_ids[0]+","+node_exit_route_ids[1]+", \""+machine_id+"-exit\", \"True\", \"routes\")' class='material-icons green-text text-lighten-2 tooltipped' data-tooltip='Click to disable'>fiber_manual_record</i></a>"
disabled = "<a href='#'><i id='"+str(machine_id)+"-exit' onclick='toggle_exit("+node_exit_route_ids[0]+","+node_exit_route_ids[1]+", \""+machine_id+"-exit\", \"False\", \"routes\")' class='material-icons red-text text-lighten-2 tooltipped' data-tooltip='Click to enable' >fiber_manual_record</i></a>"
# Set the displays:
enabled_display = enabled if exit_enabled else disabled