From 8a9b7568a766bacdc4b80ef4575d1440fe85e0b6 Mon Sep 17 00:00:00 2001 From: Evan Date: Sat, 22 Aug 2026 23:49:56 +0800 Subject: [PATCH] fix(node_info): hide GPU Details and GPU Fans when no GPU is present (#311) 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('') + '
'; },