Add configuration, utilities, and update server with enhanced monitoring features

- Add config.py for environment configuration management
- Add utils.py with utility functions
- Add .env.example for environment variable reference
- Add routes_example.py as route reference
- Add login.html template for authentication
- Update server.py with enhancements
- Update all dashboard and log templates
- Move documentation to 'explanations and old code' directory
- Update database schema
This commit is contained in:
Developer
2025-12-18 09:11:11 +02:00
parent 87a51c7950
commit 376240fb06
19 changed files with 3903 additions and 51 deletions

45
.env.example Normal file
View File

@@ -0,0 +1,45 @@
# Environment configuration file for Server Monitorizare
# Copy this file to .env and update with your values
# Flask Configuration
FLASK_ENV=development
FLASK_DEBUG=True
# Server Configuration
HOST=0.0.0.0
PORT=80
SECRET_KEY=your-secret-key-change-in-production
# Database Configuration
DATABASE_PATH=data/database.db
# Security - API Keys
API_KEY=your-secure-api-key-here
# Timeouts
REQUEST_TIMEOUT=30
DEVICE_TIMEOUT=10
BULK_OPERATION_MAX_THREADS=10
# Logging
LOG_LEVEL=INFO
LOG_FILE=logs/app.log
LOG_MAX_BYTES=10485760
LOG_BACKUP_COUNT=10
# Caching
CACHE_TYPE=simple
CACHE_DEFAULT_TIMEOUT=300
# Pagination
DEFAULT_PAGE_SIZE=20
MAX_PAGE_SIZE=100
# Rate Limiting
RATE_LIMIT_ENABLED=True
RATE_LIMIT_DEFAULT=200 per day, 50 per hour
# Backup
BACKUP_ENABLED=True
BACKUP_DIR=backups
BACKUP_RETENTION=10