{% 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.strftime('%Y-%m-%d %H:%M') }}
{% endif %} {% else %}
{{ _('Connected') }}
{{ _('No') }}
{% endif %} {% if integration.last_sync_at %}
{{ _('Last Sync') }}
{{ integration.last_sync_at.strftime('%Y-%m-%d %H:%M') }} {% 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 %}

{{ event.created_at.strftime('%Y-%m-%d %H:%M:%S') }}

{% endfor %}
{% else %}

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

{% endif %}

{{ _('Actions') }}

{% endblock %}