feat: add temp and disk sparkline graphs to system gauges

This commit is contained in:
Tugcan Topaloglu
2026-03-05 12:06:17 +03:00
parent f9d7819926
commit c72f2c796b
2 changed files with 7 additions and 2 deletions
+4 -1
View File
@@ -1530,6 +1530,7 @@ body.light-theme ::selection { background: rgba(99,102,241,0.2); }
<span class="radial-gauge-text">TEMP</span>
</div>
</div>
<div id="tempSparkline" style="margin-top:8px;"></div>
</div>
<div class="system-metric">
<div class="radial-gauge">
@@ -1543,7 +1544,7 @@ body.light-theme ::selection { background: rgba(99,102,241,0.2); }
<span class="radial-gauge-text" id="systemDiskDetail" style="font-size:9px;"></span>
</div>
</div>
<!-- -->
<div id="diskSparkline" style="margin-top:8px;"></div>
</div>
<div class="system-metric">
<div style="text-align: center; padding-top: 20px;">
@@ -4525,6 +4526,8 @@ function renderHealthSparklines() {
renderSparkline('cpuSparkline', 'cpu', 'var(--green)');
renderSparkline('ramSparkline', 'ram', 'var(--blue)');
renderSparkline('tempSparkline', 'temp', 'var(--yellow)');
renderSparkline('diskSparkline', 'disk', 'var(--purple)');
}
async function fetchNewData() {
+3 -1
View File
@@ -1447,7 +1447,9 @@ function saveHealthSnapshot() {
healthHistory.push({
t: now,
cpu: stats.cpu?.usage || 0,
ram: stats.memory?.percent || 0
ram: stats.memory?.percent || 0,
temp: stats.cpu?.temp || 0,
disk: stats.disk?.percent || 0
});
if (healthHistory.length > 288) {
healthHistory = healthHistory.slice(-288);