{% extends "data_hub/base_data_hub.html" %} {% block data_hub_content %}
Import Logs

Import #{{ log.id }} — {{ log.recipe_title or 'Unknown Recipe' }}

{% if log.recipe_id %} View Recipe {% endif %}
{# Meta row #}
Status
{% if log.status == 'success' %}✓ Success {% elif log.status == 'partial' %}⚠ Partial {% else %}✗ Failed{% endif %}
Match Rate
{{ match_pct or '—' }}{% if match_pct %}%{% endif %}
Extracted
{{ log.total_extracted or 0 }}
Matched
{{ log.matched_count or 0 }}
Unmatched
{{ log.unmatched_count or 0 }}
Duration
{{ (log.duration_ms / 1000)|round(1) if log.duration_ms else '—' }}{% if log.duration_ms %}s{% endif %}
{# Resolution tiers #} {% if tiers %}
Resolution Tiers
{% for tier, count in tiers.items() %}
{{ tier|replace('_',' ')|title }}
{{ count }}
{% endfor %}
{% endif %} {# Unmatched items — most important #} {% if unmatched %}
Unmatched Items ({{ unmatched|length }})
{% for item in unmatched %} {% endfor %}
Raw StringReason
{{ item.name if item is mapping else item }} {{ item.reason if item is mapping and item.reason else '—' }}
{% endif %} {# Matched items #} {% if matched %}
Matched Ingredients ({{ matched|length }})
{% for item in matched %} {% endfor %}
RawResolved ToTier
{{ item.raw if item is mapping else item }} {{ item.canonical if item is mapping else '—' }} {{ item.tier if item is mapping else '—' }}
{% endif %} {# Error message #} {% if log.error_message %}
Error Details
{{ log.error_message }}
{% endif %} {% endblock %}