Files
Linux-Server-Management-Too…/modules/performance
cschantz f16071ca9e Standardize mysql-query-analyzer.sh menu validation and colors
IMPROVEMENTS:
- Added input validation for menu choice (0-6) with retry loop
- Changed color codes from ${GREEN} to ${CYAN} for consistency with standard
- Added explicit break statements for all valid selections
- Removed wildcard case that silently accepted invalid input
- Improved user prompt to show valid range (0-6)

VALIDATION DETAILS:
- Choice: Only accepts 0-6, rejects invalid with clear error message
- Retry loop: User stays in menu until valid choice is entered
- Option 0: Back to menu (no function execution)
- Options 1-6: Execute analysis function then break from loop

MENU STANDARDS COMPLIANCE:
✓ Input validation (CRITICAL)
✓ Default values (N/A - menu only)
✓ Color codes (IMPORTANT - changed to CYAN)
✓ Error messages on invalid input (IMPORTANT)
✓ Retry logic for failed validation (IMPORTANT)

Lines modified: ~20 (input validation + color standardization)

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-17 18:40:41 -05:00
..