From dc4804b632eb097879c8d1bf63c82f45fa07188a Mon Sep 17 00:00:00 2001 From: rmm Date: Thu, 16 May 2024 18:58:07 +0200 Subject: [PATCH 1/3] Add missing text if no HDD/SSD sensors found. --- pve-mod-gui-sensors.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/pve-mod-gui-sensors.sh b/pve-mod-gui-sensors.sh index 9ab2b9c..aa2acf5 100644 --- a/pve-mod-gui-sensors.sh +++ b/pve-mod-gui-sensors.sh @@ -145,6 +145,7 @@ function configure { enableHddTemp=false fi else + warn "No HDD/SSD temperature sensors found." enableHddTemp=false fi From a06df57cb93da02c19ec917da2010415815e4cb6 Mon Sep 17 00:00:00 2001 From: rmm Date: Sat, 25 May 2024 14:55:23 +0200 Subject: [PATCH 2/3] Add function for info texts --- pve-mod-gui-sensors.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pve-mod-gui-sensors.sh b/pve-mod-gui-sensors.sh index 19eca23..ff502c6 100644 --- a/pve-mod-gui-sensors.sh +++ b/pve-mod-gui-sensors.sh @@ -38,8 +38,12 @@ function msgb { echo -e "\e[1m$1\e[0m" } +function info { + echo -e "\e[0;32m[info] $1\e[0m" +} + function warn { - echo -e "\e[0;33m[warning] $1\e[0m" + echo -e "\e[0;93m[warning] $1\e[0m" } function err { @@ -668,9 +672,9 @@ Ext.define('PVE.mod.TempHelper', {\n\ restart_proxy - msg "Installation completed" + msg "Installation completed." - msg "Clear the browser cache to ensure all changes are visualized." + info "Clear the browser cache to ensure all changes are visualized." else warn "Sensor display items already added to the summary panel in \"$pvemanagerlibjs\"." fi @@ -737,4 +741,4 @@ done # If no arguments were provided or all arguments have been processed, print the usage message if [[ $executed -eq 0 ]]; then usage -fi \ No newline at end of file +fi From 9c7dc540d8188e87cee98135c741f835f0544aae Mon Sep 17 00:00:00 2001 From: rmm Date: Sat, 25 May 2024 15:24:32 +0200 Subject: [PATCH 3/3] Detect default temperature unit selection --- pve-mod-gui-sensors.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pve-mod-gui-sensors.sh b/pve-mod-gui-sensors.sh index ff502c6..640071d 100644 --- a/pve-mod-gui-sensors.sh +++ b/pve-mod-gui-sensors.sh @@ -188,8 +188,12 @@ function configure { [fF]) TEMP_UNIT="F" ;; + "") + info "No unit selected. Temperatures will be presented in degrees Celsius." + TEMP_UNIT="C" + ;; *) - warn "Invalid selection. Temperatures will be presented in degrees Celsius." + warn "Invalid unit selected. Temperatures will be presented in degrees Celsius." TEMP_UNIT="C" ;; esac