feat: cluster ux

This commit is contained in:
jialin
2025-09-16 11:26:17 +08:00
parent 4711c848f8
commit ed49e03802
11 changed files with 570 additions and 224 deletions
+12 -13
View File
@@ -1,8 +1,17 @@
export const ClusterDataList = [
{
id: 3,
name: 'Custom-cluster',
provider: 'custom',
clusterType: 'Custom',
workers: 4,
gpus: 8,
deployments: 3
},
{
id: 1,
name: 'custom-cluster',
provider: 'Custom',
name: 'kubernetes-cluster',
provider: 'kubernetes',
clusterType: 'Kubernetes',
workers: 2,
gpus: 4,
@@ -11,19 +20,9 @@ export const ClusterDataList = [
{
id: 2,
name: 'Digital-Ocean-cluster',
provider: 'Digital Ocean',
clusterType: 'Custom',
provider: 'digitalocean',
workers: 3,
gpus: 6,
deployments: 2
},
{
id: 3,
name: 'AutoDL-cluster',
provider: 'AutoDL',
clusterType: 'Custom',
workers: 4,
gpus: 8,
deployments: 3
}
];
+23 -6
View File
@@ -29,12 +29,29 @@ export interface ClusterListItem {
}
export interface ClusterFormData {
name: string;
display_name: string;
description: string;
provider: string;
credential: string;
credential_id: number;
zone: string;
region: string;
workers: number;
gpuPlan: string;
description?: string;
id?: number;
}
export interface NodePoolListItem {
id: number;
instance_type: string;
replicas: number;
batch_size: number;
labels: Record<string, string>;
cloud_options: Record<string, any>;
created_at: string;
updated_at: string;
}
export interface NodePoolFormData {
instance_type: string;
replicas: number;
batch_size: number;
labels: Record<string, string>;
cloud_options: Record<string, any>;
}