UX: Move "View target details" to sub-menu under List targets
Improved menu flow by moving target details viewing into a natural workflow after listing targets. BEFORE: Main menu had 8 options including separate "View target details" option. User flow: Main → List targets → Main → View details → Select target AFTER: Main menu has 7 options. "View target details" is a sub-menu. User flow: Main → List targets → View details (optional) → Main CHANGES: - Option 1 (List all backup targets) now shows a sub-menu: 1) View target details 2) Back to main menu - Removed old option 6 (View target details) from main menu - Renumbered options: 7 → 6 (Reinstall), 8 → 7 (Exit) - Main menu prompt changed from [1-8] to [1-7] - Sub-menu uses same resolve_target_input() for number/name selection BENEFITS: - More intuitive workflow (view list, then optionally drill down) - Cleaner main menu (7 options instead of 8) - Reduces redundant listing of targets - Users can quickly return to main menu without viewing details 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
2bfe067231
commit
157265e3f9
2 changed files with 39 additions and 27 deletions
|
|
@ -120,6 +120,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- Script version bumped to 1.1.0 for multi-target support
|
||||
|
||||
### Changed
|
||||
- **Improved menu flow for viewing target details**
|
||||
- "View target details" moved from main menu option 6 to sub-menu under "List all backup targets"
|
||||
- After listing targets, users can choose:
|
||||
- View target details (select target to see comprehensive info)
|
||||
- Back to main menu
|
||||
- Main menu reduced from 8 options to 7 (cleaner, more focused)
|
||||
- More intuitive workflow: list → view details → back to menu
|
||||
- **Target selection now accepts both numbers and names**
|
||||
- All target selection prompts now accept either:
|
||||
- Target number from the displayed list (e.g., "1")
|
||||
|
|
|
|||
|
|
@ -1979,14 +1979,41 @@ main() {
|
|||
echo " 3) Edit existing target"
|
||||
echo " 4) Delete target"
|
||||
echo " 5) Run backup now (select target)"
|
||||
echo " 6) View target details"
|
||||
echo " 7) Reinstall PBS client"
|
||||
echo " 8) Exit"
|
||||
ACTION=$(prompt "Select option [1-8]" "8")
|
||||
echo " 6) Reinstall PBS client"
|
||||
echo " 7) Exit"
|
||||
ACTION=$(prompt "Select option [1-7]" "7")
|
||||
|
||||
case "$ACTION" in
|
||||
1)
|
||||
show_targets_list
|
||||
echo
|
||||
echo "Options:"
|
||||
echo " 1) View target details"
|
||||
echo " 2) Back to main menu"
|
||||
SUBACTION=$(prompt "Select option [1/2]" "2")
|
||||
|
||||
case "$SUBACTION" in
|
||||
1)
|
||||
echo
|
||||
echo "Available targets:"
|
||||
list_targets | nl
|
||||
echo
|
||||
USER_INPUT=$(prompt "Enter target number or name to view" "")
|
||||
|
||||
if [ -n "$USER_INPUT" ]; then
|
||||
TARGET_NAME=$(resolve_target_input "$USER_INPUT")
|
||||
if [ -n "$TARGET_NAME" ] && validate_target_name "$TARGET_NAME"; then
|
||||
show_target_detail "$TARGET_NAME"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
2)
|
||||
# Just continue to main menu
|
||||
;;
|
||||
*)
|
||||
warn "Invalid option, returning to main menu"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
2)
|
||||
add_target
|
||||
|
|
@ -2027,33 +2054,11 @@ main() {
|
|||
run_backup_for_target "$TARGET_NAME"
|
||||
;;
|
||||
6)
|
||||
echo
|
||||
echo "Available targets:"
|
||||
list_targets | nl
|
||||
echo
|
||||
USER_INPUT=$(prompt "Enter target number or name to view" "")
|
||||
|
||||
if [ -z "$USER_INPUT" ]; then
|
||||
error "No target specified"
|
||||
continue
|
||||
fi
|
||||
|
||||
TARGET_NAME=$(resolve_target_input "$USER_INPUT")
|
||||
if [ -z "$TARGET_NAME" ]; then
|
||||
error "Invalid target number: $USER_INPUT"
|
||||
continue
|
||||
fi
|
||||
|
||||
if validate_target_name "$TARGET_NAME"; then
|
||||
show_target_detail "$TARGET_NAME"
|
||||
fi
|
||||
;;
|
||||
7)
|
||||
info "Reinstalling PBS client..."
|
||||
install_pbs_client
|
||||
log "PBS client reinstalled successfully"
|
||||
;;
|
||||
8)
|
||||
7)
|
||||
info "Exiting"
|
||||
exit 0
|
||||
;;
|
||||
|
|
|
|||
Loading…
Reference in a new issue