mirror of
https://github.com/tugcantopaloglu/openclaw-dashboard.git
synced 2026-08-14 08:52:08 +00:00
feat: add temp and disk sparkline graphs to system gauges
This commit is contained in:
+4
-1
@@ -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() {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user