Skip to content

Commit

Permalink
fix(frontend): 集群拓扑、实例视图基本信息补充 TencentBlueKing#8830
Browse files Browse the repository at this point in the history
  • Loading branch information
jinquantianxia authored and hLinx committed Jan 8, 2025
1 parent 6e7574b commit 7f235c4
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 25 deletions.
20 changes: 0 additions & 20 deletions dbm-ui/frontend/src/common/const/clusterTypeInfos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { MachineTypes } from './machineTypes';
export interface ClusterTypeInfoItem {
id: ClusterTypes;
name: string;
architectureName: string; // 部署架构名称
specClusterName: string; // 规格对应的集群名,磨平集群类型差异
dbType: DBTypes;
moduleId: ExtractedControllerDataKeys;
Expand All @@ -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',
Expand All @@ -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',
Expand All @@ -68,7 +65,6 @@ const spider: InfoType = {
[ClusterTypes.TENDBCLUSTER]: {
id: ClusterTypes.TENDBCLUSTER,
name: 'TenDBCluster',
architectureName: t('TendbCluster集群'),
specClusterName: 'TenDBCluster',
dbType: DBTypes.TENDBCLUSTER,
moduleId: 'mysql',
Expand All @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand All @@ -178,7 +169,6 @@ const bigdata: InfoType = {
[ClusterTypes.ES]: {
id: ClusterTypes.ES,
name: 'ElasticSearch',
architectureName: t('ES集群'),
specClusterName: 'ElasticSearch',
dbType: DBTypes.ES,
moduleId: 'bigdata',
Expand All @@ -200,7 +190,6 @@ const bigdata: InfoType = {
[ClusterTypes.KAFKA]: {
id: ClusterTypes.KAFKA,
name: 'Kafka',
architectureName: t('Kafka集群'),
specClusterName: 'Kafka',
dbType: DBTypes.KAFKA,
moduleId: 'bigdata',
Expand All @@ -218,7 +207,6 @@ const bigdata: InfoType = {
[ClusterTypes.HDFS]: {
id: ClusterTypes.HDFS,
name: 'HDFS',
architectureName: t('Hdfs集群'),
specClusterName: 'HDFS',
dbType: DBTypes.HDFS,
moduleId: 'bigdata',
Expand All @@ -236,7 +224,6 @@ const bigdata: InfoType = {
[ClusterTypes.INFLUXDB]: {
id: ClusterTypes.INFLUXDB,
name: 'InfuxDB',
architectureName: t('Influxdb实例'),
specClusterName: 'InfuxDB',
dbType: DBTypes.INFLUXDB,
moduleId: 'bigdata',
Expand All @@ -250,7 +237,6 @@ const bigdata: InfoType = {
[ClusterTypes.PULSAR]: {
id: ClusterTypes.PULSAR,
name: 'Pulsar',
architectureName: t('Pulsar集群'),
specClusterName: 'Pulsar',
dbType: DBTypes.PULSAR,
moduleId: 'bigdata',
Expand All @@ -272,7 +258,6 @@ const bigdata: InfoType = {
[ClusterTypes.DORIS]: {
id: ClusterTypes.DORIS,
name: 'Doris',
architectureName: t('Doris集群'),
specClusterName: 'Doris',
dbType: DBTypes.DORIS,
moduleId: 'bigdata',
Expand All @@ -294,7 +279,6 @@ const bigdata: InfoType = {
[ClusterTypes.RIAK]: {
id: ClusterTypes.RIAK,
name: 'Riak',
architectureName: t('Riak集群'),
specClusterName: 'Riak',
dbType: DBTypes.RIAK,
moduleId: 'bigdata',
Expand All @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions dbm-ui/frontend/src/services/model/mysql/tendbha-instance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 || '';
Expand Down
2 changes: 2 additions & 0 deletions dbm-ui/frontend/src/services/model/redis/redis-instance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 || '';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
},
{
label: t('部署架构'),
key: 'clusterTypeName',
key: 'cluster_type_name',
},
{
label: t('部署角色'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
},
{
label: t('部署架构'),
key: 'clusterTypeName',
key: 'cluster_type_name',
},
{
label: t('部署角色'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
},
{
label: t('部署架构'),
key: 'clusterTypeName',
key: 'cluster_type_name',
},
{
label: t('部署角色'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
},
{
label: t('部署架构'),
key: 'clusterTypeName',
key: 'cluster_type_name',
},
{
label: t('部署角色'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
},
{
label: t('部署架构'),
key: 'clusterTypeName',
key: 'cluster_type_name',
},
{
label: t('部署角色'),
Expand Down

0 comments on commit 7f235c4

Please sign in to comment.