From eb050f38b763989358742e6bcd7efe3ac6dc2c5c Mon Sep 17 00:00:00 2001 From: pi-farm Date: Sun, 28 Sep 2025 16:53:42 +0200 Subject: [PATCH] removed image-management function --- scripts/image-builder.sh | 59 ++-------------------------------------- 1 file changed, 2 insertions(+), 57 deletions(-) diff --git a/scripts/image-builder.sh b/scripts/image-builder.sh index 4e6569b..e2e3519 100755 --- a/scripts/image-builder.sh +++ b/scripts/image-builder.sh @@ -781,59 +781,6 @@ image_build_menu() { select_project_for_build } - -# =============================== -# Image-Verwaltung -# =============================== -image_management_menu() { - while true; do - # Projekte für Auswahl vorbereiten - local projects=($(ls "$PROJECT_CONFIG_DIR")) - [ ${#projects[@]} -eq 0 ] && { whiptail --msgbox "Keine Projekte vorhanden." 10 60; return; } - - local menu_list=() - for p in "${projects[@]}"; do - menu_list+=("$p" "Projekt") - done - menu_list+=("0" "Zurueck") - - project=$(whiptail --title "Image-Verwaltung" --menu "Projekt auswählen:" 20 70 10 "${menu_list[@]}" 3>&1 1>&2 2>&3) || return - [[ "$project" == "0" ]] && return - - manage_project_images "$project" - done -} - -# Verwaltung der Images eines Projekts -manage_project_images() { - local project=$1 - local config_file="$PROJECT_CONFIG_DIR/$project/config-file" - load_project_config "$config_file" - - while true; do - # Alle lokal vorhandenen Images für das Projekt auflisten - local images - images=$(docker images --format "{{.Repository}}:{{.Tag}}" | grep "${image_name}" || true) - [ -z "$images" ] && { whiptail --msgbox "Keine lokalen Images für $project gefunden." 10 60; return; } - - local menu_list=() - for img in $images; do - menu_list+=("$img" "löschen") - done - menu_list+=("0" "Zurueck") - - local choice - choice=$(whiptail --title "Projekt-Images: $project" --menu "Image auswählen:" 20 70 12 "${menu_list[@]}" 3>&1 1>&2 2>&3) || return - [[ "$choice" == "0" ]] && return - - if whiptail --yesno "Image $choice wirklich löschen?" 10 60; then - docker rmi -f "$choice" - whiptail --msgbox "Image $choice gelöscht." 8 50 - fi - done -} - - # ------------------------- # Hauptmenue # ------------------------- @@ -844,8 +791,7 @@ main_menu() { 2 "Projektverwaltung" \ 3 "Registryverwaltung" \ 4 "Image-Bauen" \ - 5 "Image-Verwaltung" \ - 6 "Logs ansehen" \ + 5 "Logs ansehen" \ 0 "Beenden" \ 3>&1 1>&2 2>&3) || exit 0 @@ -854,8 +800,7 @@ main_menu() { 2) project_menu;; 3) registry_menu ;; 4) image_build_menu;; - 5) manage_project_images;; - 6) view_logs ;; # <-- hier globale Logs + 5) view_logs ;; # <-- hier globale Logs 0) exit 0;; esac done