mirror of
https://github.com/DRYTRIX/TimeTracker.git
synced 2026-05-05 03:49:52 -05:00
feat: Add project costs tracking and remove license server integration
Major Features: - Add project costs feature with full CRUD operations - Implement toast notification system for better user feedback - Enhance analytics dashboard with improved visualizations - Add OIDC authentication improvements and debug tools Improvements: - Enhance reports with new filtering and export capabilities - Update command palette with additional shortcuts - Improve mobile responsiveness across all pages - Refactor UI components for consistency Removals: - Remove license server integration and related dependencies - Clean up unused license-related templates and utilities Technical Changes: - Add new migration 018 for project_costs table - Update models: Project, Settings, User with new relationships - Refactor routes: admin, analytics, auth, invoices, projects, reports - Update static assets: CSS improvements, new JS modules - Enhance templates: analytics, admin, projects, reports Documentation: - Add comprehensive documentation for project costs feature - Document toast notification system with visual guides - Update README with new feature descriptions - Add migration instructions and quick start guides - Document OIDC improvements and Kanban enhancements Files Changed: - Modified: 56 files (core app, models, routes, templates, static assets) - Deleted: 6 files (license server integration) - Added: 28 files (new features, documentation, migrations)
This commit is contained in:
@@ -319,40 +319,6 @@ def create_app(config=None):
|
||||
else:
|
||||
app.logger.warning("AUTH_METHOD is %s but OIDC envs are incomplete; OIDC login will not work", auth_method)
|
||||
|
||||
# Initialize phone home function if enabled
|
||||
if app.config.get('LICENSE_SERVER_ENABLED', True):
|
||||
try:
|
||||
from app.utils.license_server import init_license_client, start_license_client, get_license_client
|
||||
|
||||
# Check if client is already running
|
||||
existing_client = get_license_client()
|
||||
if existing_client and existing_client.running:
|
||||
app.logger.info("Phone home function already running, skipping initialization")
|
||||
else:
|
||||
license_client = init_license_client(
|
||||
app_identifier=app.config.get('LICENSE_SERVER_APP_ID', 'timetracker'),
|
||||
app_version=app.config.get('LICENSE_SERVER_APP_VERSION', '1.0.0')
|
||||
)
|
||||
if start_license_client():
|
||||
app.logger.info("Phone home function started successfully")
|
||||
else:
|
||||
app.logger.warning("Failed to start phone home function")
|
||||
except Exception as e:
|
||||
app.logger.warning(f"Could not initialize phone home function: {e}")
|
||||
|
||||
# Register cleanup function for graceful shutdown
|
||||
@app.teardown_appcontext
|
||||
def cleanup_license_client(exception=None):
|
||||
"""Cleanup phone home function on app context teardown"""
|
||||
try:
|
||||
from app.utils.license_server import get_license_client, stop_license_client
|
||||
client = get_license_client()
|
||||
if client and client.running:
|
||||
app.logger.info("Stopping phone home function during app teardown")
|
||||
stop_license_client()
|
||||
except Exception as e:
|
||||
app.logger.warning(f"Error during license client cleanup: {e}")
|
||||
|
||||
# Register error handlers
|
||||
from app.utils.error_handlers import register_error_handlers
|
||||
register_error_handlers(app)
|
||||
|
||||
Reference in New Issue
Block a user