From f08be7f2fb7bc211c1cd377fc85a78c179c71082 Mon Sep 17 00:00:00 2001 From: chenwenchang <479999519@qq.com> Date: Mon, 11 Nov 2024 11:44:02 +0800 Subject: [PATCH] =?UTF-8?q?fix(frontend):=20tendbcluster=E8=BF=81=E7=A7=BB?= =?UTF-8?q?=E4=B8=BB=E4=BB=8Ebug=20#7767=20#=20Reviewed,=20transaction=20i?= =?UTF-8?q?d:=2023412?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tendb-cluster-host/table/Index.vue | 2 +- dbm-ui/frontend/src/locales/zh-cn.json | 1 + .../page1/components/RenderMasterHost.vue | 8 +++--- .../page1/components/RenderNewInstace.vue | 5 +--- .../demand-factory/spider/MigrateCluster.vue | 27 +++++-------------- 5 files changed, 15 insertions(+), 28 deletions(-) diff --git a/dbm-ui/frontend/src/components/instance-selector/components/tendb-cluster-host/table/Index.vue b/dbm-ui/frontend/src/components/instance-selector/components/tendb-cluster-host/table/Index.vue index 28f125de2e..4dc1d0f3d6 100644 --- a/dbm-ui/frontend/src/components/instance-selector/components/tendb-cluster-host/table/Index.vue +++ b/dbm-ui/frontend/src/components/instance-selector/components/tendb-cluster-host/table/Index.vue @@ -186,7 +186,7 @@ field: props.firsrColumn?.field ? props.firsrColumn.field : 'instance_address', }, { - label: t('关联的从库实例'), + label: t('关联实例'), field: 'related_instances', showOverflowTooltip: true, width: 200, diff --git a/dbm-ui/frontend/src/locales/zh-cn.json b/dbm-ui/frontend/src/locales/zh-cn.json index 719b715d75..6f19ae54f5 100644 --- a/dbm-ui/frontend/src/locales/zh-cn.json +++ b/dbm-ui/frontend/src/locales/zh-cn.json @@ -3670,5 +3670,6 @@ "无只读主机": "无只读主机", "批量录入:按行录入,快速批量输入多个单元格的值": "批量录入:按行录入,快速批量输入多个单元格的值", "高可用": "高可用", + "关联实例": "关联实例", "这行勿动!新增翻译请在上一行添加!": "" } diff --git a/dbm-ui/frontend/src/views/db-manage/tendb-cluster/master-slave-clone/pages/page1/components/RenderMasterHost.vue b/dbm-ui/frontend/src/views/db-manage/tendb-cluster/master-slave-clone/pages/page1/components/RenderMasterHost.vue index 9a7735b44c..3a30a7c5dd 100644 --- a/dbm-ui/frontend/src/views/db-manage/tendb-cluster/master-slave-clone/pages/page1/components/RenderMasterHost.vue +++ b/dbm-ui/frontend/src/views/db-manage/tendb-cluster/master-slave-clone/pages/page1/components/RenderMasterHost.vue @@ -115,9 +115,11 @@ watch( localValue, () => { - setTimeout(() => { - editRef.value!.getValue(); - }); + if (localValue.value) { + setTimeout(() => { + editRef.value!.getValue(); + }); + } }, { immediate: true, diff --git a/dbm-ui/frontend/src/views/db-manage/tendb-cluster/master-slave-clone/pages/page1/components/RenderNewInstace.vue b/dbm-ui/frontend/src/views/db-manage/tendb-cluster/master-slave-clone/pages/page1/components/RenderNewInstace.vue index 657524c1dc..cf7709657e 100644 --- a/dbm-ui/frontend/src/views/db-manage/tendb-cluster/master-slave-clone/pages/page1/components/RenderNewInstace.vue +++ b/dbm-ui/frontend/src/views/db-manage/tendb-cluster/master-slave-clone/pages/page1/components/RenderNewInstace.vue @@ -96,7 +96,6 @@ }" :data="localHostList" :disable-dialog-submit-method="disableDialogSubmitMethod" - :disable-host-method="disableHostMethod" :os-types="[OSTypes.Linux]" service-mode="idle_only" :show-view="false" @@ -345,9 +344,7 @@ isShowIpSelector.value = true; }; - const disableDialogSubmitMethod = (hostList: HostInfo[]) => (hostList.length === 2 ? false : t('需n台', { n: 2 })); - - const disableHostMethod = (data: HostInfo, list: HostInfo[]) => (list.length >= 2 ? t('仅需n台', { n: 2 }) : false); + const disableDialogSubmitMethod = (hostList: HostInfo[]) => (hostList.length === 2 ? false : t('仅需n台', { n: 2 })); const handleHostChange = (hostList: HostInfo[]) => { localHostList.value = hostList; diff --git a/dbm-ui/frontend/src/views/tickets/common/components/demand-factory/spider/MigrateCluster.vue b/dbm-ui/frontend/src/views/tickets/common/components/demand-factory/spider/MigrateCluster.vue index 3a11726087..0554aa575a 100644 --- a/dbm-ui/frontend/src/views/tickets/common/components/demand-factory/spider/MigrateCluster.vue +++ b/dbm-ui/frontend/src/views/tickets/common/components/demand-factory/spider/MigrateCluster.vue @@ -13,12 +13,14 @@ - + + {{ t('备份源') }}: + + {{ props.ticketDetails.details.backup_source === 'local' ? t('本地备份') : t('远程备份') }} + +