Add machine filter on trade records and review list.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-10-17 22:15:22 +08:00
parent 7bf04e3c68
commit 3164a21348
3 changed files with 58 additions and 30 deletions
+22 -2
View File
@@ -2,7 +2,27 @@
{% block title %}交易复盘 · {{ app_name }}{% endblock %}
{% block content %}
<h2 style="margin:0 0 6px">交易记录与复盘</h2>
<p class="muted" style="margin:0 0 14px">参考 crypto_monitor 复盘流程:列表筛选 → 点开详情 → 四周期 K 线 + 入场形式标注。</p>
<p class="muted" style="margin:0 0 14px">列表可按机器筛选 → 点开详情 → 四周期 K 线 + 入场形式标注。</p>
<div class="card" style="margin-bottom:14px">
<form method="get" action="{{ url_for('records_page') }}" style="display:flex;gap:10px;align-items:center;flex-wrap:wrap">
<label class="muted" for="machine_id">机器</label>
<select name="machine_id" id="machine_id" style="min-width:200px">
<option value="">全部机器</option>
{% for m in machines %}
<option value="{{ m.id }}" {% if selected_machine_id == m.id %}selected{% endif %}>
{{ m.name }} #{{ m.id }}{% if m.online %} · 在线{% endif %}
</option>
{% endfor %}
</select>
<button type="submit" class="btn">筛选</button>
{% if selected_machine_id %}
<a class="btn secondary" href="{{ url_for('records_page') }}">清除</a>
{% endif %}
<span class="muted">共 {{ trades|length }} 条</span>
</form>
</div>
<div class="card">
<table>
<thead>
@@ -29,7 +49,7 @@
<td><a href="{{ url_for('record_detail', tid=t.id) }}">打开复盘</a></td>
</tr>
{% else %}
<tr><td colspan="11" class="muted">暂无数据。客户端上报成交后出现在此。</td></tr>
<tr><td colspan="11" class="muted">暂无数据。{% if selected_machine_id %}当前机器下没有成交。{% else %}客户端上报成交后出现在此。{% endif %}</td></tr>
{% endfor %}
</tbody>
</table>