feat: 更新后端平台模块、Compute引擎、前端组件及构建产物

- 更新 backend 平台 API、platform_store、compute_gateway sync
- 更新 compute agent/engine/adapter 及 API
- 更新 Docker 部署配置(app/compute)
- 新增 frontend/src/utils/ 工具模块
- 新增 scripts/ops_diagnostics.py 运维诊断脚本
- 新增 docs/2026-07-23-development-summary.md 开发总结
- 重构 frontend/dist 构建产物(新 hash)
- 更新前端多个视图组件及 API 模块

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
wuyongtao
2026-07-23 19:32:42 +08:00
parent f04dc479bb
commit b28cfbc6fa
193 changed files with 2647 additions and 424 deletions

View File

@@ -70,6 +70,10 @@ export interface ResourceReplica {
local_path: string
status: string
sync_status: string
checksum_sha256?: string
byte_size?: number
last_checked_at?: string
last_error?: string
create_time: string
}
@@ -95,3 +99,12 @@ export const getComputeGpus = () => get<ComputeGpu[]>('/compute/gpus')
export const getComputeQueue = () => get<ComputeQueueItem[]>('/compute/queue')
export const getNodeReplicas = (id: string) => get<ResourceReplica[]>(`/compute/nodes/${id}/replicas`)
export const checkNodeReplicaDrift = (id: string) =>
get<{ node_id: string; items: ResourceReplica[]; drifted: number }>(`/compute/nodes/${id}/replicas/drift`)
export const repairNodeReplicas = (id: string, replicaIds?: string[]) =>
post<{ sync: unknown; replicas: ResourceReplica[]; failed: Array<{ replica_id: string; error: string }> }>(
`/compute/nodes/${id}/replicas/repair`,
replicaIds?.length ? { replica_ids: replicaIds } : {},
)

View File

@@ -1,6 +1,45 @@
import { get, post, put, del } from '../request'
import type { ModelItem, ModelForm, TrainedModel } from '@/types'
export interface ModelArtifact {
id: string
model_id: string
model_kind: string
artifact_type: string
path: string
size_bytes: number
checksum_sha256?: string
metadata?: Record<string, unknown>
compute_job_id?: string
create_time?: string
}
export interface ModelLineageEdge {
id: string
child_resource_type: string
child_resource_id: string
parent_resource_type: string
parent_resource_id: string
relation_type: string
compute_job_id?: string
payload?: Record<string, unknown>
create_time?: string
}
export interface ModelExportJob {
id: string
trained_model_id?: string
compute_job_id: string
node_id?: string
export_type: string
quantization_bit: number
status: string
output_dir?: string
payload?: Record<string, unknown>
create_time?: string
completed_at?: string
}
/** 模型列表 */
export const getModelList = () => get<ModelItem[]>('/model-manage')
@@ -18,6 +57,17 @@ export const getLocalModels = () =>
export const getTrainedModels = () =>
get<{ models: TrainedModel[] }>('/model-manage/trained-models')
export const getTrainedModelArtifacts = (id: string | number) =>
get<ModelArtifact[]>(`/model-manage/trained-models/${id}/artifacts`)
export const getTrainedModelLineage = (id: string | number) =>
get<{ model_id: string; parents: ModelLineageEdge[]; children: ModelLineageEdge[] }>(
`/model-manage/trained-models/${id}/lineage`,
)
export const getModelExportJobs = (trainedModelId?: string | number) =>
get<ModelExportJob[]>('/model-manage/export-jobs', trainedModelId ? { trained_model_id: trainedModelId } : undefined)
/** 创建模型 */
export const createModel = (data: ModelForm) => post('/model-manage', data)