feat: 云同步支持UCloud公有云 (#3253)

This commit is contained in:
jiangweidong 2023-07-04 18:24:50 +08:00 committed by GitHub
parent 9eea051884
commit 09dabb5d3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 35 additions and 2 deletions

View File

@ -477,6 +477,9 @@
"ReLoginErr": "Login time has exceeded 5 minutes, please login again"
},
"common": {
"PublicKey": "Public key",
"PrivateKey": "Private key",
"Project": "Project name",
"Advanced": "Advanced",
"BatchProcessing": "Batch processing(select {Number} items)",
"Generate": "Generate",
@ -2035,6 +2038,7 @@
"HuaweiPrivatecloud": "Huawei Private Cloud",
"OpenStack": "OpenStack",
"GCP": "Google Cloud Platform",
"UCloud": "UCloud Platform",
"FC": "Fusion Compute",
"AWS_China": "AWS(China)",
"AWS_Int": "AWS(International)",

View File

@ -477,6 +477,9 @@
"ReLoginErr": "ログイン時間が 5 分を超えました。もう一度ログインしてください"
},
"common": {
"PublicKey": "公開鍵です",
"PrivateKey": "秘密鍵です",
"Project": "プロジェクト名です",
"Advanced": "高度な",
"BatchProcessing": "一括処理(選択 {Number} 項目)",
"Generate": "生成",
@ -2030,6 +2033,7 @@
"OpenStack": "OpenStack",
"CTYunPrivate": "天翼プライベート・クラウド",
"GCP": "Googleクラウド",
"UCloud": "UCloudユケデです",
"FC": "Fusion Compute",
"LAN": "ローカルエリアネットワーク",
"AWS_China": "AWS(中国)",

View File

@ -471,6 +471,9 @@
"ReLoginErr": "登录时长已超过 5 分钟,请重新登录"
},
"common": {
"PublicKey": "公钥",
"PrivateKey": "私钥",
"Project": "项目名",
"Advanced": "高级选项",
"OtherRules": "其它规则",
"MatchedCount": "匹配结果",
@ -1951,6 +1954,7 @@
"CTYunPrivate": "天翼私有云",
"OpenStack": "OpenStack",
"GCP": "谷歌云",
"UCloud": "UCloud优刻得",
"FC": "Fusion Compute",
"AWS_China": "AWS(中国)",
"AWS_Int": "AWS(国际)",

View File

@ -23,7 +23,7 @@ export default {
function setFieldAttrs() {
const fieldsObject = {}
const updateNotRequiredFields = ['access_key_secret', 'client_secret', 'password', 'sc_password', 'oc_password', 'cert_file', 'key_file']
const updateNotRequiredFields = ['access_key_secret', 'client_secret', 'password', 'sc_password', 'oc_password', 'cert_file', 'key_file', 'public_key', 'private_key']
for (const item of accountProviderAttrs?.attrs) {
fieldsObject[item] = {
rules: updateNotRequiredFields.includes(item) && vm.$route.params.id ? [] : [RequiredChange]
@ -90,6 +90,17 @@ export default {
}
}
}
},
public_key: {
label: this.$t('common.PublicKey'),
rules: this.$route.params.id ? [] : [RequiredChange]
},
private_key: {
label: this.$t('common.PrivateKey'),
rules: this.$route.params.id ? [] : [RequiredChange]
},
project: {
label: this.$t('common.Project')
}
}
},

View File

@ -4,7 +4,7 @@
<script type="text/jsx">
import GenericListTable from '@/layout/components/GenericListTable'
import { ACCOUNT_PROVIDER_ATTRS_MAP, aliyun, aws_china, aws_international, huaweicloud, qcloud, qcloud_lighthouse, azure, azure_international, vmware, nutanix, qingcloud_private, huaweicloud_private, ctyun_private, openstack, gcp, baiducloud, jdcloud, kingsoftcloud, fc, lan } from '../const'
import { ACCOUNT_PROVIDER_ATTRS_MAP, aliyun, aws_china, aws_international, huaweicloud, qcloud, qcloud_lighthouse, azure, azure_international, ucloud, vmware, nutanix, qingcloud_private, huaweicloud_private, ctyun_private, openstack, gcp, baiducloud, jdcloud, kingsoftcloud, fc, lan } from '../const'
export default {
name: 'AccountList',
@ -119,6 +119,10 @@ export default {
name: gcp,
title: ACCOUNT_PROVIDER_ATTRS_MAP[gcp].title
},
{
name: ucloud,
title: ACCOUNT_PROVIDER_ATTRS_MAP[ucloud].title
},
{
name: vmware,
group: this.$t('common.PrivateCloud'),

View File

@ -12,6 +12,7 @@ export const qcloud = 'qcloud'
export const qcloud_lighthouse = 'qcloud_lighthouse'
export const azure = 'azure'
export const azure_international = 'azure_international'
export const ucloud = 'ucloud'
export const qingcloud_private = 'qingcloud_private'
export const huaweicloud_private = 'huaweicloud_private'
@ -83,6 +84,11 @@ export const ACCOUNT_PROVIDER_ATTRS_MAP = {
title: i18n.t('xpack.Cloud.GCP'),
attrs: ['service_account_key']
},
[ucloud]: {
name: ucloud,
title: i18n.t('xpack.Cloud.UCloud'),
attrs: ['base_url', 'public_key', 'private_key', 'project']
},
[vmware]: {
name: vmware,
title: 'VMware',