removed image-management function
This commit is contained in:
@@ -781,59 +781,6 @@ image_build_menu() {
|
|||||||
select_project_for_build
|
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
|
# Hauptmenue
|
||||||
# -------------------------
|
# -------------------------
|
||||||
@@ -844,8 +791,7 @@ main_menu() {
|
|||||||
2 "Projektverwaltung" \
|
2 "Projektverwaltung" \
|
||||||
3 "Registryverwaltung" \
|
3 "Registryverwaltung" \
|
||||||
4 "Image-Bauen" \
|
4 "Image-Bauen" \
|
||||||
5 "Image-Verwaltung" \
|
5 "Logs ansehen" \
|
||||||
6 "Logs ansehen" \
|
|
||||||
0 "Beenden" \
|
0 "Beenden" \
|
||||||
3>&1 1>&2 2>&3) || exit 0
|
3>&1 1>&2 2>&3) || exit 0
|
||||||
|
|
||||||
@@ -854,8 +800,7 @@ main_menu() {
|
|||||||
2) project_menu;;
|
2) project_menu;;
|
||||||
3) registry_menu ;;
|
3) registry_menu ;;
|
||||||
4) image_build_menu;;
|
4) image_build_menu;;
|
||||||
5) manage_project_images;;
|
5) view_logs ;; # <-- hier globale Logs
|
||||||
6) view_logs ;; # <-- hier globale Logs
|
|
||||||
0) exit 0;;
|
0) exit 0;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user