{# Memory-shell forensics panel (取证 tab). Loaded into #memory-shell-forensics-panel by the page shell, and by itself while a forensics run is in flight: an htmx poll chain stops as soon as the element is replaced by a panel whose `running` set is empty. The refresh listener at the top is what makes a completed 处置 (or forensics run) update this table without a reload. #}
{% if error %}
{{ error }}
{% endif %} {% if not available %}
{{ _('Forensics unavailable') }}
{{ unavailable_reason or store_error }}
{% else %} {# ── status row ─────────────────────────────────────── #}
{{ _('Forensics:') }} {{ _('Enabled') if enabled else _('Disabled') }} {{ _('Heap dump:') }} {{ _('Enabled') if heap_dump_enabled else _('Disabled') }} {{ _('Index keeps:') }} {{ history }} {{ _('Dump bound:') }} {{ max_dump_mb }} MB {{ _('Artifacts:') }} {{ runs|length }} · {{ total_bytes }} {% if running %} {{ _('Forensics running for') }} {{ running|join(', ') }} {% endif %}
{{ _('Store:') }} {{ root }}
{# ── run forensics for one component ────────────────── #} {% if component and component.kind and component.name %}
{{ _('Run forensics') }}
{{ component.kind }}:{{ component.name }} @ {{ component.site_id }}
{{ _('The heap dump is written by the target JVM into the artifact directory; it can take minutes.') }}
{% else %}
{{ _('Open forensics from a finding on the detection tab (取证) to choose the component to dump. Each run stores a manifest, the class bytes when they exist, and optionally a heap dump.') }}
{% endif %} {# ── artifacts ──────────────────────────────────────── #}
{{ _('Forensics artifacts') }}
{% for run in runs %} {% else %} {% endfor %}
{{ _('Artifact') }} {{ _('Time') }} {{ _('Component') }} {{ _('Class') }} {{ _('Size') }} {{ _('Files') }} {{ _('Remediated') }} {{ _('Actions') }}
{{ run.artifact_id }}
{{ _('Manual') if run.trigger == 'manual' else _('Auto') }} {% if run.site_name %} · {{ run.site_name }}{% endif %}
{{ run.created_at }} {{ run.kind }} {{ run.name }} {{ run.class_name or _('Unknown') }} {% if run.on_disk %}
{{ _('On disk') }}
{% endif %}
{{ run.size }} {% if run.class_bytes_available %} {{ _('Class bytes') }} {% elif run.class_bytes_unavailable_reason %} {{ _('No class bytes') }} {% endif %} {% if run.heap_ok %} {{ _('Heap') }} {{ run.heap_size }} {% elif run.heap_error %} {{ _('Heap failed') }} {% endif %}
{{ run.file_count }} {{ _('file(s)') }}
{% if run.remediated %} {{ _('Removed') }} {% if run.remediation.at %}
{{ run.remediation.at }}
{% endif %} {% elif run.remediation %} {{ run.remediation.result }} {% if run.remediation.count > 1 %}
{{ run.remediation.count }} {{ _('attempts') }}
{% endif %} {% else %} {{ _('No') }} {% endif %}
{% for file in run.files %} {{ file.name }} {% endfor %}

{{ _('No forensics artifact has been stored yet.') }}

{% endif %}