Commit a84deeb4 authored by Janis Streib's avatar Janis Streib 🦉

FIX: usage sorting in bcd list was broken, if bcd had no subnets

parent 90b1aaaa
Pipeline #130097 passed with stages
in 4 minutes and 57 seconds
......@@ -183,6 +183,17 @@ export default {
}
},
sortBCDOverview(a, b, key) {
if (key === 'usage' || key === 'adresses') {
if (!(a.name in this.bcd2subnets) && b.name in this.bcd2subnets) {
return -1
}
if ((a.name in this.bcd2subnets) && !(b.name in this.bcd2subnets)) {
return 1
}
if (!(a.name in this.bcd2subnets) && !(b.name in this.bcd2subnets)) {
return 0
}
}
if (key === 'usage') {
let usage_a = 0
let usage_b = 0
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment