go-duck-cli 1.4.13 → 1.4.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1217,16 +1217,16 @@ func SetupRouter(appConfig *config.Config) *gin.Engine {
|
|
|
1217
1217
|
if (threadsGrid.children.length !== sys.cpu_threads_usage.length) {
|
|
1218
1218
|
let html = '';
|
|
1219
1219
|
sys.cpu_threads_usage.forEach((val, idx) => {
|
|
1220
|
-
html +=
|
|
1221
|
-
<canvas id="t-cpu-canvas
|
|
1222
|
-
<div id="t-cpu-label
|
|
1223
|
-
</div
|
|
1220
|
+
html += '<div class="cpu-chart-container" title="Core ' + idx + '">' +
|
|
1221
|
+
'<canvas id="t-cpu-canvas-' + idx + '" class="cpu-chart-canvas"></canvas>' +
|
|
1222
|
+
'<div id="t-cpu-label-' + idx + '" class="cpu-chart-label">T' + idx + ': 0%</div>' +
|
|
1223
|
+
'</div>';
|
|
1224
1224
|
});
|
|
1225
1225
|
threadsGrid.innerHTML = html;
|
|
1226
1226
|
|
|
1227
1227
|
// Set internal canvas resolution to match computed CSS size for crisp rendering
|
|
1228
1228
|
sys.cpu_threads_usage.forEach((val, idx) => {
|
|
1229
|
-
const canvas = document.getElementById(
|
|
1229
|
+
const canvas = document.getElementById('t-cpu-canvas-' + idx);
|
|
1230
1230
|
if (canvas) {
|
|
1231
1231
|
canvas.width = canvas.offsetWidth;
|
|
1232
1232
|
canvas.height = canvas.offsetHeight;
|
|
@@ -1246,13 +1246,13 @@ func SetupRouter(appConfig *config.Config) *gin.Engine {
|
|
|
1246
1246
|
}
|
|
1247
1247
|
|
|
1248
1248
|
// Render Text Label
|
|
1249
|
-
const label = document.getElementById(
|
|
1249
|
+
const label = document.getElementById('t-cpu-label-' + idx);
|
|
1250
1250
|
if (label) {
|
|
1251
|
-
label.innerText =
|
|
1251
|
+
label.innerText = 'T' + idx + ': ' + val.toFixed(0) + '%';
|
|
1252
1252
|
}
|
|
1253
1253
|
|
|
1254
1254
|
// Render Canvas Sparkline
|
|
1255
|
-
const canvas = document.getElementById(
|
|
1255
|
+
const canvas = document.getElementById('t-cpu-canvas-' + idx);
|
|
1256
1256
|
if (canvas) {
|
|
1257
1257
|
const ctx = canvas.getContext('2d');
|
|
1258
1258
|
const width = canvas.width;
|