{% extends "base.html" %} {% block title %}{{ integration.name }} - {{ _('Integration') }} - {{ app_name }}{% endblock %} {% block content %}

{{ integration.name }}

{{ integration.provider|title }}

{{ _('Back to Integrations') }}

{{ _('Integration Status') }}

{{ _('Status') }}
{% if integration.is_active %} {{ _('Active') }} {% else %} {{ _('Inactive') }} {% endif %}
{% if credentials %}
{{ _('Connected') }}
{{ _('Yes') }}
{% if credentials.expires_at %}
{{ _('Token Expires') }}
{{ credentials.expires_at|user_datetime }}
{% endif %} {% else %}
{{ _('Connected') }}
{{ _('No') }}
{% endif %} {% if integration.last_sync_at %}
{{ _('Last Sync') }}
{{ integration.last_sync_at|user_datetime }} {% if integration.last_sync_status %} {% if integration.last_sync_status == 'success' %} {{ _('Success') }} {% elif integration.last_sync_status == 'error' %} {{ _('Error') }} {% else %} {{ _('Pending') }} {% endif %} {% endif %}
{% endif %} {% if integration.last_error %}
{{ _('Last Error') }}
{{ integration.last_error[:100] }}{% if integration.last_error|length > 100 %}...{% endif %}
{% endif %}

{{ _('Sync History') }}

{% if recent_events %}
{% for event in recent_events %}
{{ event.event_type|replace('_', ' ')|title }} {% if event.status == 'success' %} {{ _('Success') }} {% elif event.status == 'error' %} {{ _('Error') }} {% else %} {{ _('Pending') }} {% endif %}
{% if event.message %}

{{ event.message }}

{% endif %} {% if event.event_metadata %}
{{ _('Details') }}
{{ event.event_metadata | tojson }}
{% endif %}

{{ event.created_at|user_datetime }}

{% endfor %}
{% else %}

{{ _('No sync events yet') }}

{% endif %}

{{ _('Actions') }}

{% if connector_error %}

{{ _('Connector Error') }}: {{ connector_error }}

{% if integration.provider == 'caldav_calendar' %} {{ _('Configure CalDAV Integration') }} → {% elif integration.provider == 'activitywatch' %} {{ _('Configure ActivityWatch') }} → {% endif %}
{% endif %}
{% if connector %}
{% endif %}
{% if integration.provider == 'caldav_calendar' %} {{ _('Edit Configuration') }} {% elif integration.provider == 'activitywatch' %} {{ _('Edit Configuration') }} {% endif %}
{% endblock %}