remove small gpu stats (#253)

Co-authored-by: Meliox <na>
This commit is contained in:
Meliox 2026-08-09 10:48:56 +02:00 committed by GitHub
parent 965ffea463
commit 5e5e6b6726
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -153,84 +153,6 @@ Ext.define('PVE.node.StatusView', {
return Proxmox.Utils.render_size(record.shared); return Proxmox.Utils.render_size(record.shared);
}, },
}, },
{
itemId: 'gpu',
iconCls: 'fa fa-fw fa-desktop',
title: gettext('GPU Usage'),
printBar: false,
textField: 'PveMod_graphicsInfo',
renderer: function(gpuStats) {
if (gpuStats && gpuStats.disabled === true) {
this.hide();
return '';
} else if (!gpuStats || !gpuStats.Graphics) {
return '';
}
let hasActiveGPU = false;
let gpuName = '';
// Check Intel GPUs
if (gpuStats.Graphics.Intel) {
const keys = Object.keys(gpuStats.Graphics.Intel).sort();
if (keys.length > 0) {
const gpuData = gpuStats.Graphics.Intel[keys[0]];
hasActiveGPU = true;
gpuName = gpuData.name;
}
}
// Check NVIDIA GPUs
if (gpuStats.Graphics.NVIDIA) {
const keys = Object.keys(gpuStats.Graphics.NVIDIA).sort();
if (keys.length > 0) {
const stats = gpuStats.Graphics.NVIDIA[keys[0]].stats;
hasActiveGPU = true;
gpuName = stats.name;
}
}
return hasActiveGPU ? gpuName : '';
},
},
{
itemId: 'gpu_usage',
iconCls: 'fa fa-fw fa-desktop',
title: gettext('GPU 0'),
valueField: 'gpuStats',
printBar: false,
textField: 'gpuStats',
renderer: function(gpuStats) {
if (!gpuStats || !gpuStats.Graphics) {
return '';
}
// Check Intel GPUs
if (gpuStats.Graphics.Intel) {
const keys = Object.keys(gpuStats.Graphics.Intel).sort();
if (keys.length > 0) {
const gpuData = gpuStats.Graphics.Intel[keys[0]];
if (gpuData.stats.engines && gpuData.stats.engines['Render/3D']) {
const usage = gpuData.stats.engines['Render/3D'].busy;
return `${usage}%`;
}
}
}
// Check NVIDIA GPUs
if (gpuStats.Graphics.NVIDIA) {
const keys = Object.keys(gpuStats.Graphics.NVIDIA).sort();
if (keys.length > 0) {
const stats = gpuStats.Graphics.NVIDIA[keys[0]].stats;
if (stats.utilization) {
return `${stats.utilization.gpu}%`;
}
}
}
return '';
},
},
{ {
iconCls: 'fa fa-fw fa-hdd-o', iconCls: 'fa fa-fw fa-hdd-o',
itemId: 'rootfs', itemId: 'rootfs',