{% extends "aa_discord_audit/base.html" %} {% load i18n %} {% load static %} {% block page_title %} {% translate "Discord Audit Run" %} #{{ run.pk }} {% endblock %} {% block extra_javascript %} {% include "aa_discord_audit/_datatables_init.html" %} {% if not is_finished %} {% endif %} {% endblock %} {% block content %} {# The wrapper keeps id + data-poll-* so run_state_poll.js can scope #} {# its data-poll-field lookups; the card chrome is dropped to match #} {# the bare-table convention used across the audit views. #}
{% translate "AuditRun" %} #{{ run.pk }}
{% if meta.error_redacted %} {% endif %}
{% translate "State" %} {{ meta.state_badge.label }} {% if not is_finished %} {% translate "running" %} {% endif %}
{% translate "Triggered by" %} {{ run.triggered_by }}
{% translate "Triggered by user" %} {{ run.triggered_by_user|default:"—" }}
{% translate "Started" %} {{ run.started_at|date:"Y-m-d H:i:s" }}
{% translate "Finished" %} {% if run.finished_at %} {{ run.finished_at|date:"Y-m-d H:i:s" }} {% else %} — {% endif %}
{% translate "Members scanned" %} {{ run.members_scanned }}
{% translate "Findings" %} {{ run.findings_count }}
{% translate "Actions applied" %} {{ run.actions_applied }}
{% translate "Actions skipped" %} {{ run.actions_skipped }}
{% translate "Dry run" %} {% include "aa_discord_audit/_flag_badge.html" with badge=meta.dry_run_badge only %}
{% translate "First-run lock" %} {% include "aa_discord_audit/_flag_badge.html" with badge=meta.lock_badge only %}
{% translate "Confirmation bypassed" %} {% include "aa_discord_audit/_flag_badge.html" with badge=meta.bypass_badge only %}
{% translate "Error" %}
{{ meta.error_redacted }}
{% translate "Findings" %}
{% if can_view_findings %} {% translate "Download all findings (CSV)" %} {% endif %}
{% if not can_view_findings %}
{% translate "You lack the view_auditfinding permission; per-finding details are hidden." %}
{% else %}

{% blocktranslate with t=findings_summary.total k=findings_summary.kicked s=findings_summary.skipped e=findings_summary.errors %}{{ t }} findings: {{ k }} kicked, {{ s }} skipped, {{ e }} errors{% endblocktranslate %}

{# {% if finding_rows %}: skip DataTables when empty so #} {# the {% empty %} placeholder does not trip #} {# the "Incorrect column count" warning (tn/18). #} {% for row in finding_rows %} {% empty %} {% endfor %}
{% translate "Member ID" %} {% translate "Username" %} {% translate "Category" %} {% translate "State" %} {% translate "Action" %} {% translate "Kicked" %} {% translate "Skip reason" %} {% translate "Error" %}
{{ row.obj.member_id }} {{ row.obj.member_username }} {{ row.category_badge.label }} {{ row.state_badge.label }} {{ row.action_badge.label }} {% include "aa_discord_audit/_flag_badge.html" with badge=row.kicked_badge only %} {{ row.obj.skipped_reason|default:"—" }} {% if row.error_redacted %} {# Icon trigger opens the shared #payload-modal; the full #} {# (untruncated) error lives in the hidden source div and #} {# is cloned into the modal by payload_modal.js. #}
{{ row.error_redacted }}
{% else %} — {% endif %}
{# Icon-only link to the per-finding explanation page; the #} {# visible label is dropped, so the action name lives in #} {# title / aria-label for a11y + hover. #}
{% translate "No findings to display." %}
{% include "aa_discord_audit/_pagination.html" with page_obj=page_obj pagination_query=selected_filters only %} {% include "aa_discord_audit/_payload_modal.html" %} {% endif %} {% endblock %}