mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-22 11:13:26 +00:00
improve: storage pool display now shows available space in GB
- Changed from showing just percentage to "X.X GB free of Y.Y GB (Z% used)" - Much more useful for users to see actual available space - Applies to both Quick and Advanced installation modes
This commit is contained in:
+12
-2
@@ -335,7 +335,12 @@ create_lxc_container() {
|
||||
# Show available storage with usage details
|
||||
echo
|
||||
echo "Available storage pools:"
|
||||
echo "$STORAGE_INFO" | awk '{printf " %-15s %-8s %5s used\n", $1, $2, $6}' || echo " No storage pools found"
|
||||
echo "$STORAGE_INFO" | awk '{
|
||||
# Convert KB to GB for readability
|
||||
avail_gb = $6 / 1048576
|
||||
total_gb = $4 / 1048576
|
||||
printf " %-15s %-8s %6.1f GB free of %6.1f GB (%s used)\n", $1, $2, avail_gb, total_gb, $7
|
||||
}' || echo " No storage pools found"
|
||||
safe_read "Storage [$DEFAULT_STORAGE]: " storage
|
||||
storage=${storage:-$DEFAULT_STORAGE}
|
||||
|
||||
@@ -373,7 +378,12 @@ create_lxc_container() {
|
||||
echo
|
||||
if [[ -n "$STORAGE_INFO" ]]; then
|
||||
echo "Available storage pools:"
|
||||
echo "$STORAGE_INFO" | awk '{printf " %-15s %-8s %5s used\n", $1, $2, $6}'
|
||||
echo "$STORAGE_INFO" | awk '{
|
||||
# Convert KB to GB for readability
|
||||
avail_gb = $6 / 1048576
|
||||
total_gb = $4 / 1048576
|
||||
printf " %-15s %-8s %6.1f GB free of %6.1f GB (%s used)\n", $1, $2, avail_gb, total_gb, $7
|
||||
}'
|
||||
else
|
||||
echo "No storage pools detected"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user