diff --git a/public/large-network.js b/public/large-network.js index 9303ebf..ff0cfd0 100644 --- a/public/large-network.js +++ b/public/large-network.js @@ -337,6 +337,7 @@ this.networkStatus.processed = report.totalProcessed this.networkStatus.rejected = report.totalRejected this.networkStatus.rejectedTps = report.rejectedTps + this.networkStatus.mode = report.mode this.networkStatus.active = Object.keys(G.nodes.active).length - crashedCount this.networkStatus.syncing = Object.keys(G.nodes.syncing).length this.networkStatus.joining = Object.keys(report.nodes.joining).length @@ -554,6 +555,18 @@ console.log(nodeId, node) } }, + getModeEmoji(networkMode){ + switch (networkMode) { + case 'forming': return ' 🟡' + case 'processing': return ' 🟢' + case 'safety': return ' ⚠️' + case 'recovery': return ' ♻️' + case 'restart': return ' 🔄' + case 'restore': return ' 🔵' + case 'shutdown': return ' 🔴' + default: return '' + } + }, changeNodesSize() { const nodeSize = this.getNodeSize(Object.keys(G.nodes.active).length) diff --git a/views/large-network.html b/views/large-network.html index 3246586..27a9b83 100644 --- a/views/large-network.html +++ b/views/large-network.html @@ -202,6 +202,10 @@ NETWORK + + Mode: + {{(networkStatus.mode ?? '') + getModeEmoji(networkStatus.mode)}} + Counter: {{networkStatus.counter}} @@ -357,4 +361,4 @@ - \ No newline at end of file +