1
0

feat: 新增 target description 字段,收紧 id/name 长度,调整延迟列和名称列

This commit is contained in:
2026-05-17 18:42:46 +08:00
parent 7926514986
commit f7193e98ff
36 changed files with 385 additions and 58 deletions

View File

@@ -17,7 +17,11 @@
#### Scenario: targets 字段
- **WHEN** Dashboard 响应包含 targets
- **THEN** targets 数组中每个元素 SHALL 包含目标基本信息id、name、group、type、target、interval、latestCheck、stats、currentStreak 和 recentSamples 字段
- **THEN** targets 数组中每个元素 SHALL 包含目标基本信息id、name、description、group、type、target、interval、latestCheck、stats、currentStreak 和 recentSamples 字段,其中 description 为 null 或字符串
#### Scenario: target description 字段
- **WHEN** 某个 target 配置了 `description`
- **THEN** Dashboard targets 响应中对应元素 SHALL 返回该 description 值
#### Scenario: window 参数缺失
- **WHEN** 客户端请求 `GET /api/dashboard` 未提供 window 参数
@@ -105,7 +109,7 @@ Dashboard API SHALL 返回基于时间窗口计算的目标统计和连续状态
#### Scenario: TargetStatus 类型
- **WHEN** 前后端共享 `TargetStatus` 类型
- **THEN** 该类型 SHALL 包含 statstotalChecks、upChecks、downChecks、availability、currentStreak 和 recentSamples 字段
- **THEN** 该类型 SHALL 包含目标基本信息字段id、name、description、group、type、target、intervalstatstotalChecks、upChecks、downChecks、availability、currentStreak 和 recentSamples 字段,其中 description 类型为 null 或字符串
#### Scenario: TargetMetricsResponse 类型
- **WHEN** 前后端共享 `TargetMetricsResponse` 类型