diff --git a/package-lock.json b/package-lock.json index 989a98d..1c3c0e2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@shardus/monitor-client", - "version": "2.5.9", + "version": "2.5.10", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@shardus/monitor-client", - "version": "2.5.9", + "version": "2.5.10", "license": "ISC", "dependencies": { "eslint": "8.43.0", diff --git a/package.json b/package.json index 4ea76e0..117a228 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,13 @@ { "name": "@shardus/monitor-client", - "version": "2.5.9", + "version": "2.5.10", "description": "", "main": "entry.js", "engines": { "node": "18.16.1" }, "scripts": { - "release": "np --any-branch --no-cleanup --no-tests --no-yarn", + "release": "np --any-branch --no-cleanup --no-tests --no-yarn --branch dev", "test": "echo \"Error: no test specified\" && exit 1", "compile": "tsc -p .", "prepare": "npm run compile", @@ -18,7 +18,7 @@ }, "repository": { "type": "git", - "url": "https://gitlab.com/shardus/enterprise/monitor-client.git" + "url": "git@github.com:shardeum/x-monitor-client.git" }, "publishConfig": { "access": "public" diff --git a/public/large-network.js b/public/large-network.js index 952b04e..fc456cf 100644 --- a/public/large-network.js +++ b/public/large-network.js @@ -1,4 +1,4 @@ -;(function main() { +; (function main() { const G = {} loadToken(G) G.VW = Math.max(document.documentElement.clientWidth, window.innerWidth || 0) @@ -39,15 +39,16 @@ rejectedTps: 0, netLoad: 0, load: 0, + totalLoad: 0, maxLoad: 0, queueLength: 0, + totalQueueLength: 0, queueTime: 0, + totalQueueTime: 0, expiredTx: 0, }, colorMode: 'state', - shouldShowMaxTps: false, - shouldShowMaxLoad: false, animateTransactions: false, queueDetails: false, } @@ -214,13 +215,20 @@ let queueLength = [] let queueTime = [] + let totalLoad = 0 + let totalQueueLength = 0 + let totalQueueTime = 0.0 + for (let nodeId in report.nodes.active) { const node = report.nodes.active[nodeId] + totalLoad += node.currentLoad.networkLoad loads.push(node.currentLoad.networkLoad) counters.push(node.cycleCounter) cycleMarkers.push(node.cycleMarker) desired.push(node.desiredNodes) + totalQueueLength += node.queueLength queueLength.push(node.queueLength) + totalQueueTime += node.txTimeInQueue queueTime.push(node.txTimeInQueue) } @@ -235,6 +243,7 @@ this.networkStatus.standby = Object.keys(report.nodes.standby).length this.networkStatus.load = this.average(loads) + this.networkStatus.totalLoad = totalLoad this.networkStatus.counter = this.mode(counters) this.networkStatus.cycleMarker = this.mode(cycleMarkers) this.networkStatus.desired = this.mode(desired) @@ -243,7 +252,9 @@ } this.expiredTx = report.totalExpired this.networkStatus.queueLength = this.average(queueLength) + this.networkStatus.totalQueueLength = totalQueueLength this.networkStatus.queueTime = this.average(queueTime) + this.networkStatus.totalQueueTime = totalQueueTime }, deleteCrashedNodes(nodes) { console.log('Running delete crash nodes', nodes) @@ -325,8 +336,7 @@ try { let changes = await this.fetchChanges() console.log( - `Total of ${Object.keys(changes.nodes.active).length}/${ - Object.keys(G.nodes.active).length + `Total of ${Object.keys(changes.nodes.active).length}/${Object.keys(G.nodes.active).length } nodes updated.` ) this.filterOutCrashedNodes(changes) diff --git a/views/large-network.html b/views/large-network.html index 21ed9b7..9f20d6b 100644 --- a/views/large-network.html +++ b/views/large-network.html @@ -1,203 +1,244 @@ - - - - - - - - - + #montable { + font-family: sans-serif; + font-size: small; + font-weight: 300; + text-align: left; + background-color: #f3f4f6; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); + border-collapse: collapse; + flex-shrink: 0; + } - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
CounterJoiningStandbySyncingActiveDesired - Max Tps - Avg Tps - ProcessedRejectedRejected TPS - Max Load - Load -
{{ networkStatus.counter }}{{ networkStatus.joining - networkStatus.standby }}{{ networkStatus.standby }}{{ networkStatus.syncing }}{{ networkStatus.active }}{{ networkStatus.desired }} - {{ networkStatus.maxTps }} - {{ networkStatus.tps }} - {{ networkStatus.processed }}{{ networkStatus.rejected }}{{ networkStatus.rejectedTps }} - {{ networkStatus.maxLoad ? networkStatus.maxLoad.toFixed(2) : 0.0 - }} - {{ networkStatus.load ? networkStatus.load.toFixed(2) : 0.0 - }} -
-
+ #monheader { + text-align: left; + font-weight: bold; + vertical-align: middle; + } -
- - - - - - - - - - - -
Exp.TxQ.TimeQ.Length
{{ networkStatus.expiredTx }}{{ networkStatus.queueTime.toFixed(2) }}{{ networkStatus.queueLength.toFixed(2) }}
-
-
-
-
- Monitor-server version: x.x.x -
- Monitor-client version:  x.x.x -
-
-
- -
- -
- - - -
-
-
+ #monlabel { + vertical-align: middle; + text-align: left; + } + + #monval { + vertical-align: top; + text-align: right; + } + + #itemrow { + vertical-align: top; + border: 0px solid #000000; + } + + tr>td { + padding: 5px; + } + + -
-
- - -
-
- - -
- Charts - Sync History - Node History - Monitor Logs - Monitor Events - App Versions -
-
+ +
+
+ + + + + + + + + + + + + + + + + + + +
MONITOR TOOL
Server: vx.x.x
Client vx.x.x
Animate:
Color: + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NETWORK
Counter:{{networkStatus.counter}}
Joining:{{networkStatus.joining - networkStatus.standby}}
Standby:{{networkStatus.standby}}
Syncing:{{networkStatus.syncing}}
Active:{{networkStatus.active}}
Desired:{{networkStatus.desired}}
+ + + + + + + + + + + + + + + + +
TXN
Proc:{{ networkStatus.processed }}
Rej:{{ networkStatus.rejected }}
Exp:{{ networkStatus.expiredTx }}
+ + + + + + + + + + + + + + + + +
TPS
Cur:{{networkStatus.tps}}
Max:{{networkStatus.maxTps}}
Rej:{{networkStatus.rejectedTps}}
+ + + + + + + + + + + + + + + + +
LOAD
Total:{{ networkStatus.totalLoad ? networkStatus.totalLoad.toFixed(2) : 0}}
Curr:{{ networkStatus.load ? networkStatus.load.toFixed(2) : 0}}
Max:{{ networkStatus.maxLoad ? networkStatus.maxLoad.toFixed(2) : 0}}
+ + + + + + + + + + + + + + + + + + + + +
QUEUE
QLen:{{ networkStatus.queueLength.toFixed(2) }}
QLen.Tot:{{ networkStatus.totalQueueLength.toFixed(2) }}
Q-Time:{{ networkStatus.queueTime.toFixed(2) }}
Q-Time.Tot:{{ networkStatus.totalQueueTime.toFixed(2) }}
+ + + + + + + + + + + + + + + + + + + + + + +
LINKS
Charts
Sync History
Node History
Monitor Logs
Monitor Events
App Versions
+
+ +
+
+ + + + + + + - - - - - - + \ No newline at end of file