@shardus/monitor-client
Advanced tools
Comparing version 2.8.0 to 2.8.1
{ | ||
"name": "@shardus/monitor-client", | ||
"version": "2.8.0", | ||
"version": "2.8.1", | ||
"description": "", | ||
@@ -15,5 +15,5 @@ "main": "entry.js", | ||
"pretest": "npm run compile", | ||
"lint": "eslint './public/**/*.ts'", | ||
"lint-windows": "eslint ./public/**/*.ts", | ||
"format-check": "prettier --check './public/**/*.ts'" | ||
"lint": "eslint \"./public/**/*.ts\"", | ||
"format-check": "prettier --check './public/**/*.ts'", | ||
"format-fix": "prettier --write './public/**/*.ts'" | ||
}, | ||
@@ -20,0 +20,0 @@ "repository": { |
@@ -340,2 +340,3 @@ ; (function main() { | ||
this.networkStatus.rejectedTps = report.rejectedTps | ||
this.networkStatus.mode = report.mode | ||
this.networkStatus.active = Object.keys(G.nodes.active).length - crashedCount | ||
@@ -558,2 +559,14 @@ this.networkStatus.syncing = Object.keys(G.nodes.syncing).length | ||
}, | ||
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 '' | ||
} | ||
}, | ||
@@ -560,0 +573,0 @@ changeNodesSize() { |
@@ -82,2 +82,3 @@ ;(function main() { | ||
isRecentActiveCycles: 4, | ||
showAllRadixes: false, | ||
} | ||
@@ -230,2 +231,3 @@ }, | ||
recentRuntimeSync: result?.radixes.some((r) => r.recentRuntimeSync), | ||
fullRadixArray: this.generateFullRadixArray(node), | ||
}) | ||
@@ -310,2 +312,25 @@ } | ||
}, | ||
toggleShowAllRadixes() { | ||
this.showAllRadixes = !this.showAllRadixes | ||
}, | ||
generateFullRadixArray(node) { | ||
// Find the maximum radix value | ||
const maxRadix = Math.max(...node.radixes.map(r => parseInt(r.radix, 16))) | ||
// Create an array with length maxRadix + 1 (to include 0) | ||
let fullArray = new Array(maxRadix + 1).fill(null) | ||
for (let radix of node.radixes) { | ||
let index = parseInt(radix.radix, 16) | ||
fullArray[index] = radix; | ||
} | ||
return fullArray | ||
}, | ||
getRadixStyle(radix) { | ||
if (radix) { | ||
return { backgroundColor: this.getBackgroundColor(radix) } | ||
} else { | ||
return { backgroundColor: 'white', border: '1px solid #ccc' } | ||
} | ||
}, | ||
async start() { | ||
@@ -312,0 +337,0 @@ let res = await requestWithToken(`${monitorServerUrl}/report`) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
2415025
55
5939
2