fix: display instance type spec
This commit is contained in:
@@ -47,6 +47,27 @@ export const generateRegisterCommand = (params: {
|
||||
--header 'Authorization: Bearer ${params.registrationToken}' | kubectl apply -f -`;
|
||||
};
|
||||
|
||||
export const instanceTypeFieldMap = {
|
||||
vram: 'VRAM',
|
||||
vcpus: 'vCPUs',
|
||||
ram: 'RAM',
|
||||
bootDisk: 'Boot Disk',
|
||||
scratchDisk: 'Scratch Disk',
|
||||
minDiskSize: 'Min Disk Size',
|
||||
size: 'Size'
|
||||
};
|
||||
|
||||
export const vendorIconMap = {
|
||||
amd: 'icon-amd',
|
||||
nvidia: 'icon-nvidia1',
|
||||
rockyLinux: 'icon-rocky-linux',
|
||||
almaLinux: 'icon-alma-linux',
|
||||
ubuntu: 'icon-ubuntu',
|
||||
centOs: 'icon-centos',
|
||||
debian: 'icon-debian',
|
||||
fedora: 'icon-fedora'
|
||||
};
|
||||
|
||||
export const providerList = [
|
||||
{
|
||||
label: 'clusters.provider.custom',
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
import icons from '@/components/icon-font/icons';
|
||||
import React from 'react';
|
||||
import { ProviderValueMap } from '.';
|
||||
|
||||
export default [
|
||||
{
|
||||
label: 'clusters.provider.custom',
|
||||
locale: true,
|
||||
value: ProviderValueMap.Custom,
|
||||
key: ProviderValueMap.Custom,
|
||||
icon: React.cloneElement(icons.Docker, {
|
||||
style: { color: 'var(--ant-color-primary)' }
|
||||
}),
|
||||
group: 'clusters.create.provider.self'
|
||||
},
|
||||
{
|
||||
label: 'Kubernetes',
|
||||
locale: false,
|
||||
value: ProviderValueMap.Kubernetes,
|
||||
key: ProviderValueMap.Kubernetes,
|
||||
icon: React.cloneElement(icons.KubernetesOutlined, {
|
||||
style: { color: 'var(--ant-color-primary)' }
|
||||
}),
|
||||
group: 'clusters.create.provider.self'
|
||||
},
|
||||
{
|
||||
label: 'DigitalOcean',
|
||||
locale: false,
|
||||
value: ProviderValueMap.DigitalOcean,
|
||||
key: ProviderValueMap.DigitalOcean,
|
||||
icon: React.cloneElement(icons.DigitalOcean, {
|
||||
style: {
|
||||
color: 'var(--ant-color-primary)'
|
||||
}
|
||||
}),
|
||||
group: 'clusters.create.provider.cloud'
|
||||
},
|
||||
{
|
||||
label: 'Huawei Cloud',
|
||||
locale: false,
|
||||
disabled: true,
|
||||
value: ProviderValueMap.HuaweiCloud,
|
||||
key: ProviderValueMap.HuaweiCloud,
|
||||
icon: icons.HuaweiCloud,
|
||||
description: 'Comming soon',
|
||||
group: 'clusters.create.provider.cloud'
|
||||
},
|
||||
{
|
||||
label: 'Ali Cloud',
|
||||
locale: false,
|
||||
disabled: true,
|
||||
value: ProviderValueMap.AliCloud,
|
||||
key: ProviderValueMap.AliCloud,
|
||||
icon: icons.AliCloud,
|
||||
description: 'Comming soon',
|
||||
group: 'clusters.create.provider.cloud'
|
||||
},
|
||||
{
|
||||
label: 'Tencent Cloud',
|
||||
locale: false,
|
||||
disabled: true,
|
||||
value: ProviderValueMap.TencentCloud,
|
||||
key: ProviderValueMap.TencentCloud,
|
||||
icon: icons.TencentCloud,
|
||||
description: 'Comming soon',
|
||||
group: 'clusters.create.provider.cloud'
|
||||
}
|
||||
];
|
||||
@@ -0,0 +1,17 @@
|
||||
export const RegionIcons: Record<string, string> = {
|
||||
nyc1: '🇺🇸',
|
||||
nyc2: '🇺🇸',
|
||||
nyc3: '🇺🇸',
|
||||
tor1: '🇨🇦',
|
||||
sfo1: '🇺🇸',
|
||||
sfo2: '🇺🇸',
|
||||
sfo3: '🇺🇸',
|
||||
atl1: '🇺🇸',
|
||||
sgp1: '🇸🇬',
|
||||
blr1: '🇮🇳',
|
||||
lon1: '🇬🇧',
|
||||
ams2: '🇳🇱',
|
||||
ams3: '🇳🇱',
|
||||
fra1: '🇩🇪',
|
||||
syd1: '🇦🇺'
|
||||
};
|
||||
@@ -14,7 +14,7 @@ export type ClusterStatusType = 0 | 1 | 3;
|
||||
export interface CredentialListItem {
|
||||
id: number;
|
||||
name: string;
|
||||
provider: string;
|
||||
provider: ProviderType;
|
||||
access_key: string;
|
||||
secret_key: string;
|
||||
description?: string;
|
||||
@@ -26,10 +26,12 @@ export interface NodePoolFormData {
|
||||
name: string;
|
||||
instance_type: string;
|
||||
os_image: string;
|
||||
image_name: string;
|
||||
replicas: number;
|
||||
batch_size: number;
|
||||
labels: Record<string, string>;
|
||||
cloud_options: Record<string, any>;
|
||||
instance_spec: Record<string, any>;
|
||||
}
|
||||
|
||||
export interface NodePoolListItem extends NodePoolFormData {
|
||||
|
||||
Reference in New Issue
Block a user