diff --git a/public/templates.js b/public/templates.js index f319754bbdfff202b76413d940971a82b51e5dce..73d7ca425f4324100d4d6ae8a167f01d93fb4759 100644 --- a/public/templates.js +++ b/public/templates.js @@ -533,7 +533,7 @@ var buf = []; var jade_mixins = {}; var jade_interp; -buf.push("<div class=\"container\"><div class=\"row\"><div class=\"col s12\"><div class=\"card\"><div class=\"card-action\"><div ng-if=\"searching\" class=\"center\"><div class=\"preloader-wrapper active\"><div class=\"spinner-layer spinner-blue-only\"><div class=\"circle-clipper left\"><div class=\"circle\"></div></div></div></div></div><h5 translate=\"home.tabs.connections.title.connections\"></h5><table class=\"bordered connections\"><thead><tr><th>Pubkey</th><th>WS2PID</th><th>Member</th><th>Type</th><th>Connection</th></tr></thead><tbody><tr ng-repeat=\"peer in info.connections.level1 track by $index\" ng-class=\"{ privileged: peer.privileged, prefered: peer.prefered }\"><td>{{ peer.pubkey.slice(0, 20) }}</td><td>{{ peer.ws2pid }}</td><td>{{ peer.uid }}</td><td>OUTCOMING</td><td>{{ peer.handle }}</td></tr><tr ng-repeat=\"peer in info.connections.level2 track by $index\" ng-class=\"{ privileged: peer.privileged, prefered: peer.prefered }\"><td>{{ peer.pubkey.slice(0, 20) }}</td><td>{{ peer.uid }}</td><td>INCOMING</td><td>{{ peer.handle }}</td></tr></tbody></table><div class=\"legend\"><h5 translate=\"home.tabs.connections.legend.title\"></h5><span translate=\"home.tabs.connections.legend.prefered\" class=\"prefered\"></span><span translate=\"home.tabs.connections.legend.privileged\" class=\"privileged\"></span></div><h5 translate=\"home.tabs.connections.title.network\"></h5><table class=\"bordered connections\"><thead><tr><th>API</th><th>Pubkey</th><th>WS2PID</th><th>Member</th><th>Step</th><th>HEAD</th><th>Software</th><th>Prefix</th><th>Free Rooms</th></tr></thead><tbody><tr ng-repeat=\"head in heads | orderBy:'-blockstamp' track by $index \"><td>{{ head.api }}</td><td>{{ head.pubkey.slice(0, 20) }}</td><td>{{ head.ws2pId }}</td><td>{{ head.uid }}</td><td>{{ head.step }}</td><td>{{ head.blockstamp.slice(0, 25) }}</td><td>{{ head.software }} {{ head.softVersion }}</td><td>{{ head.prefix }}</td><td>{{ head.freeRooms }}</td></tr></tbody></table></div></div></div></div></div>");;return buf.join(""); +buf.push("<div class=\"container\"><div class=\"row\"><div class=\"col s12\"><div class=\"card\"><div class=\"card-action\"><div ng-if=\"searching\" class=\"center\"><div class=\"preloader-wrapper active\"><div class=\"spinner-layer spinner-blue-only\"><div class=\"circle-clipper left\"><div class=\"circle\"></div></div></div></div></div><h5 translate=\"home.tabs.connections.title.connections\"></h5><table class=\"bordered connections\"><thead><tr><th>Pubkey</th><th>WS2PID</th><th>Member</th><th>Type</th><th>Connection</th></tr></thead><tbody><tr ng-repeat=\"peer in info.connections.level1 track by $index\" ng-class=\"{ privileged: peer.privileged, prefered: peer.prefered }\"><td>{{ peer.pubkey.slice(0, 20) }}</td><td>{{ peer.ws2pid }}</td><td>{{ peer.uid }}</td><td>OUTCOMING</td><td>{{ peer.handle }}</td></tr><tr ng-repeat=\"peer in info.connections.level2 track by $index\" ng-class=\"{ privileged: peer.privileged, prefered: peer.prefered }\"><td>{{ peer.pubkey.slice(0, 20) }}</td><td>{{ peer.ws2pid }}</td><td>{{ peer.uid }}</td><td>INCOMING</td><td>{{ peer.handle }}</td></tr></tbody></table><div class=\"legend\"><h5 translate=\"home.tabs.connections.legend.title\"></h5><span translate=\"home.tabs.connections.legend.prefered\" class=\"prefered\"></span><span translate=\"home.tabs.connections.legend.privileged\" class=\"privileged\"></span></div><h5 translate=\"home.tabs.connections.title.network\"></h5><table class=\"bordered connections\"><thead><tr><th>API</th><th>Pubkey</th><th>WS2PID</th><th>Member</th><th>Step</th><th>HEAD</th><th>Software</th><th>Prefix</th><th>Free Rooms</th></tr></thead><tbody><tr ng-repeat=\"head in heads | orderBy:'-blockstamp' track by $index \"><td>{{ head.api }}</td><td>{{ head.pubkey.slice(0, 20) }}</td><td>{{ head.ws2pId }}</td><td>{{ head.uid }}</td><td>{{ head.step }}</td><td>{{ head.blockstamp.slice(0, 25) }}</td><td>{{ head.software }} {{ head.softVersion }}</td><td>{{ head.prefix }}</td><td>{{ head.freeRooms }}</td></tr></tbody></table></div></div></div></div></div>");;return buf.join(""); }; if (typeof define === 'function' && define.amd) { define([], function() { diff --git a/server/controller/webmin.js b/server/controller/webmin.js index 233b6f7d521a17c8a86e6af0cfa621faeb8eaad3..b0b9013c14f2b45355a964110f6933e06a8cd799 100644 --- a/server/controller/webmin.js +++ b/server/controller/webmin.js @@ -657,10 +657,11 @@ function WebAdmin (duniterServer, startServices, stopServices, listDuniterUIPlug const headInfos = head.message.split(':') let posPubkey = 3; // Gestion des différents formats - if (head.message.match(/:2:/)) { + if (head.messageV2.match(/:2:/)) { //HEAD v2 head.freeRooms = headInfos[9] + "/" + headInfos[10] - } else if (head.message.match(/:1:/)) { + } + if (head.message.match(/:1:/)) { // HEAD V1 } else { // HEAD V0