mirror of
https://github.com/DRYTRIX/TimeTracker.git
synced 2026-05-04 11:29:37 -05:00
0ec6b8e9d6
This commit implements a comprehensive refactoring of the integration system to support both global (shared) and per-user integrations, adds new integrations, and improves the overall architecture. Key changes: - Add global integrations support: most integrations are now shared across all users (Jira, Slack, GitHub, Asana, Trello, GitLab, Microsoft Teams, Outlook Calendar, Xero) - Add new integrations: GitLab, Microsoft Teams, Outlook Calendar, and Xero - Database migrations: * Migration 081: Add OAuth credential columns for all integrations to Settings model * Migration 082: Add is_global flag to Integration model and make user_id nullable - Update Integration model to support global integrations with nullable user_id - Refactor IntegrationService to handle both global and per-user integrations - Create dedicated admin setup pages for each integration - Update Trello connector to use API key setup instead of OAuth flow - Enhance all existing integrations (Jira, Slack, GitHub, Google Calendar, Asana, Trello) with global support - Update routes, templates, and services to support the new global/per-user distinction - Improve integration management UI with better separation of global vs per-user integrations - Update scheduled tasks to work with the new integration architecture
37 lines
1.7 KiB
Python
37 lines
1.7 KiB
Python
"""
|
|
Integration connector registry.
|
|
Registers all available connectors with the IntegrationService.
|
|
"""
|
|
|
|
from app.services.integration_service import IntegrationService
|
|
from app.integrations.jira import JiraConnector
|
|
from app.integrations.slack import SlackConnector
|
|
from app.integrations.github import GitHubConnector
|
|
from app.integrations.google_calendar import GoogleCalendarConnector
|
|
from app.integrations.outlook_calendar import OutlookCalendarConnector
|
|
from app.integrations.microsoft_teams import MicrosoftTeamsConnector
|
|
from app.integrations.asana import AsanaConnector
|
|
from app.integrations.trello import TrelloConnector
|
|
from app.integrations.gitlab import GitLabConnector
|
|
from app.integrations.quickbooks import QuickBooksConnector
|
|
from app.integrations.xero import XeroConnector
|
|
|
|
|
|
def register_connectors():
|
|
"""Register all available connectors."""
|
|
IntegrationService.register_connector("jira", JiraConnector)
|
|
IntegrationService.register_connector("slack", SlackConnector)
|
|
IntegrationService.register_connector("github", GitHubConnector)
|
|
IntegrationService.register_connector("google_calendar", GoogleCalendarConnector)
|
|
IntegrationService.register_connector("outlook_calendar", OutlookCalendarConnector)
|
|
IntegrationService.register_connector("microsoft_teams", MicrosoftTeamsConnector)
|
|
IntegrationService.register_connector("asana", AsanaConnector)
|
|
IntegrationService.register_connector("trello", TrelloConnector)
|
|
IntegrationService.register_connector("gitlab", GitLabConnector)
|
|
IntegrationService.register_connector("quickbooks", QuickBooksConnector)
|
|
IntegrationService.register_connector("xero", XeroConnector)
|
|
|
|
|
|
# Auto-register on import
|
|
register_connectors()
|