feat: 增强处理历史风险与通知状态展示
This commit is contained in:
@@ -21,7 +21,15 @@
|
||||
<label for="id_keyword">产品名称 / 批次号</label>
|
||||
<input id="id_keyword" type="text" name="keyword" value="{{ keyword }}" placeholder="例如:新型冠状病毒 或 SUB-20260604-001">
|
||||
</div>
|
||||
<div class="button-row" style="align-items: end;">
|
||||
<div>
|
||||
<label for="id_notify_status">通知状态</label>
|
||||
<select id="id_notify_status" name="notify_status">
|
||||
<option value="">全部状态</option>
|
||||
<option value="sent"{% if notify_status == "sent" %} selected{% endif %}>sent</option>
|
||||
<option value="failed"{% if notify_status == "failed" %} selected{% endif %}>failed</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="button-row">
|
||||
<button type="submit">筛选历史</button>
|
||||
<a class="button" href="{% url 'audit:list' %}">清空</a>
|
||||
</div>
|
||||
@@ -46,29 +54,33 @@
|
||||
<th>会话</th>
|
||||
<th>输入摘要</th>
|
||||
<th>状态</th>
|
||||
<th>风险状态</th>
|
||||
<th>通知状态</th>
|
||||
<th>模型</th>
|
||||
<th>时间</th>
|
||||
<th>详情</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for log in logs %}
|
||||
{% for row in history_rows %}
|
||||
<tr>
|
||||
<td>{{ log.id }}</td>
|
||||
<td>{{ log.scenario_name }}</td>
|
||||
<td>{{ log.product_name|default:"-" }}</td>
|
||||
<td>{{ log.batch_id|default:"-" }}</td>
|
||||
<td>{{ log.conversation_id|default:"-" }}</td>
|
||||
<td>{{ log.get_user_input_summary }}</td>
|
||||
<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>{{ row.log.get_user_input_summary }}</td>
|
||||
<td>
|
||||
<span class="pill {% if log.status == 'success' %}pill-success{% else %}pill-danger{% endif %}">{{ log.get_status_display_text }}</span>
|
||||
<span class="pill {% if row.log.status == 'success' %}pill-success{% else %}pill-danger{% endif %}">{{ row.log.get_status_display_text }}</span>
|
||||
</td>
|
||||
<td>{{ log.model_name }}</td>
|
||||
<td>{{ log.created_at|date:"Y-m-d H:i" }}</td>
|
||||
<td><a class="button" href="{% url 'audit:detail' log.id %}">查看详情</a></td>
|
||||
<td>{{ row.risk_status }}</td>
|
||||
<td>{{ row.notify_status }}</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>
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr><td colspan="10">暂无处理历史,先去执行一次审核任务。</td></tr>
|
||||
<tr><td colspan="12">暂无处理历史,先去执行一次审核任务。</td></tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user