feat: 增强处理历史页指标与上下文跳转
This commit is contained in:
@@ -9,6 +9,16 @@
|
||||
<p class="page-lead">按批次、产品和会话回看审核执行、结构化结论与通知留痕。</p>
|
||||
</section>
|
||||
|
||||
<section class="metric-grid">
|
||||
{% for item in history_metrics %}
|
||||
<article class="metric-card">
|
||||
<div class="metric-label">{{ item.label }}</div>
|
||||
<div class="metric-value">{{ item.value }}</div>
|
||||
<div class="metric-note">{{ item.note }}</div>
|
||||
</article>
|
||||
{% endfor %}
|
||||
</section>
|
||||
|
||||
<section class="panel">
|
||||
<div class="section-heading">
|
||||
<div>
|
||||
@@ -79,19 +89,55 @@
|
||||
<tr>
|
||||
<td>{{ row.log.id }}</td>
|
||||
<td>{{ row.log.scenario_name }}</td>
|
||||
<td>{{ row.log.product_name|default:"-" }}</td>
|
||||
<td>{{ row.log.batch_id|default:"-" }}</td>
|
||||
<td>{{ row.log.conversation_id|default:"-" }}</td>
|
||||
<td class="cell-min-220">
|
||||
{% if row.log.product_name %}
|
||||
<a href="{% url 'audit:list' %}?keyword={{ row.log.product_name }}">{{ row.log.product_name }}</a>
|
||||
{% else %}
|
||||
-
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="nowrap">
|
||||
{% if row.log.batch_id %}
|
||||
<a href="{% url 'documents:list' %}?keyword={{ row.log.batch_id }}">{{ row.log.batch_id }}</a>
|
||||
{% else %}
|
||||
-
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="cell-min-220">
|
||||
{% if row.log.conversation_id %}
|
||||
<a class="button" href="{% url 'chat:detail' row.log.conversation_id %}">查看会话 {{ row.log.conversation_id }}</a>
|
||||
{% else %}
|
||||
-
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ row.batch_scale }}</td>
|
||||
<td>{{ row.batch_status }}</td>
|
||||
<td>{{ row.conversation_status }}</td>
|
||||
<td>
|
||||
<span class="pill {% if row.batch_status == '已完成' %}pill-success{% elif row.batch_status == '待复核' %}pill-signal{% else %}pill-danger{% endif %}">
|
||||
{{ row.batch_status }}
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<span class="pill {% if row.conversation_status == 'success' %}pill-success{% elif row.conversation_status == 'failed' %}pill-danger{% else %}pill-signal{% endif %}">
|
||||
{{ row.conversation_status }}
|
||||
</span>
|
||||
</td>
|
||||
<td>{{ row.log.get_user_input_summary }}</td>
|
||||
<td>
|
||||
<span class="pill {% if row.log.status == 'success' %}pill-success{% else %}pill-danger{% endif %}">{{ row.log.get_status_display_text }}</span>
|
||||
</td>
|
||||
<td>{{ row.risk_status }}</td>
|
||||
<td>{{ row.notify_reason }}</td>
|
||||
<td>{{ row.notify_status }}</td>
|
||||
<td>
|
||||
<span class="pill {% if row.risk_status == 'high' %}pill-danger{% elif row.risk_status == 'medium' %}pill-signal{% elif row.risk_status == 'low' %}pill-success{% endif %}">
|
||||
{{ row.risk_status }}
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<span class="pill pill-accent">{{ row.notify_reason }}</span>
|
||||
</td>
|
||||
<td>
|
||||
<span class="pill {% if row.notify_status == 'sent' %}pill-success{% elif row.notify_status == 'failed' %}pill-danger{% else %}pill-signal{% endif %}">
|
||||
{{ row.notify_status }}
|
||||
</span>
|
||||
</td>
|
||||
<td>{{ row.log.model_name }}</td>
|
||||
<td>{{ row.log.created_at|date:"Y-m-d H:i" }}</td>
|
||||
<td><a class="button" href="{% url 'audit:detail' row.log.id %}">查看详情</a></td>
|
||||
|
||||
Reference in New Issue
Block a user