mirror of
https://github.com/openwrt/luci.git
synced 2026-05-31 02:21:50 +08:00
luci-app-olsr: correctness fixes
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
This commit is contained in:
@@ -153,5 +153,7 @@ const olsrview = view.extend({
|
||||
|
||||
return L.Class.extend({
|
||||
olsrview: olsrview,
|
||||
etx_color: etx_color,
|
||||
snr_colors: snr_colors,
|
||||
|
||||
});
|
||||
+1
-1
@@ -25,7 +25,7 @@ return olsr.olsrview.extend({
|
||||
if (a.proto === b.proto) {
|
||||
return a.genmask < b.genmask;
|
||||
} else {
|
||||
return a.proto < b.proto;
|
||||
return a.proto < b.proto ? -1 : a.proto > b.proto ? 1 : 0;
|
||||
}
|
||||
}
|
||||
let modifiedData;
|
||||
|
||||
+2
-2
@@ -20,7 +20,7 @@ return olsr.olsrview.extend({
|
||||
if (a.proto === b.proto) {
|
||||
return a.linkCost < b.linkCost;
|
||||
} else {
|
||||
return a.proto < b.proto;
|
||||
return a.proto < b.proto ? -1 : a.proto > b.proto ? 1 : 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -171,7 +171,7 @@ return olsr.olsrview.extend({
|
||||
const rv = [];
|
||||
for (let link of neigh_res) {
|
||||
link.linkCost = (link.linkCost).toFixed(3) || 0;
|
||||
if (link.linkCost === 4194304) {
|
||||
if (link.linkCost == 4194304) {
|
||||
link.linkCost = 0;
|
||||
}
|
||||
const color = etx_color(link.linkCost);
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ return olsr.olsrview.extend({
|
||||
if (a.proto === b.proto) {
|
||||
return a.rtpMetricCost < b.rtpMetricCost;
|
||||
} else {
|
||||
return a.proto < b.proto;
|
||||
return a.proto < b.proto ? -1 : a.proto > b.proto ? 1 : 0;
|
||||
}
|
||||
}
|
||||
let modifiedData;
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ return olsr.olsrview.extend({
|
||||
if (a.proto === b.proto) {
|
||||
return a.tcEdgeCost < b.tcEdgeCost;
|
||||
} else {
|
||||
return a.proto < b.proto;
|
||||
return a.proto < b.proto ? -1 : a.proto > b.proto ? 1 : 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user