v2.6.0 历史分页+筛选+搜索+表头升降排序;一键清空历史(DELETE /api/tests);右下角置顶/置底悬浮按钮
This commit is contained in:
+48
-3
@@ -175,23 +175,62 @@
|
||||
|
||||
<div class="card">
|
||||
<div class="card-head">
|
||||
<h2>🗂 测试历史</h2>
|
||||
<h2>🗂 测试历史 <span class="hint" id="hist-total"></span></h2>
|
||||
<div class="log-actions">
|
||||
<span class="hint" id="hist-selected"></span>
|
||||
<button class="btn small primary" id="btn-compare">⚖️ 对比所选</button>
|
||||
<button class="btn small danger" id="btn-clear-history" title="一键清空全部历史记录(不可恢复)">🗑 清空历史</button>
|
||||
<button class="btn small" id="btn-refresh-history">刷新</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hist-filters">
|
||||
<div class="icon-input" style="flex:2;min-width:160px"><span class="icon">🔍</span><input id="hist-q" placeholder="搜索:编号/名称/模型/提供商/状态/时间"></div>
|
||||
<select id="hist-status" title="按状态筛选">
|
||||
<option value="">状态:全部</option>
|
||||
<option value="running">测试中</option>
|
||||
<option value="done">完成</option>
|
||||
<option value="error">出错</option>
|
||||
<option value="canceled">已取消</option>
|
||||
</select>
|
||||
<select id="hist-provider" title="按提供商筛选">
|
||||
<option value="">提供商:全部</option>
|
||||
<option value="openai">OpenAI 兼容</option>
|
||||
<option value="anthropic">Anthropic</option>
|
||||
<option value="google">Google Gemini</option>
|
||||
</select>
|
||||
<select id="hist-size" title="每页条数">
|
||||
<option value="10">10 条/页</option>
|
||||
<option value="20" selected>20 条/页</option>
|
||||
<option value="50">50 条/页</option>
|
||||
<option value="100">100 条/页</option>
|
||||
</select>
|
||||
<button class="btn small" id="hist-reset" title="清空筛选条件并回到第一页">✕ 重置</button>
|
||||
</div>
|
||||
<div class="table-wrap">
|
||||
<table class="history" id="history">
|
||||
<thead><tr>
|
||||
<th class="chk-col"><input type="checkbox" id="hist-check-all" title="全选"></th>
|
||||
<th>#</th><th>时间</th><th>名称</th><th>提供商</th><th>模型</th><th>并发</th><th>采样</th>
|
||||
<th>首字 ms</th><th>预填充 tok/s</th><th>解码 tok/s</th><th>状态</th><th>操作</th>
|
||||
<th class="sortable" data-sort="id" title="点击排序">#</th>
|
||||
<th class="sortable" data-sort="created_at" title="点击排序">时间</th>
|
||||
<th class="sortable" data-sort="name" title="点击排序">名称</th>
|
||||
<th class="sortable" data-sort="provider" title="点击排序">提供商</th>
|
||||
<th class="sortable" data-sort="model" title="点击排序">模型</th>
|
||||
<th>并发</th>
|
||||
<th class="sortable" data-sort="samples" title="点击排序">采样</th>
|
||||
<th class="sortable" data-sort="ttft" title="点击排序">首字 ms</th>
|
||||
<th class="sortable" data-sort="prefill" title="点击排序">预填充 tok/s</th>
|
||||
<th class="sortable" data-sort="decode" title="点击排序">解码 tok/s</th>
|
||||
<th class="sortable" data-sort="status" title="点击排序">状态</th>
|
||||
<th>操作</th>
|
||||
</tr></thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="hist-pager">
|
||||
<button class="btn small" id="hist-prev">◀ 上一页</button>
|
||||
<span class="hint" id="hist-page-info"></span>
|
||||
<button class="btn small" id="hist-next">下一页 ▶</button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
@@ -223,6 +262,12 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 右下角:一键置顶 / 置底 -->
|
||||
<div class="scroll-fab">
|
||||
<button class="fab" id="fab-top" title="回到顶部">⬆</button>
|
||||
<button class="fab" id="fab-bottom" title="滚到底部">⬇</button>
|
||||
</div>
|
||||
|
||||
<script src="/js/app.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user