mirror of
https://github.com/DRYTRIX/TimeTracker.git
synced 2026-05-05 03:49:52 -05:00
a1aaee6afd
Major improvements to the backup restore system with a complete UI overhaul and enhanced functionality: UI/UX Improvements: - Complete redesign of restore page with modern Tailwind CSS - Added prominent warning banners and danger badges to prevent accidental data loss - Implemented drag-and-drop file upload with visual feedback - Added real-time progress tracking with auto-refresh every 2 seconds - Added comprehensive safety information sidebar with checklists - Full dark mode support throughout restore interface - Enhanced confirmation flows with checkbox and modal confirmations Functionality Enhancements: - Added dual restore methods: upload new backup or restore from existing server backups - Enhanced restore route to accept optional filename parameter for existing backups - Added "Restore" button to each backup in the backups management page - Implemented restore confirmation modal with critical warnings - Added loading states and button disabling during restore operations - Improved error handling and user feedback Backend Changes: - Enhanced admin.restore() to support both file upload and existing backup restore - Added dual route support: /admin/restore and /admin/restore/<filename> - Added shutil import for file copy operations during restore - Improved security with secure_filename validation and file type checking - Maintained existing rate limiting (3 requests per minute) Frontend Improvements: - Added interactive JavaScript for file selection, drag-and-drop, and modal management - Implemented auto-refresh during restore process to show live progress - Added escape key support for closing modals - Enhanced user feedback with file name display and button states Safety Features: - Pre-restore checklist with 5 verification steps - Multiple warning levels throughout the flow - Confirmation checkbox required before upload restore - Modal confirmation required before existing backup restore - Clear documentation of what gets restored and post-restore steps Dependencies: - Updated flask-swagger-ui from 4.11.1 to 5.21.0 Files modified: - app/templates/admin/restore.html (complete rewrite) - app/templates/admin/backups.html (added restore functionality) - app/routes/admin.py (enhanced restore route) - requirements.txt (updated flask-swagger-ui version) - RESTORE_BACKUP_IMPROVEMENTS.md (documentation) This provides a significantly improved user experience for the restore process while maintaining security and adding powerful new restore capabilities.
73 lines
1.0 KiB
Plaintext
73 lines
1.0 KiB
Plaintext
# Core Flask dependencies
|
|
Flask==3.0.0
|
|
Flask-SQLAlchemy==3.1.1
|
|
Flask-Migrate==4.0.5
|
|
Flask-Login==0.6.3
|
|
Flask-SocketIO==5.3.6
|
|
|
|
# OAuth / OIDC
|
|
Authlib==1.3.1
|
|
PyJWT==2.8.0
|
|
|
|
# Database
|
|
SQLAlchemy==2.0.23
|
|
alembic==1.13.1
|
|
psycopg2-binary==2.9.9
|
|
|
|
# Web server
|
|
gunicorn==23.0.0
|
|
eventlet==0.40.3
|
|
|
|
# Security and forms
|
|
Flask-WTF==1.2.1
|
|
Flask-Limiter==3.8.0
|
|
|
|
# Utilities
|
|
python-dotenv==1.0.0
|
|
pytz==2023.3
|
|
python-dateutil==2.8.2
|
|
Werkzeug==3.0.6
|
|
requests==2.32.4
|
|
|
|
# Email
|
|
Flask-Mail==0.9.1
|
|
|
|
# Excel export
|
|
openpyxl==3.1.2
|
|
|
|
# PDF Generation
|
|
WeasyPrint==60.2
|
|
pydyf==0.10.0
|
|
Pillow==10.4.0
|
|
reportlab==4.0.7
|
|
|
|
# Background tasks
|
|
APScheduler==3.10.4
|
|
|
|
# Internationalization
|
|
Flask-Babel==4.0.0
|
|
Babel==2.14.0
|
|
|
|
# Development and testing
|
|
pytest==7.4.3
|
|
pytest-flask==1.3.0
|
|
pytest-cov==4.1.0
|
|
coverage[toml]==7.4.0
|
|
black==24.8.0
|
|
flake8==6.1.0
|
|
|
|
# Security
|
|
cryptography==45.0.6
|
|
markdown==3.6
|
|
bleach==6.1.0
|
|
|
|
# Analytics and Monitoring
|
|
python-json-logger==2.0.7
|
|
sentry-sdk==1.40.0
|
|
prometheus-client==0.19.0
|
|
posthog==3.1.0
|
|
|
|
# API Documentation
|
|
flask-swagger-ui==5.21.0
|
|
apispec==6.3.0
|
|
marshmallow==3.20.1 |