more changes

This commit is contained in:
pablorevilla-meshtastic
2026-05-24 11:01:45 -07:00
parent 7cafefb59b
commit 2ecaaae2a9
+7 -2
View File
@@ -482,6 +482,11 @@ function formatAverageHopCount(value) {
return value - lower === 0.5 ? lower : Math.round(value);
}
function formatAverageHopCountWithActual(value) {
if (value === null || value === undefined || !Number.isFinite(value)) return "—";
return `${formatAverageHopCount(value)} (${value.toFixed(1)})`;
}
function reliabilityBucketFor(row) {
return reliabilityBuckets.find(bucket => bucket.matches(row)) || null;
}
@@ -561,7 +566,7 @@ function renderReliabilityMap(gatewayRows, nodesById) {
icon: reachMapIcon(`${Math.round(row.percent)}%`, bucket.color),
}).bindPopup(`
<b>${nodeLink(row.nodeId, nodesById)}</b><br>
Reliability: ${row.percent.toFixed(1)}% · Avg. hops ${formatAverageHopCount(row.avgHopCount)}<br>
Reliability: ${row.percent.toFixed(1)}% · Avg. hops ${formatAverageHopCountWithActual(row.avgHopCount)}<br>
Heard:
<button class="reach-heard-link" type="button" onclick="openGatewayPacketModal(${row.nodeId})">
${row.heardCount}
@@ -771,7 +776,7 @@ async function loadReachReport(nodeId = reachNodeId) {
</button>
<span class="text-secondary">(${reportResults.length})</span>
</td>
<td>${formatAverageHopCount(row.avgHopCount)}</td>
<td>${formatAverageHopCountWithActual(row.avgHopCount)}</td>
<td>${row.percent.toFixed(1)}%</td>
</tr>
`).join("")