From 5f5ae75d846ccd4f0a659c075f1466f551e2288e Mon Sep 17 00:00:00 2001 From: Pablo Revilla Date: Wed, 19 Nov 2025 11:18:34 -0800 Subject: [PATCH] Worked on /api/packet. Needed to modify - Added new api endpoint /api/packets_seen - Modified web.py and store.py to support changes to APIs. - Started to work on new_node.html and new_packet.html for presentation of data. --- meshview/templates/base.html | 31 +- meshview/templates/chat.html | 4 +- meshview/templates/firehose.html | 4 +- meshview/templates/map.html | 2 +- meshview/templates/new_node.html | 821 ++++++++++++++++++++++------- meshview/templates/new_packet.html | 70 ++- meshview/templates/nodelist.html | 2 +- meshview/templates/top.html | 2 +- 8 files changed, 667 insertions(+), 269 deletions(-) diff --git a/meshview/templates/base.html b/meshview/templates/base.html index 3dfdcdd..cbda0b9 100644 --- a/meshview/templates/base.html +++ b/meshview/templates/base.html @@ -35,37 +35,8 @@
- -
-
- - - {% for option in node_options %} - - {% endfor %} - - - - - - -
-
- +
{% block body %}{% endblock %}
diff --git a/meshview/templates/chat.html b/meshview/templates/chat.html index def7c92..2f0e167 100644 --- a/meshview/templates/chat.html +++ b/meshview/templates/chat.html @@ -118,8 +118,8 @@ document.addEventListener("DOMContentLoaded", async () => { div.innerHTML = ` ${formattedTimestamp} - ✉️ - ${escapeHtml(packet.channel || "")} + 🔎 + ${escapeHtml(packet.channel || "")} diff --git a/meshview/templates/firehose.html b/meshview/templates/firehose.html index efe87e0..b6e2b22 100644 --- a/meshview/templates/firehose.html +++ b/meshview/templates/firehose.html @@ -217,11 +217,11 @@ async function fetchUpdates() { const toNodeId = pkt.to_node_id; let from = fromNodeId === 4294967295 ? `All` : - `${nodeMap[fromNodeId] || fromNodeId}`; + `${nodeMap[fromNodeId] || fromNodeId}`; let to = toNodeId === 1 ? `direct to MQTT` : toNodeId === 4294967295 ? `All` : - `${nodeMap[toNodeId] || toNodeId}`; + `${nodeMap[toNodeId] || toNodeId}`; let links = ""; if (pkt.portnum === 3 && pkt.payload) { diff --git a/meshview/templates/map.html b/meshview/templates/map.html index 6d0566f..1497093 100644 --- a/meshview/templates/map.html +++ b/meshview/templates/map.html @@ -205,7 +205,7 @@ function renderNodesOnMap(){ marker.nodeId = node.key; marker.originalColor = color; markerById[node.key] = marker; - const popup = `${node.long_name} (${node.short_name})
+ const popup = `${node.long_name} (${node.short_name})
Channel: ${node.channel}
Model: ${node.hw_model}
Role: ${node.role}
diff --git a/meshview/templates/new_node.html b/meshview/templates/new_node.html index e950034..0426382 100644 --- a/meshview/templates/new_node.html +++ b/meshview/templates/new_node.html @@ -16,19 +16,26 @@ z-index: 1; } -/* --- Node Info --- */ +/* --- Node Info (3-column compact grid) --- */ .node-info { background-color: #1f2226; border: 1px solid #3a3f44; color: #ddd; - font-size: 0.9rem; - max-width: 400px; - padding: 8px 12px; - margin-bottom: 10px; + font-size: 0.88rem; + padding: 12px 14px; + margin-bottom: 14px; + border-radius: 8px; + + display: grid; + grid-template-columns: repeat(3, minmax(120px, 1fr)); + grid-column-gap: 14px; + grid-row-gap: 6px; } + .node-info div { - margin-bottom: 3px; + padding: 2px 0; } + .node-info strong { color: #9fd4ff; font-weight: 600; @@ -71,7 +78,7 @@ border-color: #888; } -/* --- Table --- */ +/* --- Packet Table --- */ .packet-table { width: 100%; border-collapse: collapse; @@ -91,11 +98,9 @@ .packet-table tr:nth-of-type(even) { background-color: #212529; } .port-tag { - display: inline-block; padding: 2px 6px; border-radius: 6px; font-size: 0.75rem; - font-weight: 500; color: #fff; } .port-1 { background-color: #007bff; } @@ -106,16 +111,16 @@ .port-67 { background-color: #17a2b8; } .port-70 { background-color: #ff7043; } .port-71 { background-color: #ff66cc; } -.port-0, .port-unknown { background-color: #6c757d; } +.port-0 { background-color: #6c757d; } .to-mqtt { font-style: italic; color: #aaa; } .payload-row { display: none; background-color: #1b1e22; } .payload-cell { padding: 8px 12px; font-family: monospace; white-space: pre-wrap; color: #b0bec5; border-top: none; } .packet-table tr.expanded + .payload-row { display: table-row; } -.toggle-btn { cursor: pointer; color: #aaa; margin-right: 6px; font-weight: bold; } +.toggle-btn { cursor: pointer; color: #aaa; margin-right: 6px; } .toggle-btn:hover { color: #fff; } -/* --- Chart modal --- */ +/* --- Chart Modal --- */ #chartModal { display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.9); z-index:9999; @@ -129,14 +134,23 @@ {% block body %}
-
📡 Node Feed:
- -
+
📡 Node Details:
+ + +
Node ID:
-
Channel:
-
HW Model:
+
Long Name:
+
Short Name:
+ +
Hardware Model:
+
Firmware:
Role:
+ +
Channel:
+
Latitude:
+
Longitude:
+
Last Update:
@@ -144,8 +158,9 @@
-
-
🔋 Battery & Voltage +
+
+ 🔋 Battery & Voltage
@@ -154,8 +169,9 @@
-
-
📶 Air & Channel Utilization +
+
+ 📶 Air & Channel Utilization
@@ -165,7 +181,8 @@