From 7f235c41dd9b5b72e5c46fdf4fcee72e8f40543f Mon Sep 17 00:00:00 2001 From: Austin <1344583166@qq.com> Date: Tue, 7 Jan 2025 16:09:04 +0800 Subject: [PATCH] =?UTF-8?q?fix(frontend):=20=E9=9B=86=E7=BE=A4=E6=8B=93?= =?UTF-8?q?=E6=89=91=E3=80=81=E5=AE=9E=E4=BE=8B=E8=A7=86=E5=9B=BE=E5=9F=BA?= =?UTF-8?q?=E6=9C=AC=E4=BF=A1=E6=81=AF=E8=A1=A5=E5=85=85=20#8830?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/common/const/clusterTypeInfos.ts | 20 ------------------- .../model/mongodb/mongodb-instance-detail.ts | 2 ++ .../services/model/mysql/tendbha-instance.ts | 2 ++ .../services/model/redis/redis-instance.ts | 2 ++ .../model/sqlserver/sqlserver-ha-instance.ts | 2 ++ .../detail/components/BaseInfo.vue | 2 +- .../components/detail/components/BaseInfo.vue | 2 +- .../components/detail/components/BaseInfo.vue | 2 +- .../components/detail/components/BaseInfo.vue | 2 +- .../components/detail/components/BaseInfo.vue | 2 +- 10 files changed, 13 insertions(+), 25 deletions(-) diff --git a/dbm-ui/frontend/src/common/const/clusterTypeInfos.ts b/dbm-ui/frontend/src/common/const/clusterTypeInfos.ts index d7fd4fa53d..54c040c316 100644 --- a/dbm-ui/frontend/src/common/const/clusterTypeInfos.ts +++ b/dbm-ui/frontend/src/common/const/clusterTypeInfos.ts @@ -9,7 +9,6 @@ import { MachineTypes } from './machineTypes'; export interface ClusterTypeInfoItem { id: ClusterTypes; name: string; - architectureName: string; // 部署架构名称 specClusterName: string; // 规格对应的集群名,磨平集群类型差异 dbType: DBTypes; moduleId: ExtractedControllerDataKeys; @@ -29,7 +28,6 @@ const mysql: InfoType = { [ClusterTypes.TENDBSINGLE]: { id: ClusterTypes.TENDBSINGLE, name: t('MySQL单节点'), - architectureName: t('MySQL单节点集群'), specClusterName: 'MySQL', dbType: DBTypes.MYSQL, moduleId: 'mysql', @@ -47,7 +45,6 @@ const mysql: InfoType = { [ClusterTypes.TENDBHA]: { id: ClusterTypes.TENDBHA, name: t('MySQL主从'), - architectureName: t('MySQL高可用集群'), specClusterName: 'MySQL', dbType: DBTypes.MYSQL, moduleId: 'mysql', @@ -68,7 +65,6 @@ const spider: InfoType = { [ClusterTypes.TENDBCLUSTER]: { id: ClusterTypes.TENDBCLUSTER, name: 'TenDBCluster', - architectureName: t('TendbCluster集群'), specClusterName: 'TenDBCluster', dbType: DBTypes.TENDBCLUSTER, moduleId: 'mysql', @@ -89,7 +85,6 @@ const redis: InfoType = { [ClusterTypes.TWEMPROXY_REDIS_INSTANCE]: { id: ClusterTypes.TWEMPROXY_REDIS_INSTANCE, name: 'TendisCache', - architectureName: t('TendisCache集群'), specClusterName: 'Redis', dbType: DBTypes.REDIS, moduleId: 'redis', @@ -107,7 +102,6 @@ const redis: InfoType = { [ClusterTypes.TWEMPROXY_TENDIS_SSD_INSTANCE]: { id: ClusterTypes.TWEMPROXY_TENDIS_SSD_INSTANCE, name: 'TendisSSD', - architectureName: t('TendisSSD集群'), specClusterName: 'Redis', dbType: DBTypes.REDIS, moduleId: 'redis', @@ -125,7 +119,6 @@ const redis: InfoType = { [ClusterTypes.PREDIXY_TENDISPLUS_CLUSTER]: { id: ClusterTypes.PREDIXY_TENDISPLUS_CLUSTER, name: 'Tendisplus', - architectureName: t('Tendisplus存储版集群'), specClusterName: 'Redis', dbType: DBTypes.REDIS, moduleId: 'redis', @@ -143,7 +136,6 @@ const redis: InfoType = { [ClusterTypes.PREDIXY_REDIS_CLUSTER]: { id: ClusterTypes.PREDIXY_REDIS_CLUSTER, name: 'RedisCluster', - architectureName: t('RedisCluster集群'), specClusterName: 'Redis', dbType: DBTypes.REDIS, moduleId: 'redis', @@ -161,7 +153,6 @@ const redis: InfoType = { [ClusterTypes.REDIS_INSTANCE]: { id: ClusterTypes.REDIS_INSTANCE, name: t('Redis主从'), - architectureName: t('RedisCache主从版'), specClusterName: 'Redis', dbType: DBTypes.REDIS, moduleId: 'redis', @@ -178,7 +169,6 @@ const bigdata: InfoType = { [ClusterTypes.ES]: { id: ClusterTypes.ES, name: 'ElasticSearch', - architectureName: t('ES集群'), specClusterName: 'ElasticSearch', dbType: DBTypes.ES, moduleId: 'bigdata', @@ -200,7 +190,6 @@ const bigdata: InfoType = { [ClusterTypes.KAFKA]: { id: ClusterTypes.KAFKA, name: 'Kafka', - architectureName: t('Kafka集群'), specClusterName: 'Kafka', dbType: DBTypes.KAFKA, moduleId: 'bigdata', @@ -218,7 +207,6 @@ const bigdata: InfoType = { [ClusterTypes.HDFS]: { id: ClusterTypes.HDFS, name: 'HDFS', - architectureName: t('Hdfs集群'), specClusterName: 'HDFS', dbType: DBTypes.HDFS, moduleId: 'bigdata', @@ -236,7 +224,6 @@ const bigdata: InfoType = { [ClusterTypes.INFLUXDB]: { id: ClusterTypes.INFLUXDB, name: 'InfuxDB', - architectureName: t('Influxdb实例'), specClusterName: 'InfuxDB', dbType: DBTypes.INFLUXDB, moduleId: 'bigdata', @@ -250,7 +237,6 @@ const bigdata: InfoType = { [ClusterTypes.PULSAR]: { id: ClusterTypes.PULSAR, name: 'Pulsar', - architectureName: t('Pulsar集群'), specClusterName: 'Pulsar', dbType: DBTypes.PULSAR, moduleId: 'bigdata', @@ -272,7 +258,6 @@ const bigdata: InfoType = { [ClusterTypes.DORIS]: { id: ClusterTypes.DORIS, name: 'Doris', - architectureName: t('Doris集群'), specClusterName: 'Doris', dbType: DBTypes.DORIS, moduleId: 'bigdata', @@ -294,7 +279,6 @@ const bigdata: InfoType = { [ClusterTypes.RIAK]: { id: ClusterTypes.RIAK, name: 'Riak', - architectureName: t('Riak集群'), specClusterName: 'Riak', dbType: DBTypes.RIAK, moduleId: 'bigdata', @@ -311,7 +295,6 @@ const mongodb: InfoType = { [ClusterTypes.MONGO_REPLICA_SET]: { id: ClusterTypes.MONGO_REPLICA_SET, name: t('Mongo副本集'), - architectureName: t('Mongo副本集'), specClusterName: 'MongoDB', dbType: DBTypes.MONGODB, moduleId: 'mongodb', @@ -325,7 +308,6 @@ const mongodb: InfoType = { [ClusterTypes.MONGO_SHARED_CLUSTER]: { id: ClusterTypes.MONGO_SHARED_CLUSTER, name: t('Mongo分片集群'), - architectureName: t('Mongo分片集群'), specClusterName: 'MongoDB', dbType: DBTypes.MONGODB, moduleId: 'mongodb', @@ -350,7 +332,6 @@ const sqlserver: InfoType = { [ClusterTypes.SQLSERVER_SINGLE]: { id: ClusterTypes.SQLSERVER_SINGLE, name: t('SQLServer单节点'), - architectureName: t('sqlserver单节点版'), specClusterName: 'SQLServer', dbType: DBTypes.SQLSERVER, moduleId: 'sqlserver', @@ -364,7 +345,6 @@ const sqlserver: InfoType = { [ClusterTypes.SQLSERVER_HA]: { id: ClusterTypes.SQLSERVER_HA, name: t('SQLServer主从'), - architectureName: t('sqlserver主从版'), specClusterName: 'SQLServer', dbType: DBTypes.SQLSERVER, moduleId: 'sqlserver', diff --git a/dbm-ui/frontend/src/services/model/mongodb/mongodb-instance-detail.ts b/dbm-ui/frontend/src/services/model/mongodb/mongodb-instance-detail.ts index 7bb8e72c3d..35151e0156 100644 --- a/dbm-ui/frontend/src/services/model/mongodb/mongodb-instance-detail.ts +++ b/dbm-ui/frontend/src/services/model/mongodb/mongodb-instance-detail.ts @@ -18,6 +18,7 @@ export default class MongodbInstanceDetail { cluster_id: number; cluster_name: string; cluster_type: string; + cluster_type_name: string; create_at: string; db_module_id: number; db_version: null; @@ -51,6 +52,7 @@ export default class MongodbInstanceDetail { this.cluster_id = payload.cluster_id; this.cluster_name = payload.cluster_name; this.cluster_type = payload.cluster_type; + this.cluster_type_name = payload.cluster_type_name; this.create_at = payload.create_at; this.db_module_id = payload.db_module_id; this.db_version = payload.db_version; diff --git a/dbm-ui/frontend/src/services/model/mysql/tendbha-instance.ts b/dbm-ui/frontend/src/services/model/mysql/tendbha-instance.ts index fad44d669a..536c609108 100644 --- a/dbm-ui/frontend/src/services/model/mysql/tendbha-instance.ts +++ b/dbm-ui/frontend/src/services/model/mysql/tendbha-instance.ts @@ -35,6 +35,7 @@ export default class TendbhaInstance { cluster_id: number; cluster_name: string; cluster_type: string; + cluster_type_name: string; create_at: string; db_module_id: number; db_module_name: string; @@ -71,6 +72,7 @@ export default class TendbhaInstance { this.cluster_id = payload.cluster_id || 0; this.cluster_name = payload.cluster_name || ''; this.cluster_type = payload.cluster_type || ''; + this.cluster_type_name = payload.cluster_type_name || ''; this.create_at = payload.create_at || ''; this.db_module_id = payload.db_module_id || 0; this.db_module_name = payload.db_module_name || ''; diff --git a/dbm-ui/frontend/src/services/model/redis/redis-instance.ts b/dbm-ui/frontend/src/services/model/redis/redis-instance.ts index 585b18292b..10b90ce848 100644 --- a/dbm-ui/frontend/src/services/model/redis/redis-instance.ts +++ b/dbm-ui/frontend/src/services/model/redis/redis-instance.ts @@ -36,6 +36,7 @@ export default class RedisInstance { cluster_id: number; cluster_name: string; cluster_type: string; + cluster_type_name: string; create_at: string; db_module_id: number; host_info: HostInfo; @@ -70,6 +71,7 @@ export default class RedisInstance { this.cluster_id = payload.cluster_id || 0; this.cluster_name = payload.cluster_name || ''; this.cluster_type = payload.cluster_type || ''; + this.cluster_type_name = payload.cluster_type_name || ''; this.create_at = payload.create_at || ''; this.db_module_id = payload.db_module_id || 0; this.db_version = payload.db_version || ''; diff --git a/dbm-ui/frontend/src/services/model/sqlserver/sqlserver-ha-instance.ts b/dbm-ui/frontend/src/services/model/sqlserver/sqlserver-ha-instance.ts index dc3c08d4a0..837feea140 100644 --- a/dbm-ui/frontend/src/services/model/sqlserver/sqlserver-ha-instance.ts +++ b/dbm-ui/frontend/src/services/model/sqlserver/sqlserver-ha-instance.ts @@ -35,6 +35,7 @@ export default class SqlServerHaInstance { cluster_id: number; cluster_name: string; cluster_type: string; + cluster_type_name: string; create_at: string; db_module_id: number; db_module_name: string; @@ -71,6 +72,7 @@ export default class SqlServerHaInstance { this.cluster_id = payload.cluster_id; this.cluster_name = payload.cluster_name; this.cluster_type = payload.cluster_type; + this.cluster_type_name = payload.cluster_type_name; this.create_at = payload.create_at; this.db_module_id = payload.db_module_id; this.db_module_name = payload.db_module_name; diff --git a/dbm-ui/frontend/src/views/db-manage/mongodb/mongodb-instance/detail/components/BaseInfo.vue b/dbm-ui/frontend/src/views/db-manage/mongodb/mongodb-instance/detail/components/BaseInfo.vue index 201d1e5be9..5a3a1d734c 100644 --- a/dbm-ui/frontend/src/views/db-manage/mongodb/mongodb-instance/detail/components/BaseInfo.vue +++ b/dbm-ui/frontend/src/views/db-manage/mongodb/mongodb-instance/detail/components/BaseInfo.vue @@ -101,7 +101,7 @@ }, { label: t('部署架构'), - key: 'clusterTypeName', + key: 'cluster_type_name', }, { label: t('部署角色'), diff --git a/dbm-ui/frontend/src/views/db-manage/mysql/ha-instance-list/components/detail/components/BaseInfo.vue b/dbm-ui/frontend/src/views/db-manage/mysql/ha-instance-list/components/detail/components/BaseInfo.vue index 7671fc8ad8..b9b3d58fcc 100644 --- a/dbm-ui/frontend/src/views/db-manage/mysql/ha-instance-list/components/detail/components/BaseInfo.vue +++ b/dbm-ui/frontend/src/views/db-manage/mysql/ha-instance-list/components/detail/components/BaseInfo.vue @@ -113,7 +113,7 @@ }, { label: t('部署架构'), - key: 'clusterTypeName', + key: 'cluster_type_name', }, { label: t('部署角色'), diff --git a/dbm-ui/frontend/src/views/db-manage/redis/instance-list-ha/components/detail/components/BaseInfo.vue b/dbm-ui/frontend/src/views/db-manage/redis/instance-list-ha/components/detail/components/BaseInfo.vue index 3aaacce74f..4d1f914b81 100644 --- a/dbm-ui/frontend/src/views/db-manage/redis/instance-list-ha/components/detail/components/BaseInfo.vue +++ b/dbm-ui/frontend/src/views/db-manage/redis/instance-list-ha/components/detail/components/BaseInfo.vue @@ -113,7 +113,7 @@ }, { label: t('部署架构'), - key: 'clusterTypeName', + key: 'cluster_type_name', }, { label: t('部署角色'), diff --git a/dbm-ui/frontend/src/views/db-manage/redis/instance-list/components/detail/components/BaseInfo.vue b/dbm-ui/frontend/src/views/db-manage/redis/instance-list/components/detail/components/BaseInfo.vue index ac0c21905c..79864a8fac 100644 --- a/dbm-ui/frontend/src/views/db-manage/redis/instance-list/components/detail/components/BaseInfo.vue +++ b/dbm-ui/frontend/src/views/db-manage/redis/instance-list/components/detail/components/BaseInfo.vue @@ -113,7 +113,7 @@ }, { label: t('部署架构'), - key: 'clusterTypeName', + key: 'cluster_type_name', }, { label: t('部署角色'), diff --git a/dbm-ui/frontend/src/views/db-manage/sqlserver/ha-instance-list/components/detail/components/BaseInfo.vue b/dbm-ui/frontend/src/views/db-manage/sqlserver/ha-instance-list/components/detail/components/BaseInfo.vue index d2549e7ea9..3ba88656eb 100644 --- a/dbm-ui/frontend/src/views/db-manage/sqlserver/ha-instance-list/components/detail/components/BaseInfo.vue +++ b/dbm-ui/frontend/src/views/db-manage/sqlserver/ha-instance-list/components/detail/components/BaseInfo.vue @@ -106,7 +106,7 @@ }, { label: t('部署架构'), - key: 'clusterTypeName', + key: 'cluster_type_name', }, { label: t('部署角色'),