Compare commits

...

2 Commits

Author SHA1 Message Date
jiangweidong
31522c62e4 perf: increase joint camp areas 2025-11-10 17:02:28 +08:00
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('Platform'), 'platform'],
[this.$tc('Node'), 'node'], [this.$tc('Node'), 'node'],
[this.$tc('Protocol'), 'protocols'], [this.$tc('Protocol'), 'protocols'],
[this.$tc('Region'), 'region_id'] [this.$tc('Region'), 'region_name']
], ],
data: [] data: []
}, },
@@ -126,7 +126,7 @@ export default {
this.ws.onmessage = (e) => { this.ws.onmessage = (e) => {
const data = JSON.parse(e.data) const data = JSON.parse(e.data)
if (data.action === 'sync_region') { if (data.action === 'sync_region') {
this.addRegion(data.region_id) this.addRegion(data.id, data.name)
} else if (data.action === 'import') { } else if (data.action === 'import') {
data['@status'] = 'pending' data['@status'] = 'pending'
this.$refs.importTable.addTableItem(data) this.$refs.importTable.addTableItem(data)
@@ -142,10 +142,10 @@ export default {
} }
} }
}, },
addRegion(region) { addRegion(regionId, regionName) {
if (!this.alreadySync.includes(region)) { if (!this.alreadySync.includes(regionId)) {
this.alreadySync.push(region) this.alreadySync.push(regionId)
this.tip = `${this.$t('SyncRegion')}: ${this.alreadySync.at(-1)}` this.tip = `${this.$t('SyncRegion')}: ${regionName}`
} }
}, },
showResult() { showResult() {

View File

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