aboutsummaryrefslogtreecommitdiffstats
path: root/static
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-11-09 18:59:58 +0100
committerDanilo M. <danix@danix.xyz>2026-11-09 18:59:58 +0100
commit84ac47a8ab196ee20ad778219bfa13df48f87241 (patch)
tree313118623d690a33674a93213bc4c62f6a6ad157 /static
parenta9d709f6dd893b6fab6750b67f0c4f367458f40c (diff)
downloaddeck-it-84ac47a8ab196ee20ad778219bfa13df48f87241.tar.gz
deck-it-84ac47a8ab196ee20ad778219bfa13df48f87241.zip
feat: Intel xe GPU stats (temp, fan, VRAM)
Diffstat (limited to 'static')
-rw-r--r--static/modules/stats.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/static/modules/stats.js b/static/modules/stats.js
index b29b4ae..a119c6c 100644
--- a/static/modules/stats.js
+++ b/static/modules/stats.js
@@ -6,10 +6,18 @@ const uptime = (s) => {
const m = Math.floor((s % 3600) / 60);
return d ? `${d}d ${h}h` : `${h}h ${m}m`;
};
+const gib = (b) => (b / 1073741824).toFixed(1);
const gpu = (g) => {
if (!g) return "—";
if (g.asleep) return `${g.name} (asleep)`;
- return `${g.name} ${g.util}%${g.temp != null ? ` · ${g.temp}°C` : ""}`;
+ const parts = [g.name];
+ if (g.util != null) parts.push(`${g.util}%`);
+ if (g.temp != null) parts.push(`${g.temp}°C`);
+ if (g.fan != null) parts.push(`${g.fan} rpm`);
+ if (g.memUsed != null) {
+ parts.push(g.memTotal ? `${gib(g.memUsed)} / ${gib(g.memTotal)} GiB` : `${gib(g.memUsed)} GiB`);
+ }
+ return parts.join(" · ");
};
function row(label, value) {