From 040d0497423aed4ddce5a41b836b0e8035037e23 Mon Sep 17 00:00:00 2001 From: feng <1304903146@qq.com> Date: Wed, 12 Jun 2024 16:34:46 +0800 Subject: [PATCH 1/5] fix: Deleting released assets, prompting deletion failure --- .../assets/Cloud/Account/AccountDetail/TaskSyncAssetList.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/assets/Cloud/Account/AccountDetail/TaskSyncAssetList.vue b/src/views/assets/Cloud/Account/AccountDetail/TaskSyncAssetList.vue index 775e22db9..82435cee9 100644 --- a/src/views/assets/Cloud/Account/AccountDetail/TaskSyncAssetList.vue +++ b/src/views/assets/Cloud/Account/AccountDetail/TaskSyncAssetList.vue @@ -77,7 +77,7 @@ export default { }, methods: { DeleteReleasedAssets() { - this.$axios.delete(`/api/v1/xpack/cloud/sync-instance-tasks/${this.object.id}/released-assets/`).then( + this.$axios.delete(`/api/v1/xpack/cloud/sync-instance-tasks/${this.object.task?.id}/released-assets/`).then( res => { this.$message.success(this.$tc('DeleteSuccessMsg')) this.$refs.GenericListTable.$refs.ListTable.reloadTable() From 60d8f007237e9a7735895a3ddab50d9856da87bd Mon Sep 17 00:00:00 2001 From: wangruidong <940853815@qq.com> Date: Wed, 12 Jun 2024 17:16:55 +0800 Subject: [PATCH 2/5] fix: Clicking on gateway numbers in domain list leads to blank page --- src/views/assets/Domain/DomainList.vue | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/src/views/assets/Domain/DomainList.vue b/src/views/assets/Domain/DomainList.vue index 07cfb194c..cf570698a 100644 --- a/src/views/assets/Domain/DomainList.vue +++ b/src/views/assets/Domain/DomainList.vue @@ -28,8 +28,16 @@ export default { formatterArgs: { async: true, permissions: 'assets.view_asset', - routeQuery: { - tab: 'AssetList' + getRoute({ row }) { + return { + name: 'ZoneDetail', + params: { + id: row.id + }, + query: { + tab: 'AssetList' + } + } } } }, @@ -38,8 +46,16 @@ export default { formatter: AmountFormatter, formatterArgs: { permissions: 'assets.view_gateway', - routeQuery: { - tab: 'GatewayList' + getRoute({ row }) { + return { + name: 'ZoneDetail', + params: { + id: row.id + }, + query: { + tab: 'GatewayList' + } + } } } } From 9b36f51015fa4d3e2f6978c82cd57c53fcd53ff9 Mon Sep 17 00:00:00 2001 From: wangruidong <940853815@qq.com> Date: Wed, 12 Jun 2024 17:59:07 +0800 Subject: [PATCH 3/5] fix: Viewing account collection task details leads to a blank page --- src/components/Table/TableFormatters/DetailFormatter.vue | 2 +- src/views/accounts/AccountGather/index.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Table/TableFormatters/DetailFormatter.vue b/src/components/Table/TableFormatters/DetailFormatter.vue index 9da69b975..63b127ef6 100644 --- a/src/components/Table/TableFormatters/DetailFormatter.vue +++ b/src/components/Table/TableFormatters/DetailFormatter.vue @@ -98,7 +98,7 @@ export default { detailRoute.query = this.formatterArgs.routeQuery if (detailRoute.query.tab) { - detailRoute.name = detailRoute.query.tab + detailRoute.query = detailRoute.query.tab } } return detailRoute diff --git a/src/views/accounts/AccountGather/index.vue b/src/views/accounts/AccountGather/index.vue index ea8b3cad1..168d268fa 100644 --- a/src/views/accounts/AccountGather/index.vue +++ b/src/views/accounts/AccountGather/index.vue @@ -22,7 +22,7 @@ export default { component: () => import('@/views/accounts/AccountGather/AccountGatherList.vue') }, { - title: this.$t('AccountGatherList'), + title: this.$t('AccountGatherTaskList'), name: 'AccountGatherTaskList', hidden: !this.$hasPerm('accounts.view_gatheraccountsautomation'), component: () => import('@/views/accounts/AccountGather/AccountGatherTaskList.vue') From 85a4247d9b49910ce3b1b88bdc267f1d0e2f9c0f Mon Sep 17 00:00:00 2001 From: Bai Date: Wed, 12 Jun 2024 18:38:05 +0800 Subject: [PATCH 4/5] perf: Update default language en --- src/i18n/i18n.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/i18n.js b/src/i18n/i18n.js index 9baa5bbeb..1ac437f5f 100644 --- a/src/i18n/i18n.js +++ b/src/i18n/i18n.js @@ -12,7 +12,7 @@ Vue.use(VueI18n) const cookieLang = VueCookie.get('django_language') const storeLang = VueCookie.get('lang') const browserLang = navigator.systemLanguage || navigator.language -let lang = cookieLang || storeLang || browserLang || 'zh' +let lang = cookieLang || storeLang || browserLang || 'en' if (lang === 'zh-hant') { lang = 'zh_hant' } else { From 757184c4593faa52c25fad8bb65b8ee00a554a81 Mon Sep 17 00:00:00 2001 From: zhaojisen <1301338853@qq.com> Date: Wed, 12 Jun 2024 18:38:53 +0800 Subject: [PATCH 5/5] fix: Fixed the issue that the region was displayed incorrectly when updating the cloud platform account --- .../Cloud/Account/components/AccountPanel.vue | 22 +++++++++++++++++-- .../Cloud/Account/components/AuthPanel.vue | 17 ++++++++++---- .../Cloud/Account/components/RegionPanel.vue | 21 +++++++++++------- 3 files changed, 46 insertions(+), 14 deletions(-) diff --git a/src/views/assets/Cloud/Account/components/AccountPanel.vue b/src/views/assets/Cloud/Account/components/AccountPanel.vue index d608c69e0..1b6eaebd1 100644 --- a/src/views/assets/Cloud/Account/components/AccountPanel.vue +++ b/src/views/assets/Cloud/Account/components/AccountPanel.vue @@ -19,10 +19,10 @@ - + - + @@ -31,6 +31,7 @@ @@ -112,6 +114,22 @@ export default { return ACCOUNT_PROVIDER_ATTRS_MAP[`${this.object.provider.value}`].image } }, + watch: { + onlineSyncVisible: { + handler(newValue) { + if (newValue === false) { + this.$emit('refresh') + } + } + }, + updateVisible: { + handler(newValue) { + if (newValue === false) { + this.$emit('refresh') + } + } + } + }, methods: { toSafeLocalDateStr, handleDelete() { diff --git a/src/views/assets/Cloud/Account/components/AuthPanel.vue b/src/views/assets/Cloud/Account/components/AuthPanel.vue index 049b52e62..4f5733d20 100644 --- a/src/views/assets/Cloud/Account/components/AuthPanel.vue +++ b/src/views/assets/Cloud/Account/components/AuthPanel.vue @@ -29,6 +29,10 @@ export default { object: { type: Object, default: () => {} + }, + origin: { + type: String, + default: '' } }, data() { @@ -106,12 +110,12 @@ export default { el: { provider: this.provider, regions: this.object.task?.regions || [], - getAuthInfo: async() => { + getAuthInfo: () => { if (this.object?.id) { return this.object.id } const form = this.$refs.form.$refs.form.dataForm - await form.submitForm('form', true) + form.$refs.form.validate() return form.getFormValue()['attrs'] } } @@ -161,8 +165,6 @@ export default { } } }, - mounted() { - }, methods: { submitForm(form, btn, submitType) { form.validate((valid) => { @@ -171,6 +173,13 @@ export default { } }) this.$refs.form.$refs.form.dataForm.submitForm('form', false) + + if (this.origin === 'update') { + setTimeout(() => { + this.$emit('refresh') + this.$emit('update:visible', false) + }, 500) + } this.submitType = submitType }, handleSubmitSuccess(res) { diff --git a/src/views/assets/Cloud/Account/components/RegionPanel.vue b/src/views/assets/Cloud/Account/components/RegionPanel.vue index 1e081eead..18579628d 100644 --- a/src/views/assets/Cloud/Account/components/RegionPanel.vue +++ b/src/views/assets/Cloud/Account/components/RegionPanel.vue @@ -8,6 +8,7 @@ {{ content }} { this.allRegions = resp?.regions - console.log(Object.getOwnPropertyNames(data.attrs).length) - if (this.allRegions.length && Object.getOwnPropertyNames(data.attrs).length > 0) { - this.regionVisible = true - this.updateCheckedStatus() - } + this.regionVisible = true + this.updateCheckedStatus() }).catch(error => { this.$message.error(this.$tc('CloudRegionTip' + ' ' + error)) }).finally(() => {