Skip to content

Commit

Permalink
Merge pull request #210 from fifieldt/add-connection-info
Browse files Browse the repository at this point in the history
Add Connection info to Nodes Table
  • Loading branch information
thebentern authored Jun 15, 2024
2 parents 37ff9cb + cbb3b63 commit 258b972
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/pages/Nodes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export const NodesPage = (): JSX.Element => {
{ title: "MAC Address", type: "normal", sortable: true },
{ title: "Last Heard", type: "normal", sortable: true },
{ title: "SNR", type: "normal", sortable: true },
{ title: "Connection", type: "normal", sortable: true },
]}
rows={filteredNodes.map((node) => [
<Hashicon size={24} value={node.num.toString()} />,
Expand Down Expand Up @@ -55,6 +56,13 @@ export const NodesPage = (): JSX.Element => {
{Math.min(Math.max((node.snr + 10) * 5, 0), 100)}%/
{(node.snr + 10) * 5}raw
</Mono>,
<Mono>
{node.lastHeard != 0 ?
(node.viaMqtt === false && node.hopsAway === 0
? "Direct": node.hopsAway.toString() + " hops away")
: "-"}
{node.viaMqtt === true? ", via MQTT": ""}
</Mono>
])}
/>
</div>
Expand Down

0 comments on commit 258b972

Please sign in to comment.