gluon-status-page: determine mesh-protocol based on nodeinfo

This commit is contained in:
Christof Schulze 2018-01-06 00:54:01 +01:00
parent a485203b2e
commit 5892f399d3

View File

@ -77,14 +77,14 @@ function (Helper, SignalGraph, Signal) {
tdSignal.textContent = signal
tdInactive.textContent = Math.round(inactive / 1000) + " s"
}
if (d.routingMetrics.protocol == "batadv") {
if ("batman-adv" in nodeInfo.software) {
tdTQ.textContent = "TQ: " + Math.round(d.routingMetrics.tq / 2.55) + " %"
}
else if (d.routingMetrics.protocol == "babel") {
else if ("babeld" in nodeInfo.software) {
tdTQ.textContent = "Cost: " + Math.round(d.routingMetrics.cost / 653.53) + " %"
}
else {
tdTQ.textContent = "?PROTO? (" + d.routingMetrics.protocol + ")"
tdTQ.textContent = "Unable to extract routing protocol from nodeInfo"
}
if (infoSet)