From bbfeb24983163b20af98c875adf3324c0213cc43 Mon Sep 17 00:00:00 2001 From: Evan Date: Fri, 21 Aug 2026 19:47:12 +0800 Subject: [PATCH] fix(node_info): hide GPU Details and GPU Fans when no GPU is present Empty graphics payloads currently leave the labelled rows visible with no content. Hide those widgets unless they can render at least one GPU. --- src/modules/node_info/files/PveMod_pvemanagerlib.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/modules/node_info/files/PveMod_pvemanagerlib.js b/src/modules/node_info/files/PveMod_pvemanagerlib.js index ea9755c..75cfdcd 100644 --- a/src/modules/node_info/files/PveMod_pvemanagerlib.js +++ b/src/modules/node_info/files/PveMod_pvemanagerlib.js @@ -391,6 +391,7 @@ Ext.define('PVE.node.StatusView', { this.hide(); return ''; } else if (!gpuStats || !gpuStats.Graphics) { + this.hide(); return ''; } @@ -508,9 +509,12 @@ Ext.define('PVE.node.StatusView', { } html += ''; - return html.indexOf('') > 0 - ? '
' + html + '
' - : ''; + if (html.indexOf('') <= 0) { + this.hide(); + return ''; + } + this.show(); + return '
' + html + '
'; }, }, { @@ -865,6 +869,7 @@ Ext.define('PVE.node.StatusView', { this.hide(); return ''; } else if (!gpuStats || !gpuStats.Graphics || !gpuStats.Graphics.NVIDIA) { + this.hide(); return ''; } @@ -892,8 +897,10 @@ Ext.define('PVE.node.StatusView', { }); if (rows.length === 0) { + this.hide(); return ''; } + this.show(); return '
' + rows.join('') + '
'; },