From f17a3d2786ca4450c9c59b249cf6cbea7880fe75 Mon Sep 17 00:00:00 2001 From: madeofstown Date: Sun, 23 Feb 2025 13:33:43 -0800 Subject: [PATCH 01/12] ok, it's a little more than just a fix --- .gitignore | 2 ++ meshview/store.py | 3 ++ meshview/templates/chat.html | 7 ++-- meshview/templates/chat_packet.html | 8 ++--- meshview/templates/node.html | 53 ++++++++++++++++++++++++----- meshview/templates/node_graphs.html | 9 +++-- meshview/web.py | 2 +- 7 files changed, 64 insertions(+), 20 deletions(-) diff --git a/.gitignore b/.gitignore index c946735..6a77d3e 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ __pycache__/* meshview/__pycache__/* packets.db /table_details.py +config.ini +screenshots/* diff --git a/meshview/store.py b/meshview/store.py index 3ff6118..11ac260 100644 --- a/meshview/store.py +++ b/meshview/store.py @@ -308,6 +308,9 @@ async def get_mqtt_neighbors(since): # get_mqtt_neighbors_longfast # # p.r. +# TODO # combine the duplicated funtions back to the original 3 by letting them take a second variable to specify channel name. +# The default value for channel (none) should cause these functioins to operate the same as they did before they were channel specific. +# This change will make adding new channel specific graphs much easier in the future. # # Get Traceroute for LongFast only async def get_traceroutes_longfast(since): diff --git a/meshview/templates/chat.html b/meshview/templates/chat.html index 821f601..09eebd8 100644 --- a/meshview/templates/chat.html +++ b/meshview/templates/chat.html @@ -5,15 +5,16 @@ min-width:10em; } .chat-packet:nth-of-type(odd){ - background-color: #3a3a3a; /* Lighter than #2a2a2a */ + background-color: #272b2f; /* Lighter than #2a2a2a */ } .chat-packet { - border-bottom: 1px solid #555; + border: 1px solid #474b4e; padding: 8px; + margin-bottom: 4px; border-radius: 8px; /* Adjust the value to make the corners more or less rounded */ } .chat-packet:nth-of-type(even){ - background-color: #333333; /* Slightly lighter than the previous #181818 */ + background-color: #212529; /* Slightly lighter than the previous #181818 */ } {% endblock %} diff --git a/meshview/templates/chat_packet.html b/meshview/templates/chat_packet.html index 9a6d833..8352215 100644 --- a/meshview/templates/chat_packet.html +++ b/meshview/templates/chat_packet.html @@ -1,6 +1,6 @@
- {{packet.import_time.strftime('%-I:%M:%S %p - %d-%m-%Y')}} - ✉️ {{packet.from_node.channel}} - {{packet.from_node.long_name or (packet.from_node_id | node_id_to_hex) }} - {{packet.payload}} + ✉️ {{packet.from_node.channel}}
{{packet.import_time.strftime('%-I:%M:%S %p - %d-%m-%Y')}}
+ + {{packet.from_node.long_name or (packet.from_node_id | node_id_to_hex) }} + {{packet.payload}}
\ No newline at end of file diff --git a/meshview/templates/node.html b/meshview/templates/node.html index 2bf8c57..7104d95 100644 --- a/meshview/templates/node.html +++ b/meshview/templates/node.html @@ -16,6 +16,7 @@ div.tab-pane > dl { display: inline-block; } + {% endblock %} {% block body %} @@ -33,17 +34,27 @@
{% if node %} -
- {{node.long_name}} ({{node.node_id|node_id_to_hex}}) +
+ {{node.short_name}} +

{{node.long_name}}

-
ShortName
-
{{node.short_name}}
+ {% if trace %} +
+ {% endif %} +
NodeID
+
{{node.node_id|node_id_to_hex}}
+
Channel
+
{{node.channel}}
HW Model
{{node.hw_model}}
Role
{{node.role}}
+ {% if node.firmware %} +
Firmware
+
{{node.firmware}}
+ {% endif %}
{% include "node_graphs.html" %}
@@ -54,14 +65,11 @@ {% endif %}
-
-
-
- + {% include "buttons.html" %}
@@ -69,9 +77,36 @@
{% include 'packet_list.html' %}
- + + + {% if trace %}