From 65ed900ce8d18bde8ceb5ee0f314fff2a7e86a54 Mon Sep 17 00:00:00 2001 From: hLinx <327159425@qq.com> Date: Fri, 20 Dec 2024 18:16:15 +0800 Subject: [PATCH] =?UTF-8?q?chore(frontend):=20ts=20=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E8=B0=83=E6=95=B4=20#8748?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cluster-instance-status/Index.vue | 60 ++++++++ .../model/tendbcluster/tendbcluster.ts | 4 +- .../src/services/types/db/clusterListNode.ts | 1 + .../render-instances/RenderInstances.vue | 138 ++++++++---------- .../mysql/ha-cluster-list/components/List.vue | 3 +- 5 files changed, 122 insertions(+), 84 deletions(-) create mode 100644 dbm-ui/frontend/src/components/cluster-instance-status/Index.vue diff --git a/dbm-ui/frontend/src/components/cluster-instance-status/Index.vue b/dbm-ui/frontend/src/components/cluster-instance-status/Index.vue new file mode 100644 index 0000000000..43baf157db --- /dev/null +++ b/dbm-ui/frontend/src/components/cluster-instance-status/Index.vue @@ -0,0 +1,60 @@ + + + + + diff --git a/dbm-ui/frontend/src/services/model/tendbcluster/tendbcluster.ts b/dbm-ui/frontend/src/services/model/tendbcluster/tendbcluster.ts index 8ba032f26e..28486b1023 100644 --- a/dbm-ui/frontend/src/services/model/tendbcluster/tendbcluster.ts +++ b/dbm-ui/frontend/src/services/model/tendbcluster/tendbcluster.ts @@ -113,8 +113,8 @@ export default class TendbCluster { phase: 'online' | 'offline'; phase_name: string; region: string; - remote_db: ClusterListNode[]; - remote_dr: ClusterListNode[]; + remote_db: (ClusterListNode & { shard_id: number })[]; + remote_dr: (ClusterListNode & { shard_id: number })[]; remote_shard_num: number; slave_domain: string; spider_master: ClusterListNode[]; diff --git a/dbm-ui/frontend/src/services/types/db/clusterListNode.ts b/dbm-ui/frontend/src/services/types/db/clusterListNode.ts index e76a033b92..b8e114fe57 100644 --- a/dbm-ui/frontend/src/services/types/db/clusterListNode.ts +++ b/dbm-ui/frontend/src/services/types/db/clusterListNode.ts @@ -2,6 +2,7 @@ export interface ClusterListNode { bk_biz_id: number; bk_cloud_id: number; bk_host_id: number; + bk_sub_zone: string; bk_instance_id: number; instance: string; ip: string; diff --git a/dbm-ui/frontend/src/views/db-manage/common/render-instances/RenderInstances.vue b/dbm-ui/frontend/src/views/db-manage/common/render-instances/RenderInstances.vue index 4e0a5408ff..2cc9513b88 100644 --- a/dbm-ui/frontend/src/views/db-manage/common/render-instances/RenderInstances.vue +++ b/dbm-ui/frontend/src/views/db-manage/common/render-instances/RenderInstances.vue @@ -15,7 +15,7 @@

@@ -104,13 +104,24 @@

+ @request-finished="handleRequestFinished"> + + + + + {{ role }} + + + + + - - +