Skip to content
Snippets Groups Projects
Commit fa01e0df authored by Cédric Moreau's avatar Cédric Moreau
Browse files

[enh] network: colorize prefered/privileged nodes in HEADs

parent 22ee8cf9
No related branches found
No related tags found
No related merge requests found
Pipeline #9016 passed
......@@ -49,6 +49,7 @@ module.exports = ($scope, Webmin, heads, info, conf, ws) => {
}
}
$scope.heads = Object.keys(headsMap).map(k => {
const pubkey = k.split('-')[0]
return {
pubkey: k,
api: headsMap[k].api,
......@@ -59,7 +60,9 @@ module.exports = ($scope, Webmin, heads, info, conf, ws) => {
softVersion: headsMap[k].softVersion,
prefix: headsMap[k].prefix,
freeRooms: headsMap[k].freeRooms,
step: headsMap[k].step
step: headsMap[k].step,
prefered: (conf.preferedNodes || []).indexOf(pubkey) !== -1,
privileged: (conf.privilegedNodes || []).indexOf(pubkey) !== -1
}
})
}
......
......@@ -48,7 +48,7 @@
th Prefix
th Free Rooms
tbody
tr(ng-repeat="head in heads | orderBy:'-blockstamp' track by $index ")
tr(ng-repeat="head in heads | orderBy:'-blockstamp' track by $index " ng-class="{ privileged: head.privileged, prefered: head.prefered }")
td {{ head.api }}
td {{ head.pubkey.slice(0, 20) }}
td {{ head.ws2pId }}
......
This diff is collapsed.
source diff could not be displayed: it is too large. Options to address this: view the blob.
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment