feat(studio): 补齐剩余工作台聚合接口与真实对接
This commit is contained in:
44
frontend/src/api/studioDashboard.ts
Normal file
44
frontend/src/api/studioDashboard.ts
Normal file
@@ -0,0 +1,44 @@
|
||||
import { get } from './request';
|
||||
|
||||
export interface StudioDashboardLifecycleStep {
|
||||
name: string;
|
||||
description?: string | null;
|
||||
status?: string | null;
|
||||
}
|
||||
|
||||
export interface StudioDashboardChecklistItem {
|
||||
label: string;
|
||||
done: boolean;
|
||||
}
|
||||
|
||||
export interface StudioDashboardMetrics {
|
||||
todayRunCount: number;
|
||||
successRate: number;
|
||||
p50Latency?: string | null;
|
||||
estimatedCost?: string | null;
|
||||
}
|
||||
|
||||
export interface StudioDashboardRecentRun {
|
||||
id: string;
|
||||
name?: string | null;
|
||||
type?: string | null;
|
||||
status?: string | null;
|
||||
latency?: string | null;
|
||||
cost?: string | null;
|
||||
}
|
||||
|
||||
export interface StudioDashboard {
|
||||
projectName?: string | null;
|
||||
environment?: string | null;
|
||||
publishStatus?: string | null;
|
||||
lifecycleSteps: StudioDashboardLifecycleStep[];
|
||||
readinessChecklist: StudioDashboardChecklistItem[];
|
||||
metrics: StudioDashboardMetrics;
|
||||
recentRuns: StudioDashboardRecentRun[];
|
||||
warningTitle?: string | null;
|
||||
warningMessage?: string | null;
|
||||
}
|
||||
|
||||
export function getStudioDashboard() {
|
||||
return get<StudioDashboard>('/studio/dashboard');
|
||||
}
|
||||
Reference in New Issue
Block a user