Skip to content

Commit

Permalink
Highlight outbound packets
Browse files Browse the repository at this point in the history
  • Loading branch information
mskvortsov committed Apr 10, 2024
1 parent 6b84167 commit f05d7fb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
3 changes: 3 additions & 0 deletions meshmon.css
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ body {
.packet-header-row {
background: #333333;
}
.packet-header-row-outbound {
background: #006215;
}
.decoded td {
text-align: left;
font-size: 80%;
Expand Down
11 changes: 8 additions & 3 deletions meshmon.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,15 @@ const dummyHeader = {
};

function render(se) {
var row = tbody.insertRow();
row.className = 'packet-header-row';
var headerRow = tbody.insertRow();
if (se.packet.rxRssi == 0) {
headerRow.className = 'packet-header-row-outbound';
} else {
headerRow.className = 'packet-header-row';
}

fields.forEach((field) => {
row.insertCell().innerHTML = se.header[field];
headerRow.insertCell().innerHTML = se.header[field];
});

var decodedText = '';
Expand Down

0 comments on commit f05d7fb

Please sign in to comment.