diff --git a/README.md b/README.md index a296380..409418b 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ Samples of currently running instances: --- -## Preparing +## Installing Requires **`python3.11`** or above. @@ -295,8 +295,7 @@ sudo systemctl daemon-reload DB_FILE="/path/to/file/packets.db" -# Stopt DB service -#echo "Stop services..." +# Stop DB service sudo systemctl stop meshview-db.service sudo systemctl stop meshview-web.service @@ -312,7 +311,6 @@ VACUUM; EOF # Start DB service -#echo "Start services..." sudo systemctl start meshview-db.service sudo systemctl start meshview-web.service diff --git a/meshview/templates/packet_details.html b/meshview/templates/packet_details.html index 2bf4d31..0828cb0 100644 --- a/meshview/templates/packet_details.html +++ b/meshview/templates/packet_details.html @@ -41,7 +41,7 @@ markers.addTo(details_map); L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', { - maxZoom: 10, + maxZoom: 15, attribution: '© OpenStreetMap' }).addTo(details_map); diff --git a/meshview/web.py b/meshview/web.py index 0be33d4..de50f6b 100644 --- a/meshview/web.py +++ b/meshview/web.py @@ -977,19 +977,26 @@ async def graph_network(request): ranksep="1") for node_id in used_nodes: - node = await nodes[node_id] + node_future = nodes.get(node_id) + if not node_future: + # You could log a warning here if needed + continue + + node = await node_future color = '#000000' node_name = await get_node_name(node_id) + if node and node.role in ('ROUTER', 'ROUTER_CLIENT', 'REPEATER'): color = '#0000FF' elif node and node.role == 'CLIENT_MUTE': color = '#00FF00' + graph.add_node(pydot.Node( str(node_id), label=node_name, shape='box', color=color, - href=f"/graph/network?root={node_id}&depth={depth-1}", + href=f"/graph/network?root={node_id}&depth={depth - 1}", )) if edges: