Spaces:
Runtime error
Runtime error
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Transportation Dashboard</title> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.0.0/socket.io.js"></script> | |
| <script type="text/javascript"> | |
| var socket = io(); | |
| socket.on('update_data', function(data) { | |
| document.getElementById('vehicle-locations').innerHTML = JSON.stringify(data.locations); | |
| document.getElementById('routes').innerHTML = JSON.stringify(data.routes); | |
| document.getElementById('schedules').innerHTML = JSON.stringify(data.schedules); | |
| }); | |
| </script> | |
| </head> | |
| <body> | |
| <h1>Transportation Dashboard</h1> | |
| <div id="map">{{ map|safe }}</div> | |
| <h2>Vehicle Locations</h2> | |
| <div id="vehicle-locations">{{ locations }}</div> | |
| <h2>Optimized Routes</h2> | |
| <div id="routes">{{ routes }}</div> | |
| <h2>Optimized Schedules</h2> | |
| <div id="schedules">{{ schedules }}</div> | |
| </body> | |
| </html> |