mirror of
https://github.com/Kpa-clawbot/meshcore-analyzer.git
synced 2026-08-14 08:29:46 +00:00
Show prefix subpath on separate line below friendly names
This commit is contained in:
+3
-5
@@ -786,13 +786,11 @@
|
||||
const hops = s.path.split(' → ');
|
||||
const rawHops = s.rawHops || [];
|
||||
const hasSelfLoop = hops.some((h, j) => j > 0 && h === hops[j - 1]);
|
||||
const routeDisplay = hops.map((h, j) => {
|
||||
const prefix = rawHops[j] || '';
|
||||
return `<span title="${esc(prefix)}">${esc(h)} <span class="hop-prefix">[${esc(prefix)}]</span></span>`;
|
||||
}).join(' → ');
|
||||
const routeDisplay = hops.map(h => esc(h)).join(' → ');
|
||||
const prefixDisplay = rawHops.join(' → ');
|
||||
return `<tr${hasSelfLoop ? ' class="subpath-selfloop"' : ''}>
|
||||
<td>${i + 1}</td>
|
||||
<td class="mono" style="white-space:nowrap">${routeDisplay}${hasSelfLoop ? ' <span title="Contains self-loop — likely 1-byte prefix collision" style="cursor:help">🔄</span>' : ''}</td>
|
||||
<td style="white-space:nowrap">${routeDisplay}${hasSelfLoop ? ' <span title="Contains self-loop — likely 1-byte prefix collision" style="cursor:help">🔄</span>' : ''}<br><span class="hop-prefix mono">${esc(prefixDisplay)}</span></td>
|
||||
<td>${s.count.toLocaleString()}</td>
|
||||
<td>${s.pct}%</td>
|
||||
<td><div style="background:${hasSelfLoop ? '#f59e0b' : 'var(--accent,#3b82f6)'};height:14px;border-radius:3px;width:${barW}%;opacity:0.7"></div></td>
|
||||
|
||||
Reference in New Issue
Block a user