{% extends "fatanalysis/base.html" %} {% load i18n %} {% block fatanalysis_content %}

{% trans "AFAT Sync & Ingestion Management" %}

{% trans "INIT Auth Scraper, Bulk Historical Ingestion & Credentials" %}
{% trans "Recorded Periods" %} ({{ periods|length }}) {% trans "Back to Dashboard" %}
{% trans "Initial Bulk Sync (Crawl All Historical Data)" %} {% trans "Automated" %}

{% trans "Crawl and ingest all historical corporation FAT reports from INIT Auth in a single pass. The scraper will query each month sequentially and atomically update the database." %}

{% csrf_token %}
{{ bulk_form.start_year }} {% trans "Earliest year to crawl" %}
{{ bulk_form.end_year }}
{{ bulk_form.end_month }}
{% trans "Sync Specific Monthly Period" %}

{% trans "Fetch or update participation metrics for a single designated month directly from INIT Auth." %}

{% csrf_token %}
{{ month_form.year }}
{{ month_form.month }}
{% trans "INIT Auth Connection & Credentials" %}
{% csrf_token %}
{{ config_form.corporation_id }} {% trans "Game of Drones: 98089258" %}
{{ config_form.corporation_name }}
{{ config_form.source_url }} {% trans "Base URL to INIT Auth AFAT (e.g. https://zero.the-initiative.rocks/fleet-activity-tracking/)" %}
{{ config_form.session_cookie }} {% trans "Active sessionid cookie from your browser session on INIT Auth. Kept securely on server." %}
{{ config_form.user_agent }}
{% trans "Sync Status & Diagnostics" %}
{% trans "Last Sync:" %}
{% if config.last_sync_at %} {{ config.last_sync_at|date:"Y-m-d H:i" }} UTC {% else %} {% trans "Never" %} {% endif %}
{% trans "Status:" %}
{% if config.last_sync_status == 'success' %} {% trans "Success" %} {% elif config.last_sync_status == 'never' %} {% trans "Not yet run" %} {% else %} {{ config.last_sync_status }} {% endif %}
{% trans "Session Cookie:" %}
{% if config.session_cookie %} {% trans "Configured" %} {% else %} {% trans "Missing" %} {% endif %}
{% trans "Recorded Periods:" %}
{{ periods|length }} {% trans "Periods" %}
{% trans "Sync Activity Log" %}
{% csrf_token %}
{{ config.last_sync_log|default:"No synchronization events recorded yet." }}
{% endblock %} {% block extra_javascript %} {{ block.super }} {% endblock %}