feat(node_info): add GPU utilization display with color-coded thresholds for NVIDIA GPUs (#296)

Co-authored-by: Meliox <na>
This commit is contained in:
Meliox 2026-08-14 20:15:43 +02:00 committed by GitHub
parent 795b0ebf39
commit 8ebc2b4753
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -445,6 +445,15 @@ Ext.define('PVE.node.StatusView', {
let details = []; let details = [];
// GPU Utilization
if (stats.utilization && stats.utilization.gpu) {
const gpuUsage = parseInt(stats.utilization.gpu);
let gpuStyle = '';
if (gpuUsage >= 90) gpuStyle = 'color: #d9534f; font-weight: bold;';
else if (gpuUsage >= 70) gpuStyle = 'color: #f0ad4e; font-weight: bold;';
details.push(`<span style="${gpuStyle}">GPU: ${stats.utilization.gpu}%</span>`);
}
// Memory Utilization // Memory Utilization
if (stats.utilization && stats.utilization.memory) { if (stats.utilization && stats.utilization.memory) {
const memUsage = parseInt(stats.utilization.memory); const memUsage = parseInt(stats.utilization.memory);