Compare commits

1 Commits

Author SHA1 Message Date
Cheng Zhou b283cf1e5c 优化镜像构建实时日志展示
Storage Persistence Guard / storage-persistence-audit (pull_request) Has been cancelled
Storage Persistence Guard / storage-persistence-audit (push) Has been cancelled
2026-06-30 13:40:26 +08:00
+2 -2
View File
@@ -417,7 +417,7 @@ _ctms_live_log() {
columns="$(tput cols 2>/dev/null || printf 80)" columns="$(tput cols 2>/dev/null || printf 80)"
[[ "$columns" =~ ^[0-9]+$ ]] || columns=80 [[ "$columns" =~ ^[0-9]+$ ]] || columns=80
box_width=$(( columns - 4 )) box_width=$(( columns - 4 ))
[[ "$box_width" -gt 100 ]] && box_width=100 [[ "$box_width" -gt 160 ]] && box_width=160
[[ "$box_width" -lt 50 ]] && box_width=50 [[ "$box_width" -lt 50 ]] && box_width=50
content_width=$(( box_width - 4 )) content_width=$(( box_width - 4 ))
@@ -432,7 +432,7 @@ _ctms_live_log() {
fi fi
printf '\033[2K %s╭─ 实时输出 %s╮%s\n' \ printf '\033[2K %s╭─ 实时输出 %s╮%s\n' \
"${CC_PRIMARY}${C_BOLD}" "$(ctms_repeat_char '─' "$(( box_width - 14 ))")" "${C_RESET}" "${CC_PRIMARY}${C_BOLD}" "$(ctms_repeat_char '─' "$(( box_width - 13 ))")" "${C_RESET}"
for ((row=0; row<_CTMS_LIVE_LOG_ROWS; row++)); do for ((row=0; row<_CTMS_LIVE_LOG_ROWS; row++)); do
line="${lines[$row]:-}" line="${lines[$row]:-}"
printf '\033[2K %s│%s %-*s %s│%s\n' \ printf '\033[2K %s│%s %-*s %s│%s\n' \