ux update and code cleanup
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
# ----------------- UNRAID OPS COMMON LIBRARY (STABLE FRAMEWORK v1.5) ---------------------------
|
||||
# ------------------------- UNRAID OPS COMMON LIBRARY (v1.6) ------------------------------------
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
# Changelog:
|
||||
# v1.0 — Initial stable framework
|
||||
@@ -19,6 +19,10 @@
|
||||
# v1.5 — Full icon set expanded — each operation and state has its own distinct icon
|
||||
# All function output updated to use correct icon per context
|
||||
# Icons grouped and commented by category for clarity
|
||||
# v1.6 — ICON_CONTAINERS added — 📦 anchors all container sections for visual consistency
|
||||
# ICON_NOT_RUNNING changed to ⭕ — distinct from ICON_STOPPED 🔴
|
||||
# Section dividers updated from --- to ━━━ for cleaner log readability
|
||||
# Summary passed/failed lines use ICON_SUCCESS and ICON_ERROR consistently
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
@@ -27,33 +31,34 @@
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
|
||||
# System / Host
|
||||
ICON_HOST="🖥️" # host detection
|
||||
ICON_NET="🌐" # network / IP resolution
|
||||
ICON_PING="📡" # connectivity check
|
||||
ICON_GEAR="⚙️" # setup section header / profile load
|
||||
ICON_HOST="🖥️" # host detection
|
||||
ICON_NET="🌐" # network / IP resolution
|
||||
ICON_PING="📡" # connectivity check
|
||||
ICON_GEAR="⚙️" # setup section header / profile load
|
||||
|
||||
# Health Checks
|
||||
ICON_DISK="💾" # disk checks
|
||||
ICON_HEALTH="🩺" # rootfs / share health checks
|
||||
ICON_SHIELD="🛡️" # pre-flight section header
|
||||
ICON_DISK="💾" # disk checks
|
||||
ICON_HEALTH="🩺" # rootfs / share health checks
|
||||
ICON_SHIELD="🛡️" # pre-flight section header
|
||||
|
||||
# Containers
|
||||
ICON_STOP="⛔" # stop command being issued
|
||||
ICON_STOPPED="🔴" # container confirmed stopped
|
||||
ICON_START="▶️" # start command being issued
|
||||
ICON_STARTED="💚" # container confirmed started
|
||||
ICON_RUNNING="🟢" # container already running when checked
|
||||
ICON_NOT_RUNNING="🔴" # container already stopped when checked
|
||||
ICON_CONTAINERS="📦" # container section anchor — paired with action icon for direction
|
||||
ICON_STOP="⛔" # stop command being issued
|
||||
ICON_STOPPED="🔴" # container confirmed stopped
|
||||
ICON_START="▶️" # start command being issued
|
||||
ICON_STARTED="💚" # container confirmed started
|
||||
ICON_RUNNING="🟢" # container already running when checked
|
||||
ICON_NOT_RUNNING="⭕" # container already stopped when checked — distinct from ICON_STOPPED
|
||||
|
||||
# Transfer
|
||||
ICON_SYNC="🔄" # transfer section header
|
||||
ICON_RUN="🚀" # sync starting / rsync attempt
|
||||
ICON_RETRY="🔁" # retry attempt
|
||||
ICON_DONE="🏁" # transfer complete
|
||||
ICON_SYNC="🔄" # transfer section header
|
||||
ICON_RUN="🚀" # sync starting / rsync attempt
|
||||
ICON_RETRY="🔁" # retry attempt
|
||||
ICON_DONE="🏁" # transfer complete
|
||||
|
||||
# Summary
|
||||
ICON_SUMMARY="📋" # summary section header
|
||||
ICON_TIME="⏱️" # duration line
|
||||
ICON_SUMMARY="📋" # summary section header
|
||||
ICON_TIME="⏱️" # duration line
|
||||
|
||||
# Output
|
||||
ICON_INFO="ℹ️"
|
||||
@@ -299,7 +304,6 @@ check_remote_disks() {
|
||||
|
||||
info "$ICON_DISK Checking disks backing $share_name on $REMOTE_SERVER_NAME..."
|
||||
|
||||
# Find all /mnt/diskN paths that contain this share on the remote
|
||||
DISK_PATHS=$(ssh -i "$SSH_KEY" root@"$REMOTE_SERVER" \
|
||||
"ls -d /mnt/disk*/$share_name 2>/dev/null" 2>/dev/null)
|
||||
|
||||
@@ -449,7 +453,7 @@ get_rsync_opts() {
|
||||
# Useful for verifying profile resolution and variable state before a live run.
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
show_status() {
|
||||
echo "===== $ICON_SUMMARY STATUS ====="
|
||||
echo "━━━━━ $ICON_SUMMARY STATUS ━━━━━"
|
||||
echo "Local: $LOCAL_SERVER_NAME"
|
||||
echo "Remote: $REMOTE_SERVER_NAME"
|
||||
echo "IP: $REMOTE_SERVER"
|
||||
@@ -459,5 +463,5 @@ show_status() {
|
||||
echo "Containers: ${CRITICAL_CONTAINER_NAMES[*]}"
|
||||
echo "Delayed: ${DELAYED_CONTAINERS[*]}"
|
||||
echo "Excludes: ${EXCLUDE_DIRS[*]}"
|
||||
echo "========================"
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
}
|
||||
Reference in New Issue
Block a user