mirror of https://github.com/aredn/aredn.git
Improve display of blocked neighbors (#1709)
This commit is contained in:
parent
d32ad316b6
commit
91fe800447
|
@ -139,6 +139,17 @@
|
|||
else {
|
||||
push(nlist, { name: (tracker && tracker.hostname) || `|${link.remoteIP}`, tracker: tracker, link: link });
|
||||
}
|
||||
delete trackers[link.remoteIP];
|
||||
}
|
||||
for (let remoteIP in trackers)
|
||||
{
|
||||
const tracker = trackers[remoteIP];
|
||||
if (tracker.type == "DtD" && tracker.distance < 100) {
|
||||
push(llist, { name: tracker.hostname || `|${remoteIP}`, tracker: tracker, link: null });
|
||||
}
|
||||
else {
|
||||
push(nlist, { name: tracker.hostname || `|${remoteIP}`, tracker: tracker, link: null });
|
||||
}
|
||||
}
|
||||
if (length(llist) > 0) {
|
||||
sort(llist, (a, b) => a.name == b.name ? 0 : a.name < b.name ? -1 : 1);
|
||||
|
@ -153,8 +164,8 @@
|
|||
else {
|
||||
print(`<div class="ctrl cols status unknown" title="Link status: unknown">`);
|
||||
}
|
||||
const lq = link.lossMultiplier ? (min(100, int(100 * link.linkQuality * 65536 / link.lossMultiplier)) + "%") : "-";
|
||||
const nlq = link.lossMultiplier ? (min(100, int(100 * link.neighborLinkQuality * 65536 / link.lossMultiplier)) + "%") : "-";
|
||||
const lq = link && link.lossMultiplier ? (min(100, int(100 * link.linkQuality * 65536 / link.lossMultiplier)) + "%") : "-";
|
||||
const nlq = link && link.lossMultiplier ? (min(100, int(100 * link.neighborLinkQuality * 65536 / link.lossMultiplier)) + "%") : "-";
|
||||
if (substr(entry.name, 0, 1) !== "|") {
|
||||
print(`<div class='h'><a onclick="event.stopPropagation()" href='http://${entry.name}.local.mesh'>${entry.name}</a></div>`);
|
||||
}
|
||||
|
@ -195,8 +206,8 @@
|
|||
else {
|
||||
print(`<div class="ctrl cols status unknown" title="Link status: unknown">`);
|
||||
}
|
||||
const lq = link.lossMultiplier ? (min(100, int(100 * link.linkQuality * 65536 / link.lossMultiplier)) + "%") : "-";
|
||||
const nlq = link.lossMultiplier ? (min(100, int(100 * link.neighborLinkQuality * 65536 / link.lossMultiplier)) + "%") : "-";
|
||||
const lq = link && link.lossMultiplier ? (min(100, int(100 * link.linkQuality * 65536 / link.lossMultiplier)) + "%") : "-";
|
||||
const nlq = link && link.lossMultiplier ? (min(100, int(100 * link.neighborLinkQuality * 65536 / link.lossMultiplier)) + "%") : "-";
|
||||
let icon = "";
|
||||
let title = "";
|
||||
switch (tracker && tracker.type || "Unknown") {
|
||||
|
|
Loading…
Reference in New Issue