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:
parent
795b0ebf39
commit
8ebc2b4753
@ -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);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user