1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/rainbond-rainbond-ui

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
cloud.js 49 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
HuSQ123 Отправлено 9 месяцев назад 2753a07
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817
/* eslint-disable prefer-destructuring */
/* eslint-disable prettier/prettier */
/* eslint-disable react/react-in-jsx-scope */
import { notification, Tooltip } from 'antd';
import { formatMessage, FormattedMessage } from 'umi-plugin-locale';
const aliyunRegionNames = [
{
RegionId: 'cn-qingdao',
RegionEndpoint: 'ecs.aliyuncs.com',
LocalName: '华北1(青岛)'
},
{
RegionId: 'cn-beijing',
RegionEndpoint: 'ecs.aliyuncs.com',
LocalName: '华北2(北京)'
},
{
RegionId: 'cn-zhangjiakou',
RegionEndpoint: 'ecs.cn-zhangjiakou.aliyuncs.com',
LocalName: '华北3(张家口)'
},
{
RegionId: 'cn-huhehaote',
RegionEndpoint: 'ecs.cn-huhehaote.aliyuncs.com',
LocalName: '华北5(呼和浩特)'
},
{
RegionId: 'cn-wulanchabu',
RegionEndpoint: 'ecs-cn-wulanchabu.aliyuncs.com',
LocalName: '华北6(乌兰察布)'
},
{
RegionId: 'cn-hangzhou',
RegionEndpoint: 'ecs.aliyuncs.com',
LocalName: '华东1(杭州)'
},
{
RegionId: 'cn-shanghai',
RegionEndpoint: 'ecs.aliyuncs.com',
LocalName: '华东2(上海)'
},
{
RegionId: 'cn-shenzhen',
RegionEndpoint: 'ecs.aliyuncs.com',
LocalName: '华南1(深圳)'
},
{
RegionId: 'cn-heyuan',
RegionEndpoint: 'ecs.cn-heyuan.aliyuncs.com',
LocalName: '华南2(河源)'
},
{
RegionId: 'cn-chengdu',
RegionEndpoint: 'ecs.cn-chengdu.aliyuncs.com',
LocalName: '西南1(成都)'
},
{
RegionId: 'cn-hongkong',
RegionEndpoint: 'ecs.aliyuncs.com',
LocalName: '中国(香港)'
},
{
RegionId: 'ap-northeast-1',
RegionEndpoint: 'ecs.ap-northeast-1.aliyuncs.com',
LocalName: '日本(东京)'
},
{
RegionId: 'ap-southeast-1',
RegionEndpoint: 'ecs.aliyuncs.com',
LocalName: '新加坡'
},
{
RegionId: 'ap-southeast-2',
RegionEndpoint: 'ecs.ap-southeast-2.aliyuncs.com',
LocalName: '澳大利亚(悉尼)'
},
{
RegionId: 'ap-southeast-3',
RegionEndpoint: 'ecs.ap-southeast-3.aliyuncs.com',
LocalName: '马来西亚(吉隆坡)'
},
{
RegionId: 'ap-southeast-5',
RegionEndpoint: 'ecs.ap-southeast-5.aliyuncs.com',
LocalName: '印度尼西亚(雅加达)'
},
{
RegionId: 'ap-south-1',
RegionEndpoint: 'ecs.ap-south-1.aliyuncs.com',
LocalName: '印度(孟买)'
},
{
RegionId: 'us-east-1',
RegionEndpoint: 'ecs.aliyuncs.com',
LocalName: '美国(弗吉尼亚)'
},
{
RegionId: 'us-west-1',
RegionEndpoint: 'ecs.aliyuncs.com',
LocalName: '美国(硅谷)'
},
{
RegionId: 'eu-west-1',
RegionEndpoint: 'ecs.eu-west-1.aliyuncs.com',
LocalName: '英国(伦敦)'
},
{
RegionId: 'me-east-1',
RegionEndpoint: 'ecs.me-east-1.aliyuncs.com',
LocalName: '阿联酋(迪拜)'
},
{
RegionId: 'eu-central-1',
RegionEndpoint: 'ecs.eu-central-1.aliyuncs.com',
LocalName: '德国(法兰克福)'
}
];
const createKubernetesSteps = {
Init: {
Title: formatMessage({id:'utils.cloud.createKubernetesSteps.Init.Title'}),
Description: formatMessage({id:'utils.cloud.createKubernetesSteps.Init.Description'}),
Status: ''
},
SelectZone: {
Title: formatMessage({id:'utils.cloud.createKubernetesSteps.SelectZone.Title'}),
Description: formatMessage({id:'utils.cloud.createKubernetesSteps.SelectZone.Description'}),
Status: ''
},
CreateVPC: {
Title: formatMessage({id:'utils.cloud.createKubernetesSteps.CreateVPC.Title'}),
Description: formatMessage({id:'utils.cloud.createKubernetesSteps.CreateVPC.Description'}),
Status: ''
},
CreateVSWitch: {
Title: formatMessage({id:'utils.cloud.createKubernetesSteps.CreateVSWitch.Title'}),
Description: formatMessage({id:'utils.cloud.createKubernetesSteps.CreateVSWitch.Description'}),
Status: ''
},
AllocateResource: {
Title: formatMessage({id:'utils.cloud.createKubernetesSteps.AllocateResource.Title'}),
Description: formatMessage({id:'utils.cloud.createKubernetesSteps.AllocateResource.Description'}),
Status: ''
},
CreateCluster: {
Title: formatMessage({id:'utils.cloud.createKubernetesSteps.CreateCluster.Title'}),
Description: formatMessage({id:'utils.cloud.createKubernetesSteps.CreateCluster.Description'}),
Status: ''
},
InitClusterConfig: {
Title: formatMessage({id:'utils.cloud.createKubernetesSteps.InitClusterConfig.Title'}),
Description: formatMessage({id:'utils.cloud.createKubernetesSteps.InitClusterConfig.Description'}),
Status: ''
},
UpdateKubernetes: {
Title: formatMessage({id:'utils.cloud.createKubernetesSteps.UpdateKubernetes.Title'}),
Description: formatMessage({id:'utils.cloud.createKubernetesSteps.UpdateKubernetes.Description'}),
Status: ''
},
InstallKubernetes: {
Title: formatMessage({id:'utils.cloud.createKubernetesSteps.InstallKubernetes.Title'}),
Description: formatMessage({id:'utils.cloud.createKubernetesSteps.InstallKubernetes.Description'}),
Status: ''
}
};
const updateKubernetesSteps = {
Init: {
Title: formatMessage({id:'utils.cloud.updateKubernetesSteps.Init.Title'}),
Description: formatMessage({id:'utils.cloud.updateKubernetesSteps.Init.Description'}),
Status: ''
},
InitClusterConfig: {
Title: formatMessage({id:'utils.cloud.updateKubernetesSteps.InitClusterConfig.Title'}),
Description: formatMessage({id:'utils.cloud.updateKubernetesSteps.InitClusterConfig.Description'}),
Status: ''
},
InstallKubernetes: {
Title: formatMessage({id:'utils.cloud.updateKubernetesSteps.InstallKubernetes.Title'}),
Description: formatMessage({id:'utils.cloud.updateKubernetesSteps.InstallKubernetes.Description'}),
Status: ''
},
UpdateKubernetes: {
Title: formatMessage({id:'utils.cloud.updateKubernetesSteps.UpdateKubernetes.Title'}),
Description: formatMessage({id:'utils.cloud.updateKubernetesSteps.UpdateKubernetes.Description'}),
Status: ''
}
};
const initRainbondSteps = {
Init: {
Title: formatMessage({id:'utils.cloud.initRainbondSteps.Init.Title'}),
Description: formatMessage({id:'utils.cloud.initRainbondSteps.Init.Description'}),
Status: ''
},
CheckCluster: {
Title: formatMessage({id:'utils.cloud.initRainbondSteps.CheckCluster.Title'}),
Description: formatMessage({id:'utils.cloud.initRainbondSteps.CheckCluster.Description'}),
Status: ''
},
CreateRDS: {
Title: formatMessage({id:'utils.cloud.initRainbondSteps.CreateRDS.Title'}),
Description: formatMessage({id:'utils.cloud.initRainbondSteps.CreateRDS.Description'}),
Status: ''
},
CreateNAS: {
Title: formatMessage({id:'utils.cloud.initRainbondSteps.CreateNAS.Title'}),
Description: formatMessage({id:'utils.cloud.initRainbondSteps.CreateNAS.Description'}),
Status: ''
},
CreateNASMount: {
Title: formatMessage({id:'utils.cloud.initRainbondSteps.CreateNASMount.Title'}),
Description: formatMessage({id:'utils.cloud.initRainbondSteps.CreateNASMount.Description'}),
Status: ''
},
CreateLoadBalancer: {
Title: formatMessage({id:'utils.cloud.initRainbondSteps.CreateLoadBalancer.Title'}),
Description: formatMessage({id:'utils.cloud.initRainbondSteps.CreateLoadBalancer.Description'}),
Status: ''
},
BoundLoadBalancer: {
Title: formatMessage({id:'utils.cloud.initRainbondSteps.BoundLoadBalancer.Title'}),
Description: formatMessage({id:'utils.cloud.initRainbondSteps.BoundLoadBalancer.Description'}),
Status: ''
},
SetSecurityGroup: {
Title: formatMessage({id:'utils.cloud.initRainbondSteps.SetSecurityGroup.Title'}),
Description: formatMessage({id:'utils.cloud.initRainbondSteps.SetSecurityGroup.Description'}),
Status: ''
},
AssignDefaultDomain: {
Title: formatMessage({id:'utils.cloud.initRainbondSteps.AssignDefaultDomain.Title'}),
Description: formatMessage({id:'utils.cloud.initRainbondSteps.AssignDefaultDomain.Description'}),
Status: ''
},
InitRainbondRegion: {
Title: formatMessage({id:'utils.cloud.initRainbondSteps.InitRainbondRegion.Title'}),
Description: formatMessage({id:'utils.cloud.initRainbondSteps.InitRainbondRegion.Description'}),
Status: ''
},
InitRainbondRegionOperator: {
Title: formatMessage({id:'utils.cloud.initRainbondSteps.InitRainbondRegionOperator.Title'}),
Description: formatMessage({id:'utils.cloud.initRainbondSteps.InitRainbondRegionOperator.Description'}),
Status: ''
},
InitRainbondRegionImageHub: {
Title: formatMessage({id:'utils.cloud.initRainbondSteps.InitRainbondRegionImageHub.Title'}),
Description: formatMessage({id:'utils.cloud.initRainbondSteps.InitRainbondRegionImageHub.Description'}),
Status: ''
},
InitRainbondRegionPackage: {
Title: formatMessage({id:'utils.cloud.initRainbondSteps.InitRainbondRegionPackage.Title'}),
Description: formatMessage({id:'utils.cloud.initRainbondSteps.InitRainbondRegionPackage.Description'}),
Status: ''
},
InitRainbondRegionRegionConfig: {
Title: formatMessage({id:'utils.cloud.initRainbondSteps.InitRainbondRegionRegionConfig.Title'}),
Description: formatMessage({id:'utils.cloud.initRainbondSteps.InitRainbondRegionRegionConfig.Description'}),
Status: ''
}
};
const aliyunIcon = (
<svg
t="1586160813949"
viewBox="0 0 3477 1024"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
p-id="5004"
width="100"
height="100"
>
<path
d="M2114.83544281 615.29113906c87.49367063-2.43037969 119.0886075-63.18987375 119.0886075-116.65822781L2233.92405031 177.822785l12.15189844 0 12.15189844-48.60759469L1998.177215 129.21519031l12.15189844 48.60759469 174.98734218 0 0 315.94936688c0 46.177215-34.02531656 75.34177219-82.63291125 75.34177218L2114.83544281 615.29113906 2114.83544281 615.29113906z"
fill="#ff6a00"
p-id="5005"
/>
<path
d="M2124.55696156 505.92405031c12.15189844-12.15189844 17.01265781-29.16455719 17.01265781-55.89873375L2141.56962031 221.56962031 2000.60759469 221.56962031l0 301.36708875 77.77215187 0C2097.822785 522.93670906 2114.83544281 518.07594969 2124.55696156 505.92405031zM2049.21519031 471.89873375L2049.21519031 270.177215l43.74683531 0L2092.96202563 445.16455719c0 19.44303844-7.29113906 26.7341775-24.30379782 26.7341775L2049.21519031 471.89873375z"
fill="#ff6a00"
p-id="5006"
/>
<path
d="M1803.74683531 126.78480969L1803.74683531 615.29113906l48.60759469 0 0-21.87341812L1852.35443 330.93670906 1852.35443 177.822785l58.32911437 0-36.45569625 153.11392406 0 0 0 0c14.58227813 12.15189844 41.31645563 43.74683531 41.31645563 97.21519032 0 53.46835406-31.59493687 72.9113925-41.31645563 77.77215187l0 51.03797437c26.7341775-2.43037969 92.35443-38.88607594 92.35443-126.37974656 0-53.46835406-19.44303844-89.92405031-36.45569625-114.22784812l43.74683532-189.56962032L1803.74683531 126.78480969z"
fill="#ff6a00"
p-id="5007"
/>
<path
d="M2350.58227813 566.68354437L2340.86075938 615.29113906l432.60759468 0-12.15189843-48.60759468-179.84810157 0 0-60.75949407 165.2658225 0-12.15189843-48.60759468-155.54430375 0L2579.03797437 396.55696156l111.79746844 0c53.46835406 0 80.20253156-26.7341775 80.20253156-80.20253156L2771.03797437 126.78480969 2340.86075938 126.78480969 2340.86075938 396.55696156l189.56962031 0 0 58.32911438-155.54430375 0-12.15189844 48.60759469 165.2658225 0L2528 566.68354437 2350.58227813 566.68354437zM2581.46835406 287.18987375l114.22784813 0-12.15189844-48.60759469-102.07594969 0L2581.46835406 177.822785l140.96202563 0 0 136.10126625c0 24.30379781-9.72151875 34.02531656-29.16455719 34.02531656l-111.79746844 0L2581.46835406 287.18987375zM2391.89873375 347.94936687L2391.89873375 177.822785l140.96202563 0 0 60.75949406-102.07594969 0-12.15189844 48.60759469 114.22784813 0L2532.86075937 347.94936687 2391.89873375 347.94936687z"
fill="#ff6a00"
p-id="5008"
/>
<path
d="M3242.53164594 126.78480969L2902.27848125 126.78480969 2890.12658187 177.822785 3254.68354438 177.822785Z"
fill="#ff6a00"
p-id="5009"
/>
<path
d="M2882.83544281 610.43037969l-2.43037969 4.86075937 332.96202563 0c19.44303844 0 34.02531656-4.86075937 43.74683531-17.01265781 9.72151875-14.58227813 7.29113906-31.59493687 2.43037969-41.31645562l0 0c-4.86075937-24.30379781-24.30379781-109.36708875-29.16455719-121.51898719l0-2.43037969-51.03797437 0 2.43037968 4.86075938c2.43037969 12.15189844 24.30379781 99.64557 29.16455719 128.81012625l-267.34177219 0c12.15189844-55.89873375 34.02531656-153.11392406 46.177215-199.29113907L3288.70886094 367.39240531l-12.15189844-48.60759468-408.30379781 0-12.15189844 48.60759468 82.63291125 0C2929.01265781 411.13924062 2899.84810156 532.65822781 2882.83544281 610.43037969z"
fill="#ff6a00"
p-id="5010"
/>
<path
d="M1947.13924062 902.07594969c-4.86075937 0-7.29113906 0-7.29113906-2.43037969 0-2.43037969-2.43037969-4.86075937-2.43037969-7.29113906l0-97.21519032c0-14.58227813-4.86075937-26.7341775-17.01265781-34.02531656-12.15189844-7.29113906-29.16455719-12.15189844-48.60759469-12.15189844-17.01265781 0-31.59493687 4.86075937-43.74683531 12.15189844-12.15189844 7.29113906-19.44303844 21.87341813-19.44303844 43.74683531l26.7341775 0c0-9.72151875 2.43037969-14.58227813 7.29113907-19.44303843 7.29113906-7.29113906 17.01265781-12.15189844 31.59493687-12.15189844 12.15189844 0 21.87341813 2.43037969 29.16455719 7.29113906 7.29113906 4.86075937 9.72151875 12.15189844 9.72151875 21.87341813 0 4.86075937 0 7.29113906-2.43037969 9.72151875-2.43037969 4.86075937-7.29113906 7.29113906-12.15189844 7.29113906l-43.74683531 4.86075937c-14.58227813 2.43037969-29.16455719 7.29113906-38.88607594 14.58227813-9.72151875 7.29113906-14.58227813 19.44303844-14.58227812 36.45569625 0 14.58227813 4.86075937 26.7341775 14.58227812 34.02531656 9.72151875 9.72151875 21.87341813 14.58227813 38.88607594 14.58227813 12.15189844 0 24.30379781-2.43037969 36.45569625-7.29113907 9.72151875-4.86075937 19.44303844-12.15189844 24.30379781-19.44303843 0 7.29113906 2.43037969 12.15189844 4.86075938 14.58227812 4.86075937 7.29113906 12.15189844 9.72151875 21.87341812 9.72151875 4.86075937 0 7.29113906 0 9.72151875 0 2.43037969 0 4.86075937 0 9.72151875-2.43037969l0-21.87341812c-2.43037969 0-2.43037969 0-4.86075937 0C1949.56962031 902.07594969 1949.56962031 902.07594969 1947.13924062 902.07594969zM1910.68354438 858.32911438c0 17.01265781-7.29113906 29.16455719-24.30379782 36.45569624-9.72151875 4.86075937-19.44303844 7.29113906-29.16455718 7.29113907-7.29113906 0-14.58227813-2.43037969-21.87341813-7.29113907-4.86075937-4.86075937-9.72151875-12.15189844-9.72151875-19.44303843 0-9.72151875 4.86075937-19.44303844 12.15189844-24.30379781 4.86075937-2.43037969 12.15189844-4.86075937 21.87341812-7.29113907l17.01265782-2.43037969c4.86075937 0 9.72151875-2.43037969 17.01265781-2.43037968 4.86075937-2.43037969 9.72151875-2.43037969 12.15189844-4.86075938L1905.822785 858.32911438z"
fill="#ff6a00"
p-id="5011"
/>
<path
d="M1986.02531656 690.63291125l29.16455719 0 0 228.45569625-29.16455719 0 0-228.45569625Z"
fill="#ff6a00"
p-id="5012"
/>
<path
d="M2054.07594969 753.822785l29.16455719 0 0 165.2658225-29.16455719 0 0-165.2658225Z"
fill="#ff6a00"
p-id="5013"
/>
<path
d="M2054.07594969 690.63291125l29.16455719 0 0 31.59493687-29.16455719 0 0-31.59493687Z"
fill="#ff6a00"
p-id="5014"
/>
<path
d="M2185.31645562 889.92405031l-43.74683531-136.10126625-31.59493687 0 60.75949406 172.55696157c-2.43037969 2.43037969-4.86075937 9.72151875-7.29113906 17.01265781-2.43037969 7.29113906-4.86075937 12.15189844-4.86075938 12.15189844-2.43037969 2.43037969-4.86075937 4.86075937-7.29113906 7.29113906-2.43037969 2.43037969-7.29113906 2.43037969-12.15189844 2.43037969-2.43037969 0-2.43037969 0-4.86075937 0-2.43037969 0-4.86075937 0-9.72151875-2.43037969l0 26.7341775c2.43037969 0 4.86075937 2.43037969 7.29113906 2.43037969 2.43037969 0 4.86075937 0 9.72151875 0 17.01265781 0 26.7341775-4.86075937 34.02531656-14.58227813 7.29113906-9.72151875 17.01265781-34.02531656 34.02531656-77.77215187 7.29113906-17.01265781 14.58227813-41.31645563 24.30379782-70.48101282 14.58227813-38.88607594 21.87341813-63.18987375 26.7341775-72.9113925l-31.59493688 0L2185.31645562 889.92405031z"
fill="#ff6a00"
p-id="5015"
/>
<path
d="M2389.46835406 834.02531656c0 17.01265781-2.43037969 29.16455719-4.86075937 38.88607594-7.29113906 17.01265781-19.44303844 26.7341775-38.88607594 26.7341775-12.15189844 0-21.87341813-4.86075937-26.7341775-14.58227813-2.43037969-4.86075937-4.86075937-12.15189844-4.86075938-21.87341812l0-111.79746844-29.16455718 0 0 114.22784813c0 14.58227813 2.43037969 26.7341775 7.29113906 34.02531656 7.29113906 17.01265781 24.30379781 24.30379781 48.60759469 24.30379781 14.58227813 0 26.7341775-4.86075937 38.88607593-12.15189844 4.86075937-4.86075937 9.72151875-9.72151875 12.15189844-17.01265781l0 24.30379781 26.7341775 1e-8 0-167.69620219L2389.46835406 751.39240531 2389.46835406 834.02531656z"
fill="#ff6a00"
p-id="5016"
/>
<path
d="M2542.58227812 748.96202562c-9.72151875 0-19.44303844 2.43037969-29.16455718 7.29113907-9.72151875 4.86075937-17.01265781 12.15189844-24.30379782 21.87341812l0-24.30379781L2462.37974656 753.822785l0 167.69620219 29.16455719 0 0-87.49367063c0-9.72151875 0-19.44303844 2.43037969-24.30379781 2.43037969-4.86075937 4.86075937-12.15189844 9.72151875-17.01265781 4.86075937-7.29113906 12.15189844-12.15189844 19.44303844-14.58227813 4.86075937-2.43037969 9.72151875-2.43037969 17.01265781-2.43037969 12.15189844 0 21.87341813 4.86075937 26.7341775 14.58227813 2.43037969 7.29113906 4.86075937 14.58227813 4.86075937 24.30379781l0 104.50632938 29.16455719 0 0-106.93670907c0-17.01265781-2.43037969-29.16455719-7.29113906-38.88607593C2583.89873375 758.68354438 2566.88607594 748.96202562 2542.58227812 748.96202562z"
fill="#ff6a00"
p-id="5017"
/>
<path
d="M2647.0886075 885.06329094l31.59493687 0 0 34.02531656-31.59493687 0 0-34.02531656Z"
fill="#ff6a00"
p-id="5018"
/>
<path
d="M2792.9113925 773.2658225c12.15189844 0 21.87341813 2.43037969 29.16455719 9.72151875 4.86075937 7.29113906 9.72151875 14.58227813 12.15189843 26.7341775l26.7341775 0c-2.43037969-21.87341813-9.72151875-38.88607594-21.87341812-46.177215-12.15189844-9.72151875-26.7341775-14.58227813-46.177215-14.58227813-21.87341813 0-41.31645563 7.29113906-53.46835406 24.30379782-14.58227813 17.01265781-21.87341813 38.88607594-21.87341813 68.05063312 0 24.30379781 7.29113906 43.74683531 19.44303844 60.75949406 12.15189844 17.01265781 29.16455719 24.30379781 51.03797437 24.30379782 19.44303844 0 36.45569625-4.86075937 48.60759469-14.58227813 12.15189844-9.72151875 19.44303844-26.7341775 24.30379781-48.60759469l-26.7341775 0c-2.43037969 12.15189844-7.29113906 21.87341813-14.58227812 29.16455719-7.29113906 7.29113906-17.01265781 9.72151875-26.7341775 9.72151875-14.58227813 0-26.7341775-4.86075937-34.02531656-17.01265781-7.29113906-12.15189844-9.72151875-24.30379781-9.72151875-41.31645563 0-17.01265781 2.43037969-31.59493687 7.29113906-41.31645562C2761.31645562 782.98734219 2773.46835406 773.2658225 2792.9113925 773.2658225z"
fill="#ff6a00"
p-id="5019"
/>
<path
d="M2953.31645562 748.96202562c-24.30379781 0-43.74683531 7.29113906-55.89873375 24.30379782-14.58227813 17.01265781-21.87341813 38.88607594-21.87341812 68.05063312 0 26.7341775 7.29113906 46.177215 19.44303844 63.18987375 14.58227813 14.58227813 31.59493687 24.30379781 53.46835406 24.30379781 26.7341775 0 48.60759469-9.72151875 60.75949406-26.7341775 12.15189844-17.01265781 19.44303844-38.88607594 19.44303844-65.62025343 0-26.7341775-7.29113906-48.60759469-21.87341813-63.18987375C2994.63291125 756.25316469 2975.18987375 748.96202562 2953.31645562 748.96202562zM2989.77215188 880.20253156c-7.29113906 14.58227813-19.44303844 21.87341813-38.88607594 21.87341813-17.01265781 0-29.16455719-4.86075937-36.45569625-17.01265782-7.29113906-12.15189844-12.15189844-26.7341775-12.15189844-43.74683531 0-19.44303844 4.86075937-34.02531656 12.15189844-46.177215 7.29113906-12.15189844 19.44303844-19.44303844 36.45569625-19.44303844 19.44303844 0 31.59493687 7.29113906 41.31645562 21.87341813 4.86075937 9.72151875 7.29113906 21.87341813 7.29113907 38.88607594C3001.92405031 851.03797438 2997.06329094 865.62025344 2989.77215188 880.20253156z"
fill="#ff6a00"
p-id="5020"
/>
<path
d="M3281.41772188 773.2658225c-7.29113906-17.01265781-24.30379781-24.30379781-46.177215-24.30379781-9.72151875 0-19.44303844 2.43037969-29.16455719 7.29113906-7.29113906 4.86075937-14.58227813 12.15189844-21.87341813 19.44303844-4.86075937-7.29113906-7.29113906-12.15189844-12.15189843-17.01265781-7.29113906-7.29113906-19.44303844-9.72151875-31.59493688-9.72151875-12.15189844 0-21.87341813 2.43037969-31.59493687 9.72151875-4.86075937 4.86075937-12.15189844 9.72151875-17.01265782 17.01265781l0-24.30379781-26.7341775 0 0 167.69620218 29.16455719 0 0-87.49367062c0-21.87341813 4.86075937-36.45569625 12.15189844-43.74683532 9.72151875-7.29113906 19.44303844-12.15189844 29.16455719-12.15189843 12.15189844 0 19.44303844 4.86075937 24.30379781 12.15189843 2.43037969 4.86075937 4.86075937 14.58227813 4.86075937 24.30379782l0 109.36708875 29.16455719 0 0-97.21519032c0-17.01265781 4.86075937-29.16455719 12.15189844-36.45569625 7.29113906-7.29113906 17.01265781-12.15189844 29.16455719-12.15189843 7.29113906 0 14.58227813 2.43037969 19.44303843 7.29113906 4.86075937 4.86075937 7.29113906 12.15189844 7.29113907 21.87341812l0 116.65822782 29.16455718 0L3291.13924063 809.72151875C3288.70886094 795.13924063 3286.27848125 782.98734219 3281.41772188 773.2658225z"
fill="#ff6a00"
p-id="5021"
/>
<path
d="M309.06329094 765.97468344c-31.59493687-7.29113906-55.89873375-34.02531656-55.89873375-68.05063313 0 0 0-371.84810156 0-374.27848125 2.43037969-34.02531656 24.30379781-60.75949406 55.89873375-68.05063312l347.54430375-75.34177219L693.06329094 32 289.62025344 32C146.22784812 32 32 146.22784812 32 287.18987375l0 442.32911438c0 140.96202563 116.65822781 257.62025344 257.62025344 257.62025343l403.44303844 0-36.45569625-148.25316468L309.06329094 765.97468344z"
fill="#ff6a00"
p-id="5022"
/>
<path
d="M1320.10126625 32L914.22784813 32l36.45569625 148.25316469 347.54430375 75.34177218c31.59493687 7.29113906 55.89873375 34.02531656 55.89873375 68.05063313 0 0 0 371.84810156 0 374.27848125-2.43037969 34.02531656-24.30379781 60.75949406-55.89873375 68.05063313l-347.54430375 75.34177218-36.45569625 148.25316469L1320.10126625 989.56962031c140.96202563 0 257.62025344-114.22784813 257.62025344-257.62025343L1577.72151875 287.18987375C1575.29113906 146.22784812 1461.06329094 32 1320.10126625 32z"
fill="#ff6a00"
p-id="5023"
/>
<path
d="M656.60759469 491.34177219l296.50632937 0 0 36.45569625-296.50632937 0 0-36.45569625Z"
fill="#ff6a00"
p-id="5024"
/>
</svg>
);
const amzonIcon = (
<svg
t="1586159729047"
viewBox="0 0 2548 1024"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
p-id="3719"
width="100"
height="100"
>
<path
d="M65.991111 154.168889c38.115556-31.857778 88.746667-41.528889 136.533333-40.391111 40.96 2.275556 84.764444 13.084444 114.915556 44.373333 21.617778 22.755556 29.582222 55.751111 30.151111 86.471111 1.137778 50.062222 0 99.555556 0.568889 149.617778 0.568889 21.048889-2.275556 43.235556 5.688889 63.146667 5.688889 15.36 15.928889 27.306667 24.462222 41.528889 3.982222 5.688889 5.12 15.36-1.137778 19.911111-19.342222 17.635556-39.253333 35.271111-58.595555 52.337777-5.12 5.12-13.653333 7.964444-19.911111 3.982223-19.342222-13.653333-32.995556-34.133333-45.511111-54.613334-23.324444 25.6-51.2 48.355556-84.764445 55.182223-35.271111 6.826667-73.955556 6.826667-106.382222-11.377778-26.737778-14.791111-44.942222-42.666667-51.2-72.248889-7.395556-34.133333-5.688889-70.542222 7.964444-102.4 14.791111-35.271111 45.511111-62.008889 80.213334-74.524445 44.373333-17.066667 92.728889-19.342222 139.377777-24.462222-0.568889-25.031111 3.413333-54.044444-13.653333-74.524444-29.582222-30.151111-89.884444-16.497778-101.262222 26.737778-2.275556 8.533333-4.551111 21.048889-15.36 21.048888-21.048889-1.706667-42.097778-4.551111-63.146667-6.826666-7.395556-1.137778-15.36-0.568889-21.617778-5.12-4.551111-3.982222-4.551111-10.24-3.413333-15.36 5.688889-31.857778 21.617778-62.008889 46.08-82.488889m89.884445 219.022222c-17.635556 9.671111-30.72 27.306667-34.133334 48.355556-3.413333 21.048889-1.706667 44.942222 12.515556 62.008889 13.653333 16.497778 38.115556 18.204444 56.32 9.102222 17.635556-8.533333 30.151111-26.168889 37.546666-44.373334 11.377778-28.444444 8.533333-60.302222 8.533334-91.022222-27.875556 0.568889-56.32 2.844444-80.782222 15.928889zM1114.453333 140.515556c40.96-23.893333 89.884444-29.582222 136.533334-25.031112 38.684444 4.551111 79.644444 19.342222 103.537777 52.906667 20.48 28.444444 22.755556 66.56 22.186667 100.693333v152.462223c0 18.204444 3.982222 35.84 13.084445 50.631111 5.688889 10.808889 14.222222 19.342222 19.342222 30.72 2.844444 6.257778 1.137778 13.653333-4.551111 17.635555-19.342222 17.066667-38.684444 34.133333-57.457778 51.2-5.688889 5.688889-14.791111 8.533333-21.617778 3.413334-18.204444-14.222222-31.857778-33.564444-44.373333-53.475556-23.324444 25.031111-50.631111 47.786667-84.195556 54.613333-36.408889 6.826667-77.368889 7.395556-110.364444-12.515555-26.737778-15.928889-43.804444-44.942222-49.493334-75.662222-5.688889-32.995556-3.982222-68.266667 10.24-98.986667 15.36-35.271111 47.217778-60.871111 81.92-73.955556 43.804444-15.928889 90.453333-18.204444 136.533334-23.324444-0.568889-21.617778 2.844444-44.942222-6.826667-65.991111-9.671111-18.773333-31.288889-26.737778-50.062222-25.031111-24.462222 0.568889-50.062222 15.928889-56.888889 42.097778-2.275556 8.533333-4.551111 20.48-14.791111 21.617777-25.031111-2.275556-50.062222-5.12-75.093333-7.964444-7.395556-0.568889-14.791111-5.688889-14.222223-14.222222 5.12-42.666667 30.72-81.351111 66.56-101.831111M1182.151111 375.466667c-18.204444 10.808889-30.151111 31.288889-31.857778 52.337777-1.706667 19.342222 0 41.528889 13.653334 56.32 13.653333 16.497778 38.115556 18.204444 56.32 9.102223 18.204444-8.533333 30.151111-26.737778 37.546666-44.942223 10.808889-28.444444 8.533333-60.302222 7.964445-90.453333-29.013333 0-58.595556 2.275556-83.626667 17.635556zM583.68 135.964444c28.444444-19.911111 65.991111-22.755556 97.848889-12.515555 31.857778 10.808889 52.906667 40.96 65.422222 71.68 8.533333-23.324444 23.324444-44.373333 44.373333-58.595556 46.08-31.288889 114.915556-23.893333 150.755556 21.048889 21.617778 26.737778 25.031111 63.146667 24.462222 96.711111-1.137778 101.831111-0.568889 203.662222-0.568889 305.493334 1.137778 9.102222-7.395556 16.497778-15.36 15.36-26.168889 0-51.768889 0.568889-77.937777 0-9.102222 0-15.36-9.102222-14.222223-18.204445 0-87.04-0.568889-174.08 0.568889-261.12-0.568889-21.048889 0.568889-46.08-15.36-62.008889-19.911111-17.066667-52.337778-13.084444-69.404444 6.826667-15.928889 18.204444-15.928889 43.804444-17.066667 67.128889v248.604444c0.568889 7.964444-4.551111 17.635556-12.515555 17.635556-23.893333 1.137778-48.355556 0-72.248889 0.568889-6.257778-0.568889-14.222222 1.137778-18.773334-3.982222-4.551111-3.982222-4.551111-11.377778-4.551111-17.066667V340.764444c0-27.306667 2.275556-55.751111-3.982222-82.488888-3.413333-13.084444-10.808889-26.737778-23.324444-32.426667-14.791111-6.257778-31.857778-5.688889-46.08 2.275555s-21.048889 24.462222-24.462223 40.391112c-5.12 26.168889-3.982222 52.337778-4.551111 78.506666v212.764445c0.568889 8.533333-7.395556 15.928889-15.36 15.36-25.031111 0.568889-50.062222 0-75.093333 0-6.826667 0.568889-14.791111-2.844444-17.066667-10.24-1.137778-6.826667-0.568889-13.653333-0.568889-20.48V143.36c-1.137778-9.102222 6.257778-17.066667 14.791111-16.497778 23.893333-0.568889 48.355556-0.568889 72.248889 0 7.964444-0.568889 15.928889 5.688889 15.928889 14.222222 0.568889 18.773333 0 36.977778 0.568889 55.751112 7.964444-23.324444 21.048889-46.648889 41.528889-60.871112zM1943.893333 121.742222c42.097778-9.102222 87.608889-3.413333 124.586667 19.342222 34.702222 21.617778 59.733333 57.457778 73.955556 96.711112 17.635556 48.924444 22.186667 101.831111 17.066666 153.031111-6.257778 56.888889-28.444444 114.346667-71.111111 152.462222-59.164444 54.044444-157.013333 54.044444-215.04-1.706667-40.96-38.684444-60.302222-96.142222-66.56-151.893333-6.257778-63.146667 0.568889-129.137778 30.72-184.888889 22.186667-41.528889 60.871111-73.955556 106.382222-83.057778m25.6 83.057778c-16.497778 3.982222-29.013333 18.204444-35.271111 34.133333-12.515556 31.288889-12.515556 65.422222-13.653333 98.417778 0.568889 34.702222 0.568889 69.404444 9.102222 102.968889 3.982222 16.497778 10.808889 33.564444 23.324445 44.373333 18.204444 16.497778 48.355556 13.653333 64.853333-3.982222 11.377778-12.515556 17.635556-29.582222 21.048889-46.08 5.688889-26.168889 6.257778-52.906667 6.257778-80.213333 0.568889-33.564444-1.137778-67.128889-8.533334-99.555556-3.413333-14.791111-8.533333-30.151111-19.911111-40.391111-12.515556-10.24-31.288889-12.515556-47.217778-9.671111zM2367.146667 136.533333c26.737778-19.911111 62.577778-22.186667 93.866666-14.791111 34.702222 7.964444 62.577778 37.546667 72.248889 73.386667 8.533333 31.857778 9.102222 65.422222 9.102222 97.848889v266.808889c0.568889 9.102222-7.964444 16.497778-16.497777 15.36h-77.937778c-9.102222 0.568889-14.791111-9.671111-13.653333-18.204445 0.568889-82.488889-0.568889-166.115556 0.568888-248.604444-1.137778-23.893333-0.568889-50.062222-14.222222-69.973334-15.36-21.617778-50.062222-21.048889-67.128889-2.275555-19.342222 20.48-23.324444 50.631111-24.462222 77.937778-0.568889 80.782222 0 161.564444-0.568889 242.346666 1.137778 10.24-7.964444 19.342222-17.635555 18.773334H2235.733333c-8.533333 0.568889-16.497778-6.826667-15.928889-15.36V143.36c-1.137778-9.671111 7.395556-17.066667 15.928889-16.497778 22.755556-0.568889 46.08 0 68.835556 0 7.964444-0.568889 17.635556 3.982222 17.066667 13.653334 0.568889 21.048889 0 43.235556 0.568888 64.284444 10.808889-25.6 22.755556-51.768889 44.942223-68.266667zM1471.715556 140.515556c0-9.102222 7.964444-15.36 15.928888-14.222223h256c7.964444-0.568889 15.36 6.257778 14.791112 14.222223 0.568889 15.928889 0 32.426667 0 48.355555 0.568889 13.084444-7.964444 23.893333-14.222223 34.702222-46.08 68.266667-92.16 137.102222-138.24 205.368889 50.062222-1.706667 101.831111 6.257778 146.204445 32.426667 9.671111 4.551111 15.36 15.928889 14.791111 27.306667v60.302222c0.568889 8.533333-6.257778 17.066667-14.791111 16.497778-7.964444-2.844444-15.36-7.395556-23.324445-10.808889-74.524444-33.564444-163.271111-33.564444-237.226666 1.706666-7.395556 3.413333-13.653333 7.964444-21.617778 9.671111-7.964444-0.568889-14.222222-9.102222-13.653333-17.066666V485.831111c0-14.222222 3.413333-29.013333 11.946666-41.528889 50.631111-75.662222 101.262222-151.893333 152.462222-226.986666h-133.12c-8.533333 1.137778-17.066667-6.257778-15.928888-15.928889-0.568889-21.048889-0.568889-40.96 0-60.871111z"
p-id="3720"
fill="#1296db"
/>
<path
d="M1561.6 597.333333c37.546667-5.688889 76.231111-6.257778 113.208889 2.275556 10.24 2.844444 21.617778 5.12 29.013333 13.084444 6.257778 11.946667 4.551111 26.737778 4.551111 39.822223-3.413333 44.373333-17.066667 88.177778-37.546666 128-13.084444 25.031111-29.582222 48.355556-50.631111 66.56-5.12 3.982222-12.515556 7.964444-18.204445 3.982222-2.275556-3.982222-2.844444-7.964444-1.137778-11.946667 15.36-41.528889 31.857778-82.488889 40.391111-126.862222 2.275556-15.928889 6.826667-33.564444-1.137777-48.355556-9.102222-11.377778-24.462222-11.946667-37.546667-14.222222-45.511111-3.982222-90.453333 2.844444-135.395556 7.395556-5.12 1.137778-11.946667-1.706667-12.515555-7.964445 1.137778-7.964444 7.964444-12.515556 13.653333-17.066666 28.444444-18.204444 60.871111-29.013333 93.297778-34.702223z"
fill="#1296db"
p-id="3721"
/>
<path
d="M367.502222 622.933333c9.671111-4.551111 19.342222 3.982222 27.875556 8.533334 164.977778 97.28 349.866667 154.168889 538.168889 171.804444 206.506667 19.342222 416.995556-15.36 609.28-96.711111 11.946667-5.12 26.737778-13.653333 39.253333-4.551111 12.515556 7.964444 9.671111 27.306667-1.706667 34.702222-84.764444 64.853333-183.182222 108.088889-284.444444 137.102222-142.791111 40.391111-294.684444 48.355556-440.32 20.48-180.906667-32.995556-351.573333-120.035556-487.537778-248.035555-6.826667-6.826667-9.102222-18.773333-0.568889-23.324445z"
fill="#1296db"
p-id="3722"
/>
</svg>
);
const huaweiIcon = (
<svg
t="1586163751977"
viewBox="0 0 3328 1024"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
p-id="6167"
width="100"
height="100"
>
<path
d="M1497.6 704h236.8v-57.6h57.6v57.6h243.2v64H1792v160h-57.6V768h-236.8v-64z m339.2-57.6c-38.4 0-64-19.2-64-64v-38.4c-25.6 12.8-51.2 19.2-76.8 32l-32-51.2c44.8-19.2 76.8-32 108.8-44.8V332.8h57.6v121.6c57.6-32 108.8-64 140.8-102.4l38.4 44.8c-51.2 44.8-115.2 89.6-185.6 121.6v51.2c0 12.8 6.4 19.2 19.2 19.2h83.2c12.8 0 25.6-6.4 32-12.8 6.4-6.4 12.8-32 19.2-70.4l57.6 19.2c-6.4 57.6-19.2 89.6-32 102.4-12.8 12.8-32 19.2-64 19.2h-102.4z m-262.4-140.8c-25.6 19.2-44.8 38.4-70.4 51.2l-19.2-64c76.8-44.8 134.4-102.4 166.4-172.8l51.2 25.6c-19.2 38.4-38.4 70.4-70.4 102.4v217.6h-57.6V505.6z m620.8-166.4c32 38.4 64 70.4 83.2 102.4l-44.8 32c-19.2-32-51.2-64-83.2-102.4l44.8-32z m217.6 275.2c38.4 51.2 76.8 89.6 96 128l-51.2 38.4c-25.6-44.8-57.6-89.6-96-134.4l51.2-32z m-89.6-288h57.6v153.6h249.6c0 192-6.4 313.6-25.6 364.8-19.2 51.2-44.8 76.8-89.6 76.8-32 0-57.6 0-83.2-6.4l-12.8-57.6c38.4 6.4 64 6.4 89.6 6.4s44.8-38.4 51.2-102.4c6.4-76.8 6.4-147.2 6.4-217.6H2368c-12.8 83.2-25.6 147.2-51.2 204.8-38.4 76.8-96 134.4-179.2 179.2l-32-57.6c83.2-44.8 140.8-102.4 166.4-166.4 19.2-44.8 32-96 38.4-160h-185.6v-64h192V326.4h6.4z m460.8 32h441.6v57.6h-441.6v-57.6z m-57.6 179.2h556.8v64h-294.4c-51.2 115.2-102.4 192-140.8 243.2 102.4-6.4 198.4-19.2 300.8-32-19.2-38.4-44.8-76.8-64-115.2l44.8-32c57.6 83.2 96 160 128 230.4l-51.2 38.4c-12.8-32-25.6-51.2-32-64-121.6 19.2-256 32-403.2 44.8l-12.8-64c6.4 0 12.8-6.4 12.8-6.4 38.4-32 89.6-108.8 147.2-236.8h-198.4l6.4-70.4z"
fill="#56606F"
p-id="6168"
/>
<path
d="M601.6 6.4C531.2 6.4 467.2 38.4 422.4 89.6c-70.4 96-19.2 230.4 19.2 307.2s211.2 352 217.6 358.4c6.4 6.4 12.8 6.4 12.8 0s19.2-409.6 6.4-505.6c-19.2-89.6-44.8-166.4-76.8-243.2zM224 192c-12.8 0-102.4 96-115.2 179.2s32 147.2 134.4 217.6c108.8 76.8 358.4 211.2 364.8 204.8 6.4-12.8-96-192-185.6-326.4S236.8 192 224 192zM256 1011.2c76.8 32 198.4-44.8 230.4-64l89.6-64-435.2 12.8c25.6 44.8 64 83.2 115.2 115.2z m12.8-352C192 620.8 32 531.2 25.6 531.2c-6.4 0-32 115.2 19.2 198.4s147.2 108.8 192 115.2c51.2 6.4 345.6 6.4 345.6 0-6.4-6.4-236.8-147.2-313.6-185.6z m716.8-569.6C940.8 38.4 876.8 6.4 806.4 6.4c-32 76.8-57.6 153.6-70.4 236.8-12.8 96 6.4 505.6 6.4 505.6 0 6.4 6.4 6.4 12.8 0s185.6-288 217.6-358.4 83.2-204.8 12.8-300.8z m403.2 441.6c-6.4 0-166.4 89.6-243.2 128-76.8 38.4-307.2 179.2-313.6 185.6 0 6.4 294.4 6.4 345.6 0 44.8-6.4 140.8-32 192-115.2 44.8-83.2 19.2-198.4 19.2-198.4z m-467.2 416c32 19.2 153.6 96 230.4 64 51.2-25.6 89.6-70.4 115.2-121.6l-435.2-12.8 89.6 70.4z m377.6-576C1292.8 288 1196.8 192 1184 192s-121.6 140.8-204.8 275.2-185.6 313.6-179.2 326.4c6.4 12.8 256-128 364.8-204.8 102.4-70.4 140.8-128 134.4-217.6z"
fill="#EA020A"
p-id="6169"
/>
</svg>
);
const providers = [
{
id: 'ack',
name: formatMessage({id:'utils.providers.name'}),
icon: aliyunIcon,
describe: formatMessage({id:'utils.providers.describe'}),
disable: false
}
// {
// id: 'eks',
// name: 'Amazon EKS',
// icon: amzonIcon,
// describe: 'Amazon EKS 即将支持',
// disable: true
// },
// {
// id: 'cce',
// name: '华为云 CCE',
// icon: huaweiIcon,
// describe: '华为云 CCE 即将支持',
// disable: true
// }
];
const cloud = {
getAliyunRegionName(id) {
let regionName = id;
aliyunRegionNames.map(item => {
if (item.RegionId === id) {
regionName = item.LocalName;
}
});
return regionName;
},
getAllAliyunRegions() {
return aliyunRegionNames;
},
getAliyunClusterName(n) {
switch (n) {
case 'ManagedKubernetes':
return `${formatMessage({id:'utils.cloud.getAliyunClusterName.ManagedKubernetes'})}`;
case 'ServerlessKubernetes':
return `${formatMessage({id:'utils.cloud.getAliyunClusterName.ServerlessKubernetes'})}`;
case 'rke':
return `${formatMessage({id:'utils.cloud.getAliyunClusterName.rke'})}`;
case 'custom':
return `${formatMessage({id:'utils.cloud.getAliyunClusterName.custom'})}`;
default:
return n;
}
},
handleCloudAPIError(err) {
function noticeWarning(message) {
return notification.warning({ message });
}
if (!err) {
noticeWarning(`${formatMessage({id:'utils.noticeWarning.error'})}`);
return;
}
let data = null;
if (err.response && err.response.data) {
data = err.response.data;
} else if (err.data) {
data = err.data;
}
const code = data && data.code;
switch (code) {
case 2003:
noticeWarning(`${formatMessage({id:'utils.noticeWarning.iPhone'})}`);
break;
case 3000:
noticeWarning(`${formatMessage({id:'utils.noticeWarning.user_already'})}`);
break;
case 3001:
noticeWarning(`${formatMessage({id:'utils.noticeWarning.user_notExist'})}`);
break;
case 3002:
noticeWarning(`${formatMessage({id:'utils.noticeWarning.user_notExist'})}`);
break;
case 3003:
noticeWarning(`${formatMessage({id:'utils.noticeWarning.Email_notExist'})}`);
break;
case 3004:
noticeWarning(`${formatMessage({id:'utils.noticeWarning.iPhone_notExist'})}`);
break;
case 3005:
noticeWarning(`${formatMessage({id:'utils.noticeWarning.delete'})}`);
break;
case 4001:
noticeWarning(`${formatMessage({id:'utils.noticeWarning.be_overdue'})}`);
break;
case 7002:
noticeWarning(`${formatMessage({id:'utils.noticeWarning.AccessKey_notExist'})}`);
break;
case 7004:
noticeWarning(`${formatMessage({id:'utils.noticeWarning.Mismatch'})}`);
break;
case 7005:
noticeWarning(`${formatMessage({id:'utils.noticeWarning.type'})}`);
break;
case 7006:
noticeWarning(`${formatMessage({id:'utils.noticeWarning.api'})}`);
break;
case 7008:
noticeWarning(`${formatMessage({id:'utils.noticeWarning.ali'})}`);
break;
case 7007:
noticeWarning(`${formatMessage({id:'utils.noticeWarning.alApi'})}`);
break;
case 7010:
noticeWarning(`${formatMessage({id:'utils.noticeWarning.defect'})}`);
break;
case 7011:
noticeWarning(`${formatMessage({id:'utils.noticeWarning.Odd_number'})}`);
break;
case 7012:
noticeWarning(`${formatMessage({id:'utils.noticeWarning.Verification_failed'})}`);
break;
case 7013:
noticeWarning(`${formatMessage({id:'utils.noticeWarning.port'})}`);
break;
case 7014:
noticeWarning(`${formatMessage({id:'utils.noticeWarning.notNull'})}`);
break;
case 7015:
noticeWarning(`${formatMessage({id:'utils.noticeWarning.Cannot_be_deleted'})}`);
break;
case 7016:
noticeWarning(`${formatMessage({id:'utils.noticeWarning.Reinstall'})}`);
break;
case 7017:
noticeWarning(`${formatMessage({id:'utils.noticeWarning.configuration——actions'})}`);
break;
case 7018:
noticeWarning(`${formatMessage({id:'utils.noticeWarning.retry'})}`);
break;
case 7019:
noticeWarning(`${formatMessage({id:'utils.noticeWarning.state'})}`);
break;
case 7020:
noticeWarning(`${formatMessage({id:'utils.noticeWarning.rek'})}`);
break;
case 7021:
noticeWarning(`${formatMessage({id:'utils.noticeWarning.rek_lose'})}`);
break;
case 7022:
noticeWarning(`${formatMessage({id:'utils.noticeWarning.not_exist'})}`);
break;
case 7023:
noticeWarning(`${formatMessage({id:'utils.noticeWarning.RKE_already'})}`);
break;
case 7024:
noticeWarning(`${formatMessage({id:'utils.noticeWarning.not_finished'})}`);
break;
case 7025:
noticeWarning(`${formatMessage({id:'utils.noticeWarning.updata'})}`);
break;
case 7026:
noticeWarning(`${formatMessage({id:'utils.noticeWarning.Update_cluster'})}`);
break;
case 7027:
noticeWarning(`${formatMessage({id:'utils.noticeWarning.Cluster_not_finished'})}`);
break;
case 7028:
noticeWarning(`${formatMessage({id:'utils.noticeWarning.namespace'})}`);
break;
case 7029:
noticeWarning(`${formatMessage({id:'utils.noticeWarning.task'})}`);
break;
case 8000:
noticeWarning(`${formatMessage({id:'utils.noticeWarning.helm'})}`);
break;
case 8001:
noticeWarning(`${formatMessage({id:'utils.noticeWarning.helm_name'})}`);
break;
case 8002:
noticeWarning(`${formatMessage({id:'utils.noticeWarning.confirm'})}`);
break;
case 8003:
noticeWarning(`${formatMessage({id:'utils.noticeWarning.helm_Template'})}`);
break;
case 8004:
noticeWarning(`${formatMessage({id:'utils.noticeWarning.helm_edition'})}`);
break;
case 400:
noticeWarning(data.msg_show || `${formatMessage({id:'utils.noticeWarning.Requesr_error'})}`);
break;
case undefined:
noticeWarning(`${formatMessage({id:'utils.noticeWarning.error'})}`);
break;
default:
noticeWarning(`${formatMessage({id:'utils.noticeWarning.cloud_error'},{code:code})}`);
break;
}
},
showCreateKubernetesSteps(events) {
const colorMap = {
start: '',
'': 'gray',
failure: 'red',
success: 'green'
};
let complete = false;
const steps = [];
(events || []).map(item => {
let step = createKubernetesSteps[item.type];
if (step === undefined) {
step = {
Title: item.type,
Description: item.type,
Type: '',
Status: '',
reason: ''
};
}
step.Type = item.type;
step.Status = item.status;
step.Message = item.message;
step.reason = item.reason;
step.Color = colorMap[item.status];
steps.push(step);
if (
item.status === 'failure' ||
((item.type === 'CreateCluster' || item.type === 'InstallKubernetes') &&
item.status === 'success')
) {
complete = true;
}
return item;
});
return { complete, steps };
},
showInitRainbondSteps(events) {
const colorMap = {
start: '',
'': 'gray',
failure: 'red',
success: 'green'
};
let complete = false;
const steps = [];
events.map(item => {
let step = initRainbondSteps[item.type];
if (step === undefined) {
step = {
Title: item.type,
Description: item.type,
Type: '',
Status: '',
reason: ''
};
}
step.Type = item.type;
step.Status = item.status;
step.Message = item.message;
step.reason = item.reason;
step.Color = colorMap[item.status];
steps.push(step);
if (
// item.status === 'failure' ||
(item.type === 'InitRainbondCluster' && item.status === 'success')
) {
complete = true;
}
});
return { complete, steps };
},
showUpdateClusterSteps(events) {
const colorMap = {
start: '',
'': 'gray',
failure: 'red',
success: 'green'
};
let complete = false;
const steps = [];
events.map(item => {
let step = updateKubernetesSteps[item.type];
if (step === undefined) {
step = {
Title: item.type,
Description: item.type,
Type: '',
Status: '',
reason: ''
};
}
step.Type = item.type;
step.Status = item.status;
step.Message = item.message;
step.Color = colorMap[item.status];
step.reason = item.reason;
steps.push(step);
if (
item.status === 'failure' ||
(item.type === 'UpdateKubernetes' && item.status === 'success')
) {
complete = true;
}
return item;
});
return { complete, steps };
},
getAliyunClusterStatus(status, cluster, linkedClusters) {
switch (status) {
case 'running':
if (linkedClusters.get(cluster.cluster_id)) {
return <span style={{ color: 'green' }}>{formatMessage({id:'utils.getAliyunClusterStatus.operation_Docked'})}</span>;
}
if (cluster.rainbond_init === true) {
return <span style={{ color: 'green' }}>{formatMessage({id:'utils.getAliyunClusterStatus.operation_Initialized'})}</span>;
}
if (cluster.parameters && cluster.parameters.Message) {
return (
<Tooltip title={cluster.parameters.Message}>
<span style={{ color: 'red' }}>
<span style={{fontSize: '16px' }}>*</span>{formatMessage({id:'utils.getAliyunClusterStatus.operation_error'})}
</span>
</Tooltip>
);
}
return <span style={{ color: 'green' }}>{formatMessage({id:'utils.getAliyunClusterStatus.operation'})}</span>;
case 'initial':
return <span style={{ color: '#1890ff' }}>{formatMessage({id:'utils.getAliyunClusterStatus.Initializing'})}</span>;
case 'deleting':
return <span style={{ color: 'red' }}>{formatMessage({id:'utils.getAliyunClusterStatus.Deleting'})}</span>;
case 'offline':
return <span style={{ color: 'red' }}>{formatMessage({id:'utils.getAliyunClusterStatus.Offline'})}</span>;
case 'failed':
return <span style={{ color: 'red' }}>{formatMessage({id:'utils.getAliyunClusterStatus.Installation_failed'})}</span>;
case 'installing':
return <span style={{ color: '#F69D4A'}}>{formatMessage({id:'utils.getAliyunClusterStatus.Being_installed'})}</span>
default:
return status;
}
},
getProviders() {
return providers;
},
getProviderShowName(id) {
let name = id;
providers.map(item => {
if (item.id === id) {
name = item.name;
}
return item;
});
return name;
},
getTaskStatus(status) {
switch (status) {
case 'start':
return `${formatMessage({id:'utils.getTaskStatus.start'})}`;
case 'complete':
return `${formatMessage({id:'utils.getTaskStatus.complete'})}`;
case 'inited':
return `${formatMessage({id:'utils.getTaskStatus.inited'})}`;
default:
return `${formatMessage({id:'utils.getTaskStatus.Not_started'})}`;
}
},
getAliyunCountDescribe() {
return [
{
key: 'default-role',
title: formatMessage({id:'utils.getAliyunCountDescribe.default-role'}),
href:
'https://ram.console.aliyun.com/#/role/authorize?request=%7B%22ReturnUrl%22:%22https://cs.console.aliyun.com/%22,%22Service%22:%22CS%22,%22Requests%22:%7B%22request1%22:%7B%22RoleName%22:%22AliyunCSManagedLogRole%22,%22TemplateId%22:%22AliyunCSManagedLogRole%22%7D,%22request2%22:%7B%22RoleName%22:%22AliyunCSManagedCmsRole%22,%22TemplateId%22:%22AliyunCSManagedCmsRole%22%7D,%22request3%22:%7B%22RoleName%22:%22AliyunCSManagedCsiRole%22,%22TemplateId%22:%22AliyunCSManagedCsiRole%22%7D,%22request4%22:%7B%22RoleName%22:%22AliyunCSManagedVKRole%22,%22TemplateId%22:%22AliyunCSManagedVKRole%22%7D,%22request5%22:%7B%22RoleName%22:%22AliyunCSClusterRole%22,%22TemplateId%22:%22Cluster%22%7D,%22request6%22:%7B%22RoleName%22:%22AliyunCSServerlessKubernetesRole%22,%22TemplateId%22:%22ServerlessKubernetes%22%7D,%22request7%22:%7B%22RoleName%22:%22AliyunCSKubernetesAuditRole%22,%22TemplateId%22:%22KubernetesAudit%22%7D,%22request8%22:%7B%22RoleName%22:%22AliyunCSManagedNetworkRole%22,%22TemplateId%22:%22AliyunCSManagedNetworkRole%22%7D,%22request9%22:%7B%22RoleName%22:%22AliyunCSDefaultRole%22,%22TemplateId%22:%22Default%22%7D,%22request10%22:%7B%22RoleName%22:%22AliyunCSManagedKubernetesRole%22,%22TemplateId%22:%22ManagedKubernetes%22%7D,%22request11%22:%7B%22RoleName%22:%22AliyunCSManagedArmsRole%22,%22TemplateId%22:%22AliyunCSManagedArmsRole%22%7D%7D%7D'
},
{
key: 'open-ess',
title: formatMessage({id:'utils.getAliyunCountDescribe.open-ess'}),
href:
'https://ram.console.aliyun.com/#/role/authorize?request=%7B%22Requests%22:%20%7B%22request1%22:%20%7B%22RoleName%22:%20%22AliyunESSDefaultRole%22,%20%22TemplateId%22:%20%22DefaultRole%22%7D%7D,%20%22ReturnUrl%22:%20%22https:%2F%2Fessnew.console.aliyun.com%2F%22,%20%22Service%22:%20%22ESS%22%7D'
},
{
key: 'perm-ess',
title: formatMessage({id:'utils.getAliyunCountDescribe.perm-ess'}),
href:
'https://ram.console.aliyun.com/#/role/authorize?request=%7B%22Requests%22:%20%7B%22request1%22:%20%7B%22RoleName%22:%20%22AliyunESSDefaultRole%22,%20%22TemplateId%22:%20%22DefaultRole%22%7D%7D,%20%22ReturnUrl%22:%20%22https:%2F%2Fessnew.console.aliyun.com%2F%22,%20%22Service%22:%20%22ESS%22%7D'
},
{
key: 'open-nas',
title: formatMessage({id:'utils.getAliyunCountDescribe.open-nas'}),
href: 'https://common-buy.aliyun.com/?commodityCode=naspost'
}
];
}
};
export default cloud;

Комментарий ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://gitlife.ru/oschina-mirror/rainbond-rainbond-ui.git
git@gitlife.ru:oschina-mirror/rainbond-rainbond-ui.git
oschina-mirror
rainbond-rainbond-ui
rainbond-rainbond-ui
main