feat: 重构 Dashboard 为卡片式分组布局
表格布局替换为按分组展示的卡片式布局,新增 group 字段配置和 TargetBoard/TargetCard 等组件。模态框详情页支持时间范围筛选和分页,SummaryCards 减为 3 个。API 端点变更:trend/history 改用 from/to 参数,history 支持分页。recentSampleCount 硬编码为 30。
This commit is contained in:
@@ -15,26 +15,37 @@ export interface SummaryResponse {
|
||||
total: number;
|
||||
up: number;
|
||||
down: number;
|
||||
avgDurationMs: number | null;
|
||||
lastCheckTime: string | null;
|
||||
}
|
||||
|
||||
export interface RecentSample {
|
||||
timestamp: string;
|
||||
durationMs: number | null;
|
||||
up: boolean;
|
||||
}
|
||||
|
||||
export interface TargetStatus {
|
||||
id: number;
|
||||
name: string;
|
||||
type: string;
|
||||
target: string;
|
||||
group: string;
|
||||
interval: string;
|
||||
latestCheck: CheckResult | null;
|
||||
stats: TargetStats;
|
||||
sparkline: number[];
|
||||
recentSamples: RecentSample[];
|
||||
}
|
||||
|
||||
export interface TargetStats {
|
||||
totalChecks: number;
|
||||
availability: number;
|
||||
avgDurationMs: number | null;
|
||||
p99DurationMs: number | null;
|
||||
}
|
||||
|
||||
export interface HistoryResponse {
|
||||
items: CheckResult[];
|
||||
total: number;
|
||||
page: number;
|
||||
pageSize: number;
|
||||
}
|
||||
|
||||
export interface CheckResult {
|
||||
|
||||
Reference in New Issue
Block a user