From 7f4794b4c845edfba2f0225151e6d8bb34cf1872 Mon Sep 17 00:00:00 2001 From: jiangweidong <1053570670@qq.com> Date: Mon, 14 Oct 2024 13:56:56 +0800 Subject: [PATCH] feat: Cloud Sync supports synchronizing Aliyun RDS (MySQL, MariaDB, SQL Server, PostgreSQL) --- src/components/Table/CardTable/index.vue | 2 +- src/views/assets/Asset/AssetList/AllList.vue | 10 ++++++++++ src/views/assets/Asset/AssetList/HostList.vue | 12 ------------ 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/src/components/Table/CardTable/index.vue b/src/components/Table/CardTable/index.vue index 578eda185..1a2bda877 100644 --- a/src/components/Table/CardTable/index.vue +++ b/src/components/Table/CardTable/index.vue @@ -255,7 +255,7 @@ export default { display: flex; flex-wrap: nowrap; margin-top: 0; - height: 190px; + height: 100%; .image { display: flex; diff --git a/src/views/assets/Asset/AssetList/AllList.vue b/src/views/assets/Asset/AssetList/AllList.vue index 94cff56d9..faf2b76cb 100644 --- a/src/views/assets/Asset/AssetList/AllList.vue +++ b/src/views/assets/Asset/AssetList/AllList.vue @@ -37,6 +37,7 @@ export default { BaseList }, data() { + const vm = this const tableUrl = '/api/v1/assets/assets/' return { treeRef: null, @@ -52,6 +53,15 @@ export default { extraQuery: { 'order': '-date_updated' } }, headerActions: { + extraActions: [ + { + name: this.$t('CloudSync'), + title: this.$t('CloudSync'), + icon: 'cloud-provider', + has: () => vm.$hasPerm('xpack.view_account') && vm.$hasLicense(), + callback: () => this.$router.push({ name: 'CloudAccountList' }) + } + ], handleImportClick: ({ selectedRows }) => { this.$message.warning({ message: this.$t('ImportMessage') diff --git a/src/views/assets/Asset/AssetList/HostList.vue b/src/views/assets/Asset/AssetList/HostList.vue index 655990a9e..57d8ee4a3 100644 --- a/src/views/assets/Asset/AssetList/HostList.vue +++ b/src/views/assets/Asset/AssetList/HostList.vue @@ -21,7 +21,6 @@ export default { GatewayDialog }, data() { - const vm = this return { GatewayPort: 0, GatewayCell: '', @@ -30,17 +29,6 @@ export default { url: '/api/v1/assets/hosts/', category: 'host', optionInfo: {}, - headerActions: { - extraActions: [ - { - name: this.$t('CloudSync'), - title: this.$t('CloudSync'), - icon: 'cloud-provider', - has: () => vm.$hasPerm('xpack.view_account') && vm.$hasLicense(), - callback: () => this.$router.push({ name: 'CloudAccountList' }) - } - ] - }, tableConfig: { columnsMeta: { actions: {