mirror of
https://github.com/DRYTRIX/TimeTracker.git
synced 2026-05-12 23:39:17 -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
49 lines
2.0 KiB
HTML
49 lines
2.0 KiB
HTML
{% extends "base.html" %}
|
|
{% from "components/ui.html" import page_header %}
|
|
|
|
{% block title %}{{ _('Integration Setup') }} - {{ app_name }}{% endblock %}
|
|
|
|
{% block content %}
|
|
{% set breadcrumbs = [
|
|
{'text': 'Admin', 'url': url_for('admin.admin_dashboard')},
|
|
{'text': 'Integrations'}
|
|
] %}
|
|
|
|
{{ page_header(
|
|
icon_class='fas fa-plug',
|
|
title_text='Integration Setup',
|
|
subtitle_text='Configure OAuth credentials for integrations',
|
|
breadcrumbs=breadcrumbs
|
|
) }}
|
|
|
|
<div class="bg-card-light dark:bg-card-dark p-6 rounded-lg shadow mb-6">
|
|
<p class="text-sm text-text-muted-light dark:text-text-muted-dark mb-4">
|
|
{{ _('Configure OAuth credentials for each integration. Global integrations are shared across all users.') }}
|
|
</p>
|
|
|
|
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
|
|
{% for provider_info in available_providers %}
|
|
{% set provider = provider_info.provider %}
|
|
{% set is_global = (provider != 'google_calendar') %}
|
|
<a href="{{ url_for('admin.integration_setup', provider=provider) }}"
|
|
class="block p-4 border border-border-light dark:border-border-dark rounded-lg hover:bg-background-light dark:hover:bg-background-dark transition-colors">
|
|
<div class="flex items-center justify-between mb-2">
|
|
<h3 class="font-semibold">{{ provider_info.display_name }}</h3>
|
|
{% if is_global %}
|
|
<span class="px-2 py-1 text-xs rounded bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200">
|
|
{{ _('Global') }}
|
|
</span>
|
|
{% else %}
|
|
<span class="px-2 py-1 text-xs rounded bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200">
|
|
{{ _('Per User') }}
|
|
</span>
|
|
{% endif %}
|
|
</div>
|
|
<p class="text-sm text-text-muted-light dark:text-text-muted-dark">{{ provider_info.description }}</p>
|
|
</a>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|
|
|