Compare commits

...

1 Commits

Author SHA1 Message Date
jiangweidong
b908f9193e feat: Host cloud sync supports state cloud 2025-10-23 09:48:14 +08:00
2 changed files with 16 additions and 7 deletions

View File

@@ -82,7 +82,7 @@ export default {
[this.$tc('Platform'), 'platform'],
[this.$tc('Node'), 'node'],
[this.$tc('Protocol'), 'protocols'],
[this.$tc('Region'), 'region_id']
[this.$tc('Region'), 'region_name']
],
data: []
},
@@ -126,7 +126,7 @@ export default {
this.ws.onmessage = (e) => {
const data = JSON.parse(e.data)
if (data.action === 'sync_region') {
this.addRegion(data.region_id)
this.addRegion(data.id, data.name)
} else if (data.action === 'import') {
data['@status'] = 'pending'
this.$refs.importTable.addTableItem(data)
@@ -142,10 +142,10 @@ export default {
}
}
},
addRegion(region) {
if (!this.alreadySync.includes(region)) {
this.alreadySync.push(region)
this.tip = `${this.$t('SyncRegion')}: ${this.alreadySync.at(-1)}`
addRegion(regionId, regionName) {
if (!this.alreadySync.includes(regionId)) {
this.alreadySync.push(regionId)
this.tip = `${this.$t('SyncRegion')}: ${regionName}`
}
},
showResult() {

View File

@@ -17,6 +17,8 @@ export const ucloud = 'ucloud'
export const volcengine = 'volcengine'
export const ctyun = 'ctyun'
export const qingcloud_private = 'qingcloud_private'
export const huaweicloud_private = 'huaweicloud_private'
export const ctyun_private = 'ctyun_private'
@@ -46,7 +48,8 @@ export const publicHostProviders = [
gcp,
ucloud,
volcengine,
smartx
smartx,
ctyun
]
export const publicDBProviders = [aliyun]
@@ -141,6 +144,12 @@ export const ACCOUNT_PROVIDER_ATTRS_MAP = {
attrs: ['access_key_id', 'access_key_secret'],
image: require('@/assets/img/cloud/volcengine.svg')
},
[ctyun]: {
name: ctyun,
title: i18n.t('CTYun'),
attrs: ['access_key_id', 'access_key_secret'],
image: require('@/assets/img/cloud/state.svg')
},
[vmware]: {
name: vmware,
title: 'VMware',