修改:webapp 只自动刷新统计信息,日志需手动刷新
- 定时器只更新统计信息,不自动加载日志记录 - 日志需要用户手动点击「刷新日志」或翻页按钮查看 - 避免在用户浏览历史记录时被自动刷新打断 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -483,13 +483,12 @@ func handleIndex(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
// 初始化
|
||||
loadTopics();
|
||||
// 不再自动刷新 topics 列表
|
||||
// 只自动刷新统计信息,不刷新日志
|
||||
setInterval(() => {
|
||||
if (currentTopic) {
|
||||
loadStats(currentTopic);
|
||||
loadLogs();
|
||||
}
|
||||
}, 3000); // 每 3 秒刷新日志
|
||||
}, 3000); // 每 3 秒刷新统计
|
||||
</script>
|
||||
</body>
|
||||
</html>`
|
||||
|
||||
Reference in New Issue
Block a user