chore: adjust deployment modal form
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
import { StatusMaps } from '@/config';
|
||||
import { StatusType } from '@/config/types';
|
||||
|
||||
export const ClusterDataList = [
|
||||
{
|
||||
id: 3,
|
||||
@@ -6,6 +9,7 @@ export const ClusterDataList = [
|
||||
clusterType: 'Custom',
|
||||
workers: 4,
|
||||
gpus: 8,
|
||||
status: 'ready',
|
||||
deployments: 3
|
||||
},
|
||||
{
|
||||
@@ -15,6 +19,7 @@ export const ClusterDataList = [
|
||||
clusterType: 'Kubernetes',
|
||||
workers: 2,
|
||||
gpus: 4,
|
||||
status: 'ready',
|
||||
deployments: 1
|
||||
},
|
||||
{
|
||||
@@ -23,6 +28,34 @@ export const ClusterDataList = [
|
||||
provider: 'digitalocean',
|
||||
workers: 3,
|
||||
gpus: 6,
|
||||
status: 'error',
|
||||
deployments: 2
|
||||
}
|
||||
];
|
||||
|
||||
export const ClusterStatusValueMap = {
|
||||
Ready: 'ready',
|
||||
Error: 'error'
|
||||
};
|
||||
|
||||
export const ClusterStatusLabelMap = {
|
||||
[ClusterStatusValueMap.Ready]: 'Ready',
|
||||
[ClusterStatusValueMap.Error]: 'Error'
|
||||
};
|
||||
|
||||
export const ClusterStatus: Record<string, StatusType> = {
|
||||
[ClusterStatusValueMap.Ready]: StatusMaps.success,
|
||||
[ClusterStatusValueMap.Error]: StatusMaps.error
|
||||
};
|
||||
|
||||
export const ProviderValueMap = {
|
||||
Kubernetes: 'kubernetes',
|
||||
DigitalOcean: 'digitalocean',
|
||||
Custom: 'custom'
|
||||
};
|
||||
|
||||
export const ProviderLabelMap = {
|
||||
[ProviderValueMap.Kubernetes]: 'Kubernetes',
|
||||
[ProviderValueMap.DigitalOcean]: 'Digital Ocean',
|
||||
[ProviderValueMap.Custom]: 'Custom'
|
||||
};
|
||||
|
||||
@@ -18,16 +18,6 @@ export interface ListItem {
|
||||
updated_at: string;
|
||||
}
|
||||
|
||||
export interface ClusterListItem {
|
||||
name: string;
|
||||
provider: string;
|
||||
workers: number;
|
||||
created_at: string;
|
||||
gpus: number;
|
||||
deployments: number;
|
||||
id: number;
|
||||
}
|
||||
|
||||
export interface ClusterFormData {
|
||||
display_name: string;
|
||||
description: string;
|
||||
@@ -55,3 +45,19 @@ export interface NodePoolFormData {
|
||||
labels: Record<string, string>;
|
||||
cloud_options: Record<string, any>;
|
||||
}
|
||||
|
||||
export interface ClusterListItem {
|
||||
name: string;
|
||||
display_name: string;
|
||||
description: string;
|
||||
provider: string;
|
||||
credential_id: number;
|
||||
zone: string;
|
||||
region: string;
|
||||
gpus: number;
|
||||
deployments: number;
|
||||
id: number;
|
||||
status: string;
|
||||
state_message: string;
|
||||
worker_pools: NodePoolListItem[];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user