64 lines
3.2 KiB
HTML
64 lines
3.2 KiB
HTML
{% extends "admin/layout.html" %}
|
|
{% block admin_title %}Review #{{ review.id_val() }}{% endblock admin_title %}
|
|
|
|
{% block content %}
|
|
<h1>Review #{{ review.id_val() }}</h1>
|
|
|
|
<table>
|
|
<tr><th>{{ t.reviews_status }}</th><td><span class="badge {{ review.status_badge_class() }}">{{ review.status_str() }}</span></td></tr>
|
|
<tr><th>{{ t.reviews_type }}</th><td>{{ review.review_type_str() }}</td></tr>
|
|
<tr><th>{{ t.reviews_input_path }}</th><td style="word-break:break-all;">{{ review.input_path_str() }}</td></tr>
|
|
<tr><th>{{ t.reviews_confidence }}</th><td>{% match review.confidence() %}{% when Some with (c) %}{{ c }}{% when None %}-{% endmatch %}</td></tr>
|
|
<tr><th>{{ t.reviews_created }}</th><td>{{ review.created_at_str() }}</td></tr>
|
|
{% match stats %}
|
|
{% when Some with (s) %}
|
|
<tr><th>{{ t.reviews_model }}</th><td>{{ s.model_name_str() }}</td></tr>
|
|
<tr><th>{{ t.reviews_llm_duration }}</th><td>{{ s.duration_display() }}</td></tr>
|
|
<tr><th>{{ t.reviews_tokens }}</th><td>{{ s.tokens_display() }}</td></tr>
|
|
{% when None %}
|
|
{% endmatch %}
|
|
</table>
|
|
|
|
{% if !error_message.is_empty() %}
|
|
<div style="margin: 1rem 0; padding: 1rem; background: #f8d7da; color: #721c24; border-radius: 6px;">
|
|
<strong>{{ t.reviews_error }}:</strong> {{ error_message }}
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div style="margin: 1rem 0; display: flex; gap: .5rem;">
|
|
{% if review.status_str() == "pending" %}
|
|
<form method="post" action="/admin/reviews/{{ review.id_val() }}/approve" style="display:inline;">
|
|
<button type="submit" style="padding:.4rem 1rem; background:#28a745; color:#fff; border:none; border-radius:4px; cursor:pointer;">{{ t.reviews_approve }}</button>
|
|
</form>
|
|
<form method="post" action="/admin/reviews/{{ review.id_val() }}/reject" style="display:inline;">
|
|
<button type="submit" style="padding:.4rem 1rem; background:#dc3545; color:#fff; border:none; border-radius:4px; cursor:pointer;">{{ t.reviews_reject }}</button>
|
|
</form>
|
|
{% endif %}
|
|
{% if review.status_str() == "failed" || review.status_str() == "processing" %}
|
|
<form method="post" action="/admin/reviews/{{ review.id_val() }}/requeue" style="display:inline;" onsubmit="return confirm('{{ t.reviews_requeue_confirm }}');">
|
|
<button type="submit" style="padding:.4rem 1rem; background:#17a2b8; color:#fff; border:none; border-radius:4px; cursor:pointer;">{{ t.reviews_requeue }}</button>
|
|
</form>
|
|
{% endif %}
|
|
</div>
|
|
|
|
{% if !context_pretty.is_empty() %}
|
|
<h2>{{ t.reviews_context }}</h2>
|
|
<pre style="background:#f4f4f4; padding:1rem; border-radius:6px; overflow-x:auto; font-size:.85rem;">{{ context_pretty }}</pre>
|
|
{% endif %}
|
|
|
|
{% if !result_pretty.is_empty() %}
|
|
<h2>{{ t.reviews_result }}</h2>
|
|
<pre style="background:#f4f4f4; padding:1rem; border-radius:6px; overflow-x:auto; font-size:.85rem;">{{ result_pretty }}</pre>
|
|
{% endif %}
|
|
|
|
<p style="margin-top:1rem;"><a href="/admin/reviews">← {{ t.reviews_back_to_list }}</a></p>
|
|
|
|
<style>
|
|
.badge-completed { background: #d4edda; color: #155724; }
|
|
.badge-failed { background: #f8d7da; color: #721c24; }
|
|
.badge-pending { background: #fff3cd; color: #856404; }
|
|
.badge-queued { background: #d1ecf1; color: #0c5460; }
|
|
.badge-processing { background: #cce5ff; color: #004085; }
|
|
</style>
|
|
{% endblock content %}
|