mirror of
https://wget.la/https://github.com/leookun/cursor-byok
synced 2026-11-30 15:55:49 +08:00
feat(overview): 近4小时/近24小时移入自定义弹层,近4小时支持选择图表粒度
- 主时间栏移除近4小时/近24小时,改为自定义弹层顶部的快捷范围 - 近4小时点击后弹出粒度菜单:1分钟/15分钟/30分钟/1小时 - overview API 新增 bucket_ms 参数,支持客户端指定分桶粒度 - 指定粒度时桶数上限放宽至 1440,未指定时维持原自动逻辑
This commit is contained in:
1 parent
e0f9bd6780
commit
49a38ca857
11 files changed
+341
-37
No files matched your search
@@ -16,6 +16,7 @@ pub struct OverviewRange {
|
||||
start_ms: Option<i64>,
|
||||
end_ms: Option<i64>,
|
||||
model_hashes: Option<String>,
|
||||
bucket_ms: Option<i64>,
|
||||
}
|
||||
|
||||
pub async fn get(
|
||||
@@ -24,7 +25,12 @@ pub async fn get(
|
||||
) -> Result<Json<Overview>> {
|
||||
Ok(Json(
|
||||
service
|
||||
.overview(range.start_ms, range.end_ms, range.model_hashes.as_deref())
|
||||
.overview(
|
||||
range.start_ms,
|
||||
range.end_ms,
|
||||
range.model_hashes.as_deref(),
|
||||
range.bucket_ms,
|
||||
)
|
||||
.await?,
|
||||
))
|
||||
}
|
||||
@@ -327,8 +327,11 @@ impl ControlService {
|
||||
start_ms: Option<i64>,
|
||||
end_ms: Option<i64>,
|
||||
model_hashes: Option<&str>,
|
||||
bucket_ms: Option<i64>,
|
||||
) -> Result<Overview> {
|
||||
self.store.overview(start_ms, end_ms, model_hashes).await
|
||||
self.store
|
||||
.overview(start_ms, end_ms, model_hashes, bucket_ms)
|
||||
.await
|
||||
}
|
||||
|
||||
pub async fn create_models(&self, models: &[ModelConfigInput]) -> Result<Vec<ModelConfig>> {
|
||||
|
||||
Reference in new issue
Block a user