From 56149deaf46797840253440e28c4aeee6123253c Mon Sep 17 00:00:00 2001 From: rmm Date: Tue, 4 Jul 2023 10:36:38 +0200 Subject: [PATCH] Display fix for HDD/SSD when no NVMe. --- pve-mod-gui-temp.sh | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/pve-mod-gui-temp.sh b/pve-mod-gui-temp.sh index 7464307..4047d94 100644 --- a/pve-mod-gui-temp.sh +++ b/pve-mod-gui-temp.sh @@ -243,14 +243,9 @@ function install_mod { :a; /items:/!{N;ba;} :b; - /thermal.*},/!{N;bb;} + /'thermal.*},/!{N;bb;} a\ \\ - {\n\ - xtype: 'box',\n\ - colspan: 1,\n\ - padding: '0 0 20 0',\n\ - },\n\ {\n\ itemId: 'thermalHdd',\n\ colspan: 1,\n\ @@ -290,7 +285,7 @@ function install_mod { :a; /items:/!{N;ba;} :b; - /thermal.*},/!{N;bb;} + /'thermal.*},/!{N;bb;} a\ \\ {\n\ @@ -327,6 +322,20 @@ function install_mod { }" "$pvemanagerlibjs" fi + if [ $enableNvmeTemp = true -a $enableHddTemp = true ]; then + sed -i "/^Ext.define('PVE.node.StatusView',/ { + :a; + /^.*{.*'thermalNvme'.*},/!{N;ba;} + a\ + \\ + {\n\ + xtype: 'box',\n\ + colspan: 1,\n\ + padding: '0 0 20 0',\n\ + }, + }" "$pvemanagerlibjs" + fi + msg "New temperature display items added to the summary panel in \"$pvemanagerlibjs\"." restart_proxy