fix(usage): 完善 cache-affinity 时间线的用户名回退与模型空值兜底

- 当 auth 用户查询失败时回退到历史 username,避免时间线丢失用户信息
- SQL 投影对 usage.model 使用 COALESCE 兜底空值
- IntervalTimelineCard 在刷新间隔为 0 时跳过定时刷新
- Usage 页面关闭时间线卡片的自动轮询
This commit is contained in:
fawney19
2026-04-19 16:07:01 +08:00
parent 41b51f10a9
commit c302dfe42d
5 changed files with 107 additions and 6 deletions

View File

@@ -347,6 +347,9 @@ function handleVisibilityChange() {
stopRefreshTimer()
return
}
if (!props.refreshIntervalMs || props.refreshIntervalMs <= 0) {
return
}
void loadData()
scheduleNextRefresh()
}

View File

@@ -38,7 +38,7 @@
:title="intervalTimelineTitle"
:is-admin="isAdminPage"
:hours="intervalTimelineHours"
:refresh-interval-ms="30000"
:refresh-interval-ms="0"
/>
</div>