remove small gpu stats
This commit is contained in:
parent
9160c0a9b1
commit
6b9a1c3710
@ -153,84 +153,6 @@ Ext.define('PVE.node.StatusView', {
|
||||
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',
|
||||
itemId: 'rootfs',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user