feat: add logging, marketplace, and admin enhancements
Database & Migrations: - Add application_logs table migration for hybrid cloud logging - Add companies table migration and restructure vendor relationships Logging System: - Implement hybrid logging system (database + file) - Add log_service for centralized log management - Create admin logs page with filtering and viewing capabilities - Add init_log_settings.py script for log configuration - Enhance core logging with database integration Marketplace Integration: - Add marketplace admin page with product management - Create marketplace vendor page with product listings - Implement marketplace.js for both admin and vendor interfaces - Add marketplace integration documentation Admin Enhancements: - Add imports management page and functionality - Create settings page for admin configuration - Add vendor themes management page - Enhance vendor detail and edit pages - Improve code quality dashboard and violation details - Add logs viewing and management - Update icons guide and shared icon system Architecture & Documentation: - Document frontend structure and component architecture - Document models structure and relationships - Add vendor-in-token architecture documentation - Add vendor RBAC (role-based access control) documentation - Document marketplace integration patterns - Update architecture patterns documentation Infrastructure: - Add platform static files structure (css, img, js) - Move architecture_scan.py to proper models location - Update model imports and registrations - Enhance exception handling - Update dependency injection patterns UI/UX: - Improve vendor edit interface - Update admin user interface - Enhance page templates documentation - Add vendor marketplace interface
This commit is contained in:
@@ -206,6 +206,55 @@ def create_admin_settings(db: Session) -> int:
|
||||
"description": "Enable maintenance mode",
|
||||
"is_public": True,
|
||||
},
|
||||
# Logging settings
|
||||
{
|
||||
"key": "log_level",
|
||||
"value": "INFO",
|
||||
"value_type": "string",
|
||||
"category": "logging",
|
||||
"description": "Application log level (DEBUG, INFO, WARNING, ERROR, CRITICAL)",
|
||||
"is_public": False,
|
||||
},
|
||||
{
|
||||
"key": "log_file_max_size_mb",
|
||||
"value": "10",
|
||||
"value_type": "integer",
|
||||
"category": "logging",
|
||||
"description": "Maximum log file size in MB before rotation",
|
||||
"is_public": False,
|
||||
},
|
||||
{
|
||||
"key": "log_file_backup_count",
|
||||
"value": "5",
|
||||
"value_type": "integer",
|
||||
"category": "logging",
|
||||
"description": "Number of rotated log files to keep",
|
||||
"is_public": False,
|
||||
},
|
||||
{
|
||||
"key": "db_log_retention_days",
|
||||
"value": "30",
|
||||
"value_type": "integer",
|
||||
"category": "logging",
|
||||
"description": "Number of days to retain logs in database",
|
||||
"is_public": False,
|
||||
},
|
||||
{
|
||||
"key": "file_logging_enabled",
|
||||
"value": "true",
|
||||
"value_type": "boolean",
|
||||
"category": "logging",
|
||||
"description": "Enable file-based logging",
|
||||
"is_public": False,
|
||||
},
|
||||
{
|
||||
"key": "db_logging_enabled",
|
||||
"value": "true",
|
||||
"value_type": "boolean",
|
||||
"category": "logging",
|
||||
"description": "Enable database logging for critical events",
|
||||
"is_public": False,
|
||||
},
|
||||
]
|
||||
|
||||
for setting_data in default_settings:
|
||||
@@ -219,6 +268,7 @@ def create_admin_settings(db: Session) -> int:
|
||||
key=setting_data["key"],
|
||||
value=setting_data["value"],
|
||||
value_type=setting_data["value_type"],
|
||||
category=setting_data.get("category"),
|
||||
description=setting_data.get("description"),
|
||||
is_public=setting_data.get("is_public", False),
|
||||
created_at=datetime.now(UTC),
|
||||
|
||||
Reference in New Issue
Block a user