fix(webui): restore chart legend, remove GPU numeric table

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-29 11:04:51 +03:00
parent 889fe1dc2f
commit 349e026cfa
2 changed files with 1 additions and 12 deletions

View File

@@ -436,7 +436,6 @@ func renderMetrics() string {
<div class="card-head">GPU — Temperature</div>
<div class="card-body" style="padding:8px">
<img id="chart-gpu-all-temp" src="/api/metrics/chart/gpu-all-temp.svg" style="width:100%;display:block;border-radius:6px" alt="GPU temperature">
<div id="gpu-table" style="margin-top:8px;font-size:12px"></div>
</div>
</div>
@@ -459,16 +458,6 @@ es.addEventListener('metrics', e => {
const fanCard = document.getElementById('card-server-fans');
if (fanCard) fanCard.style.display = (d.fans && d.fans.length > 0) ? '' : 'none';
let gpuHTML = '';
(d.gpus||[]).forEach(g => {
gpuHTML += '<tr><td>GPU '+g.index+'</td>' +
'<td>'+g.temp_c+'°C</td>' +
'<td>'+g.usage_pct+'% load</td>' +
'<td>'+g.mem_usage_pct+'% mem</td>' +
'<td>'+g.power_w+' W</td></tr>';
});
const gt = document.getElementById('gpu-table');
if (gt) gt.innerHTML = gpuHTML ? '<table>'+gpuHTML+'</table>' : '';
});
es.onerror = () => {};
</script>`