@@ -529,11 +562,16 @@ export function HealthThresholds() {
const wVal = Number(pending[wKey] ?? wLeaf.value)
const cVal = Number(pending[cKey] ?? cLeaf.value)
- // Shared min/max from the backend leaf (both handles use the same
- // range; backend validates warning <= critical on save).
- const min = Math.min(wLeaf.min, cLeaf.min)
- const max = Math.max(wLeaf.max, cLeaf.max)
+ // Backend validates warning <= critical on save.
const step = Math.max(wLeaf.step, cLeaf.step) || 1
+ const backendMin = Math.min(wLeaf.min, cLeaf.min)
+ const backendMax = Math.max(wLeaf.max, cLeaf.max)
+ const { min, max } = computeVisualRange(
+ [wLeaf.value, cLeaf.value, wLeaf.recommended, cLeaf.recommended],
+ backendMin,
+ backendMax,
+ step,
+ )
const pct = (v: number) => ((Math.max(min, Math.min(max, v)) - min) / (max - min)) * 100
const wPct = pct(wVal)
const cPct = pct(cVal)
@@ -558,7 +596,7 @@ export function HealthThresholds() {
they ride above the corresponding thumb regardless of the
slider width. Pointer events disabled so they don't steal
clicks from the underlying range inputs. */}
-
+
- {/* Track + handles. Two real stacked on
- top of each other, both pointer-events:none on the bar but
- pointer-events:auto on the thumbs (CSS in globals if you
- want sleeker thumbs; here we use the default which already
- looks decent on every browser). */}
-
+ {/* Two range inputs stacked. Mobile track box is taller so the
+ enlarged thumbs (h-7) have room to sit without clipping. */}
+
diff --git a/menu b/menu
index 2c5796be..8117082d 100644
--- a/menu
+++ b/menu
@@ -203,6 +203,34 @@ main_menu() {
exec bash "$MAIN_MENU"
}
+# `menu -v` / `-h` print info and exit without opening the TUI so
+# admins can query the install over SSH (issue #240).
+case "${1:-}" in
+ -v|--version|-V)
+ local_ver="unknown"
+ [[ -f "$LOCAL_VERSION_FILE" ]] && local_ver="$(<"$LOCAL_VERSION_FILE")"
+ printf 'ProxMenux %s\n' "$local_ver"
+ if is_beta && [[ -f "$BETA_VERSION_FILE" ]]; then
+ printf 'Beta build: %s\n' "$(<"$BETA_VERSION_FILE")"
+ fi
+ exit 0
+ ;;
+ -h|--help)
+ cat <<'EOF'
+Usage: menu [OPTION]
+
+Interactive menu for Proxmox VE management.
+
+Options:
+ -v, --version Print installed ProxMenux version and exit.
+ -h, --help Show this help and exit.
+
+Run without arguments to launch the interactive menu.
+EOF
+ exit 0
+ ;;
+esac
+
load_language
initialize_cache
auto_repair_monitor_unit
diff --git a/scripts/menus/security_menu.sh b/scripts/menus/security_menu.sh
index 6a27560c..f2f5c3fb 100644
--- a/scripts/menus/security_menu.sh
+++ b/scripts/menus/security_menu.sh
@@ -39,7 +39,13 @@ initialize_cache
# ==========================================================
security_menu() {
while true; do
- local menu_text
+ # `local menu_text` alone does NOT reset the variable on the
+ # second iteration of the while loop — bash keeps the value from
+ # the previous round, so `menu_text+=` accumulated a duplicate
+ # "Select an option:" every time the user cancelled a sub-menu
+ # and came back. Assigning "" on declaration guarantees a clean
+ # slate each round.
+ local menu_text=""
menu_text+="\n$(translate 'Select an option:')"
local OPTION