diff --git a/dbm-ui/frontend/src/common/const/clusterAffinity.ts b/dbm-ui/frontend/src/common/const/clusterAffinity.ts new file mode 100644 index 0000000000..91a780a6f9 --- /dev/null +++ b/dbm-ui/frontend/src/common/const/clusterAffinity.ts @@ -0,0 +1,10 @@ +import { t } from '@locales/index'; + +export const ClusterAffinityMap = { + CROS_SUBZONE: t('同城跨园区'), + SAME_SUBZONE_CROSS_SWTICH: t('同城同园区跨机架'), + CROSS_RACK: t('跨机架'), + SAME_SUBZONE: t('同城同园区'), + NONE: t('同城无园区要求'), + MAX_EACH_ZONE_EQUAL: t('尽量均匀分布'), +}; diff --git a/dbm-ui/frontend/src/components/vue2/ip-selector/index.ts b/dbm-ui/frontend/src/components/vue2/ip-selector/index.ts index e3fcbc8721..b566c2a9f9 100644 --- a/dbm-ui/frontend/src/components/vue2/ip-selector/index.ts +++ b/dbm-ui/frontend/src/components/vue2/ip-selector/index.ts @@ -55,8 +55,15 @@ export const ipSelector = createFactory({ label: t('磁盘_GB'), field: 'bk_disk', }, + { + key: 'zone', + index: 7, + width: '100px', + label: t('所在园区'), + field: 'bk_sub_zone', + }, ], - hostTableRenderColumnList: ['ip', 'ipv6', 'cloudArea', 'alive', 'cpu', 'memo', 'disk'], + hostTableRenderColumnList: ['ip', 'ipv6', 'cloudArea', 'alive', 'cpu', 'memo', 'disk', 'zone'], fetchTopologyHostCount: getHostTopo, fetchTopologyHostsNodes: getHosts, fetchTopologyHostIdsNodes: getHostIdInfos, diff --git a/dbm-ui/frontend/src/services/model/doris/doris.ts b/dbm-ui/frontend/src/services/model/doris/doris.ts index 90bc24a545..3566d9b0e1 100644 --- a/dbm-ui/frontend/src/services/model/doris/doris.ts +++ b/dbm-ui/frontend/src/services/model/doris/doris.ts @@ -13,9 +13,10 @@ import { uniq } from 'lodash'; -import type { ClusterListEntry, ClusterListNode, ClusterListOperation } from '@services/types'; +import type { ClusterListEntry, ClusterListNode, ClusterListOperation, ClusterListSpec } from '@services/types'; import { TicketTypes } from '@common/const'; +import { ClusterAffinityMap } from '@common/const/clusterAffinity'; import { isRecentDays, utcDisplayTime } from '@utils'; @@ -58,16 +59,19 @@ export default class Doris { bk_biz_name: number; bk_cloud_id: number; bk_cloud_name: string; + bk_sub_zone: string; cluster_access_port: number; cluster_alias: string; cluster_entry: ClusterListEntry[]; cluster_name: string; + cluster_spec: ClusterListSpec; cluster_stats: Record<'used' | 'total' | 'in_use', number>; cluster_time_zone: string; cluster_type: string; cluster_type_name: string; create_at: string; creator: string; + disaster_tolerance_level: keyof typeof ClusterAffinityMap; domain: string; doris_backend_cold: Array; doris_backend_hot: Array; @@ -99,16 +103,19 @@ export default class Doris { this.bk_biz_name = payload.bk_biz_name; this.bk_cloud_id = payload.bk_cloud_id; this.bk_cloud_name = payload.bk_cloud_name; + this.bk_sub_zone = payload.bk_sub_zone; this.cluster_access_port = payload.cluster_access_port; this.cluster_alias = payload.cluster_alias; this.cluster_entry = payload.cluster_entry; this.cluster_name = payload.cluster_name; + this.cluster_spec = payload.cluster_spec || {}; this.cluster_stats = payload.cluster_stats || {}; this.cluster_type = payload.cluster_type; this.cluster_type_name = payload.cluster_type_name; this.cluster_time_zone = payload.cluster_time_zone; this.create_at = payload.create_at; this.creator = payload.creator; + this.disaster_tolerance_level = payload.disaster_tolerance_level; this.domain = payload.domain; this.doris_backend_cold = payload.doris_backend_cold; this.doris_backend_hot = payload.doris_backend_hot; @@ -246,4 +253,8 @@ export default class Doris { return payload; } + + get disasterToleranceLevelName() { + return ClusterAffinityMap[this.disaster_tolerance_level]; + } } diff --git a/dbm-ui/frontend/src/services/model/es/es.ts b/dbm-ui/frontend/src/services/model/es/es.ts index 921baad7ee..269a0fe0bc 100644 --- a/dbm-ui/frontend/src/services/model/es/es.ts +++ b/dbm-ui/frontend/src/services/model/es/es.ts @@ -12,7 +12,9 @@ */ import { uniq } from 'lodash'; -import type { ClusterListEntry, ClusterListNode, ClusterListOperation } from '@services/types'; +import type { ClusterListEntry, ClusterListNode, ClusterListOperation, ClusterListSpec } from '@services/types'; + +import { ClusterAffinityMap } from '@common/const/clusterAffinity'; import { isRecentDays, utcDisplayTime } from '@utils'; @@ -55,10 +57,12 @@ export default class Es { bk_biz_name: number; bk_cloud_id: number; bk_cloud_name: string; + bk_sub_zone: string; cluster_access_port: number; cluster_alias: string; cluster_entry: ClusterListEntry[]; cluster_name: string; + cluster_spec: ClusterListSpec; cluster_stats: Record<'used' | 'total' | 'in_use', number>; cluster_time_zone: string; cluster_type: string; @@ -67,6 +71,7 @@ export default class Es { creator: string; db_module_id: number; db_module_name: number; + disaster_tolerance_level: keyof typeof ClusterAffinityMap; domain: string; es_client: Array; es_datanode_cold: Array; @@ -101,10 +106,12 @@ export default class Es { this.bk_biz_name = payload.bk_biz_name; this.bk_cloud_id = payload.bk_cloud_id; this.bk_cloud_name = payload.bk_cloud_name; + this.bk_sub_zone = payload.bk_sub_zone; this.cluster_access_port = payload.cluster_access_port; this.cluster_alias = payload.cluster_alias; this.cluster_entry = payload.cluster_entry; this.cluster_name = payload.cluster_name; + this.cluster_spec = payload.cluster_spec || {}; this.cluster_stats = payload.cluster_stats || {}; this.cluster_type = payload.cluster_type; this.cluster_type_name = payload.cluster_type_name; @@ -113,6 +120,7 @@ export default class Es { this.creator = payload.creator; this.db_module_id = payload.db_module_id; this.db_module_name = payload.db_module_name; + this.disaster_tolerance_level = payload.disaster_tolerance_level; this.domain = payload.domain; this.es_datanode_cold = payload.es_datanode_cold; this.es_datanode_hot = payload.es_datanode_hot; @@ -244,4 +252,8 @@ export default class Es { return payload; } + + get disasterToleranceLevelName() { + return ClusterAffinityMap[this.disaster_tolerance_level]; + } } diff --git a/dbm-ui/frontend/src/services/model/hdfs/hdfs.ts b/dbm-ui/frontend/src/services/model/hdfs/hdfs.ts index a6b4761b95..089d481afd 100644 --- a/dbm-ui/frontend/src/services/model/hdfs/hdfs.ts +++ b/dbm-ui/frontend/src/services/model/hdfs/hdfs.ts @@ -12,7 +12,9 @@ */ import { uniq } from 'lodash'; -import type { ClusterListEntry, ClusterListNode, ClusterListOperation } from '@services/types'; +import type { ClusterListEntry, ClusterListNode, ClusterListOperation, ClusterListSpec } from '@services/types'; + +import { ClusterAffinityMap } from '@common/const/clusterAffinity'; import { isRecentDays, utcDisplayTime } from '@utils'; @@ -55,10 +57,12 @@ export default class Hdfs { bk_biz_name: string; bk_cloud_id: number; bk_cloud_name: string; + bk_sub_zone: string; cluster_access_port: number; cluster_alias: string; cluster_entry: ClusterListEntry[]; cluster_name: string; + cluster_spec: ClusterListSpec; cluster_stats: Record<'used' | 'total' | 'in_use', number>; cluster_time_zone: string; cluster_type: string; @@ -67,6 +71,7 @@ export default class Hdfs { creator: string; db_module_id: number; db_module_name: string; + disaster_tolerance_level: keyof typeof ClusterAffinityMap; domain: string; hdfs_datanode: Array; hdfs_journalnode: Array; @@ -100,10 +105,12 @@ export default class Hdfs { this.bk_biz_name = payload.bk_biz_name; this.bk_cloud_id = payload.bk_cloud_id; this.bk_cloud_name = payload.bk_cloud_name; + this.bk_sub_zone = payload.bk_sub_zone; this.cluster_access_port = payload.cluster_access_port; this.cluster_alias = payload.cluster_alias; this.cluster_entry = payload.cluster_entry; this.cluster_name = payload.cluster_name; + this.cluster_spec = payload.cluster_spec || {}; this.cluster_stats = payload.cluster_stats || {}; this.cluster_type = payload.cluster_type; this.cluster_type_name = payload.cluster_type_name; @@ -112,6 +119,7 @@ export default class Hdfs { this.creator = payload.creator; this.db_module_id = payload.db_module_id; this.db_module_name = payload.db_module_name; + this.disaster_tolerance_level = payload.disaster_tolerance_level; this.domain = payload.domain; this.hdfs_datanode = payload.hdfs_datanode; this.hdfs_journalnode = payload.hdfs_journalnode; @@ -242,4 +250,7 @@ export default class Hdfs { get isNew() { return isRecentDays(this.create_at, 24); } + get disasterToleranceLevelName() { + return ClusterAffinityMap[this.disaster_tolerance_level]; + } } diff --git a/dbm-ui/frontend/src/services/model/kafka/kafka.ts b/dbm-ui/frontend/src/services/model/kafka/kafka.ts index b88e091e3c..d5bd57dafc 100644 --- a/dbm-ui/frontend/src/services/model/kafka/kafka.ts +++ b/dbm-ui/frontend/src/services/model/kafka/kafka.ts @@ -12,7 +12,9 @@ */ import { uniq } from 'lodash'; -import type { ClusterListEntry, ClusterListNode, ClusterListOperation } from '@services/types'; +import type { ClusterListEntry, ClusterListNode, ClusterListOperation, ClusterListSpec } from '@services/types'; + +import { ClusterAffinityMap } from '@common/const/clusterAffinity'; import { isRecentDays, utcDisplayTime } from '@utils'; @@ -55,11 +57,13 @@ export default class Kafka { bk_biz_name: number; bk_cloud_id: number; bk_cloud_name: string; + bk_sub_zone: string; broker: Array; cluster_access_port: number; cluster_alias: string; cluster_entry: ClusterListEntry[]; cluster_name: string; + cluster_spec: ClusterListSpec; cluster_stats: Record<'used' | 'total' | 'in_use', number>; cluster_time_zone: string; cluster_type: string; @@ -68,6 +72,7 @@ export default class Kafka { creator: string; db_module_id: number; db_module_name: number; + disaster_tolerance_level: keyof typeof ClusterAffinityMap; domain: string; id: number; major_version: string; @@ -98,12 +103,14 @@ export default class Kafka { this.bk_biz_name = payload.bk_biz_name; this.bk_cloud_id = payload.bk_cloud_id; this.bk_cloud_name = payload.bk_cloud_name; + this.bk_sub_zone = payload.bk_sub_zone; this.broker = payload.broker; this.cluster_access_port = payload.cluster_access_port; this.cluster_alias = payload.cluster_alias; this.cluster_entry = payload.cluster_entry; this.cluster_name = payload.cluster_name; this.cluster_time_zone = payload.cluster_time_zone; + this.cluster_spec = payload.cluster_spec || {}; this.cluster_stats = payload.cluster_stats || {}; this.cluster_type = payload.cluster_type; this.cluster_type_name = payload.cluster_type_name; @@ -111,6 +118,7 @@ export default class Kafka { this.creator = payload.creator; this.db_module_id = payload.db_module_id; this.db_module_name = payload.db_module_name; + this.disaster_tolerance_level = payload.disaster_tolerance_level; this.domain = payload.domain; this.id = payload.id; this.major_version = payload.major_version; @@ -231,4 +239,8 @@ export default class Kafka { get isNew() { return isRecentDays(this.create_at, 24 * 3); } + + get disasterToleranceLevelName() { + return ClusterAffinityMap[this.disaster_tolerance_level]; + } } diff --git a/dbm-ui/frontend/src/services/model/mongodb/mongodb-detail.ts b/dbm-ui/frontend/src/services/model/mongodb/mongodb-detail.ts index ab55dde04b..6093af8e40 100644 --- a/dbm-ui/frontend/src/services/model/mongodb/mongodb-detail.ts +++ b/dbm-ui/frontend/src/services/model/mongodb/mongodb-detail.ts @@ -15,6 +15,7 @@ import ClusterEntryDetailModel from '@services/model/cluster-entry/cluster-entry import type { ClusterListEntry } from '@services/types'; import { TicketTypes } from '@common/const'; +import { ClusterAffinityMap } from '@common/const/clusterAffinity'; import { utcDisplayTime } from '@utils'; @@ -85,6 +86,7 @@ export default class MongodbDetail { creator: string; db_module_id: number; db_module_name: string; + disaster_tolerance_level: keyof typeof ClusterAffinityMap; id: number; instances: { bk_cloud_id: number; @@ -211,6 +213,7 @@ export default class MongodbDetail { this.creator = payload.creator; this.db_module_id = payload.db_module_id; this.db_module_name = payload.db_module_name; + this.disaster_tolerance_level = payload.disaster_tolerance_level; this.id = payload.id; this.instances = payload.instances; this.major_version = payload.major_version; @@ -358,4 +361,8 @@ export default class MongodbDetail { } return ''; } + + get disasterToleranceLevelName() { + return ClusterAffinityMap[this.disaster_tolerance_level]; + } } diff --git a/dbm-ui/frontend/src/services/model/mongodb/mongodb-instance.ts b/dbm-ui/frontend/src/services/model/mongodb/mongodb-instance.ts index 5b1be107cc..9c35beb718 100644 --- a/dbm-ui/frontend/src/services/model/mongodb/mongodb-instance.ts +++ b/dbm-ui/frontend/src/services/model/mongodb/mongodb-instance.ts @@ -34,6 +34,7 @@ export default class MongodbInstance { bk_cloud_id: number; bk_cloud_name: string; + bk_sub_zone: string; bk_host_id: number; cluster_id: number; cluster_name: string; @@ -60,6 +61,7 @@ export default class MongodbInstance { this.bk_cloud_id = payload.bk_cloud_id; this.bk_cloud_name = payload.bk_cloud_name; this.bk_host_id = payload.bk_host_id; + this.bk_sub_zone = payload.bk_sub_zone; this.cluster_id = payload.cluster_id; this.cluster_name = payload.cluster_name; this.cluster_type = payload.cluster_type; diff --git a/dbm-ui/frontend/src/services/model/mongodb/mongodb.ts b/dbm-ui/frontend/src/services/model/mongodb/mongodb.ts index 4bf73751c2..333d6f2504 100644 --- a/dbm-ui/frontend/src/services/model/mongodb/mongodb.ts +++ b/dbm-ui/frontend/src/services/model/mongodb/mongodb.ts @@ -17,6 +17,7 @@ import { uniq } from 'lodash'; import type { ClusterListEntry } from '@services/types'; import { PipelineStatus, TicketTypes } from '@common/const'; +import { ClusterAffinityMap } from '@common/const/clusterAffinity'; import { utcDisplayTime } from '@utils'; @@ -81,6 +82,7 @@ export default class Mongodb { bk_biz_name: string; bk_cloud_id: number; bk_cloud_name: string; + bk_sub_zone: string; cluster_access_port: number; cluster_alias: string; cluster_entry: ClusterListEntry[]; @@ -93,7 +95,7 @@ export default class Mongodb { creator: string; db_module_id: number; db_module_name: string; - disaster_tolerance_level: string; + disaster_tolerance_level: keyof typeof ClusterAffinityMap; id: number; major_version: string; master_domain: string; @@ -135,6 +137,7 @@ export default class Mongodb { this.bk_biz_name = payload.bk_biz_name; this.bk_cloud_id = payload.bk_cloud_id; this.bk_cloud_name = payload.bk_cloud_name; + this.bk_sub_zone = payload.bk_sub_zone; this.db_module_id = payload.db_module_id; this.db_module_name = payload.db_module_name; this.cluster_access_port = payload.cluster_access_port; @@ -366,4 +369,8 @@ export default class Mongodb { return prevList; }, []); } + + get disasterToleranceLevelName() { + return ClusterAffinityMap[this.disaster_tolerance_level]; + } } 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 105af084fa..253ebe2733 100644 --- a/dbm-ui/frontend/src/services/model/mysql/tendbha-instance.ts +++ b/dbm-ui/frontend/src/services/model/mysql/tendbha-instance.ts @@ -18,7 +18,12 @@ import { utcDisplayTime } from '@utils'; export default class TendbhaInstance { bk_cloud_id: number; bk_cloud_name: string; + bk_cpu: number; + db_version: string; + bk_disk: number; bk_host_id: number; + bk_mem: number; + bk_sub_zone: string; cluster_id: number; cluster_name: string; cluster_type: string; @@ -45,13 +50,18 @@ export default class TendbhaInstance { constructor(payload = {} as TendbhaInstance) { this.bk_cloud_id = payload.bk_cloud_id || 0; this.bk_cloud_name = payload.bk_cloud_name || ''; + this.bk_cpu = payload.bk_cpu || 0; + this.bk_disk = payload.bk_disk || 0; this.bk_host_id = payload.bk_host_id || 0; + this.bk_mem = payload.bk_mem || 0; + this.bk_sub_zone = payload.bk_sub_zone || ''; this.cluster_id = payload.cluster_id || 0; this.cluster_name = payload.cluster_name || ''; this.cluster_type = payload.cluster_type || ''; this.create_at = payload.create_at || ''; this.db_module_id = payload.db_module_id || 0; this.db_module_name = payload.db_module_name || ''; + this.db_version = payload.db_version || ''; this.host_info = payload.host_info || {}; this.id = payload.id || 0; this.instance_address = payload.instance_address || ''; diff --git a/dbm-ui/frontend/src/services/model/mysql/tendbha.ts b/dbm-ui/frontend/src/services/model/mysql/tendbha.ts index bf4ba233cf..d4eb28b3e0 100644 --- a/dbm-ui/frontend/src/services/model/mysql/tendbha.ts +++ b/dbm-ui/frontend/src/services/model/mysql/tendbha.ts @@ -14,6 +14,8 @@ import { uniq } from 'lodash'; import type { ClusterListEntry, ClusterListNode, ClusterListOperation } from '@services/types'; +import { ClusterAffinityMap } from '@common/const/clusterAffinity'; + import { isRecentDays, utcDisplayTime } from '@utils'; import { t } from '@locales/index'; @@ -48,6 +50,7 @@ export default class Tendbha { bk_biz_name: string; bk_cloud_id: number; bk_cloud_name: string; + bk_sub_zone: string; cluster_access_port: number; cluster_alias: string; cluster_entry: ClusterListEntry[]; @@ -60,6 +63,7 @@ export default class Tendbha { creator: string; db_module_id: number; db_module_name: string; + disaster_tolerance_level: keyof typeof ClusterAffinityMap; id: number; immute_domain: string; major_version: string; @@ -90,6 +94,7 @@ export default class Tendbha { this.bk_biz_name = payload.bk_biz_name || ''; this.bk_cloud_id = payload.bk_cloud_id || 0; this.bk_cloud_name = payload.bk_cloud_name || ''; + this.bk_sub_zone = payload.bk_sub_zone; this.cluster_access_port = payload.cluster_access_port; this.cluster_alias = payload.cluster_alias; this.cluster_entry = payload.cluster_entry || []; @@ -102,6 +107,7 @@ export default class Tendbha { this.creator = payload.creator || ''; this.db_module_name = payload.db_module_name || ''; this.db_module_id = payload.db_module_id || 0; + this.disaster_tolerance_level = payload.disaster_tolerance_level; this.id = payload.id || 0; this.immute_domain = payload.immute_domain || ''; this.master_domain = payload.master_domain || ''; @@ -232,4 +238,7 @@ export default class Tendbha { get isNew() { return isRecentDays(this.create_at, 24); } + get disasterToleranceLevelName() { + return ClusterAffinityMap[this.disaster_tolerance_level]; + } } diff --git a/dbm-ui/frontend/src/services/model/pulsar/pulsar.ts b/dbm-ui/frontend/src/services/model/pulsar/pulsar.ts index b908e3b61d..938717c859 100644 --- a/dbm-ui/frontend/src/services/model/pulsar/pulsar.ts +++ b/dbm-ui/frontend/src/services/model/pulsar/pulsar.ts @@ -13,6 +13,9 @@ import { uniq } from 'lodash'; import ClusterEntryDetailModel from '@services/model/cluster-entry/cluster-entry-details'; +import type { ClusterListSpec } from '@services/types'; + +import { ClusterAffinityMap } from '@common/const/clusterAffinity'; import { isRecentDays, utcDisplayTime } from '@utils'; @@ -68,9 +71,11 @@ export default class Pulsar { bk_biz_name: string; bk_cloud_name: string; bk_cloud_id: number; + bk_sub_zone: string; cap_usage: number; cluster_alias: string; cluster_name: string; + cluster_spec: ClusterListSpec; cluster_stats: Record<'used' | 'total' | 'in_use', number>; cluster_type: string; cluster_type_name: string; @@ -78,6 +83,7 @@ export default class Pulsar { cluster_entry_details: ClusterEntryDetailModel[]; create_at: string; creator: string; + disaster_tolerance_level: keyof typeof ClusterAffinityMap; domain: string; id: number; major_version: string; @@ -115,9 +121,11 @@ export default class Pulsar { this.bk_biz_name = payload.bk_biz_name; this.bk_cloud_id = payload.bk_cloud_id; this.bk_cloud_name = payload.bk_cloud_name; + this.bk_sub_zone = payload.bk_sub_zone; this.cap_usage = payload.cap_usage; this.cluster_alias = payload.cluster_alias; this.cluster_name = payload.cluster_name; + this.cluster_spec = payload.cluster_spec || {}; this.cluster_stats = payload.cluster_stats || {}; this.cluster_type = payload.cluster_type; this.cluster_type_name = payload.cluster_type_name; @@ -125,6 +133,7 @@ export default class Pulsar { this.cluster_entry_details = payload.cluster_entry_details.map((item) => new ClusterEntryDetailModel(item)); this.create_at = payload.create_at; this.creator = payload.creator; + this.disaster_tolerance_level = payload.disaster_tolerance_level; this.domain = payload.domain; this.id = payload.id; this.major_version = payload.major_version; @@ -252,4 +261,8 @@ export default class Pulsar { get isStarting() { return Boolean(this.operations.find((item) => item.ticket_type === Pulsar.PULSAR_ENABLE)); } + + get disasterToleranceLevelName() { + return ClusterAffinityMap[this.disaster_tolerance_level]; + } } 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 ab8f3082b8..ada84eba84 100644 --- a/dbm-ui/frontend/src/services/model/redis/redis-instance.ts +++ b/dbm-ui/frontend/src/services/model/redis/redis-instance.ts @@ -20,7 +20,12 @@ import { isRecentDays, utcDisplayTime } from '@utils'; export default class RedisInstance { bk_cloud_id: number; bk_cloud_name: string; + bk_cpu: number; + bk_disk: number; bk_host_id: number; + bk_mem: number; + db_version: string; + bk_sub_zone: string; cluster_id: number; cluster_name: string; cluster_type: string; @@ -45,12 +50,17 @@ export default class RedisInstance { constructor(payload = {} as RedisInstance) { this.bk_cloud_id = payload.bk_cloud_id || 0; this.bk_cloud_name = payload.bk_cloud_name || ''; + this.bk_cpu = payload.bk_cpu || 0; + this.bk_disk = payload.bk_disk || 0; this.bk_host_id = payload.bk_host_id || 0; + this.bk_mem = payload.bk_mem || 0; + this.bk_sub_zone = payload.bk_sub_zone || ''; this.cluster_id = payload.cluster_id || 0; this.cluster_name = payload.cluster_name || ''; this.cluster_type = payload.cluster_type || ''; this.create_at = payload.create_at || ''; this.db_module_id = payload.db_module_id || 0; + this.db_version = payload.db_version || ''; this.host_info = payload.host_info || {}; this.id = payload.id || 0; this.instance_address = payload.instance_address || ''; diff --git a/dbm-ui/frontend/src/services/model/redis/redis.ts b/dbm-ui/frontend/src/services/model/redis/redis.ts index 2a1b5abb74..eb5cf4d578 100644 --- a/dbm-ui/frontend/src/services/model/redis/redis.ts +++ b/dbm-ui/frontend/src/services/model/redis/redis.ts @@ -14,6 +14,8 @@ import { uniq } from 'lodash'; import type { ClusterListEntry, ClusterListNode, ClusterListOperation, ClusterListSpec } from '@services/types'; +import { ClusterAffinityMap } from '@common/const/clusterAffinity'; + import { isRecentDays, utcDisplayTime } from '@utils'; import { t } from '@locales/index'; @@ -48,6 +50,7 @@ export default class Redis { bk_biz_name: string; bk_cloud_id: number; bk_cloud_name: string; + bk_sub_zone: string; cluster_access_port: number; cluster_alias: string; cluster_capacity: number; @@ -63,6 +66,7 @@ export default class Redis { creator: string; db_module_id: number; db_module_name: string; + disaster_tolerance_level: keyof typeof ClusterAffinityMap; dns_to_clb: boolean; id: number; machine_pair_cnt: number; @@ -100,13 +104,14 @@ export default class Redis { this.bk_biz_name = payload.bk_biz_name; this.bk_cloud_id = payload.bk_cloud_id; this.bk_cloud_name = payload.bk_cloud_name; + this.bk_sub_zone = payload.bk_sub_zone; this.cluster_access_port = payload.cluster_access_port; this.cluster_alias = payload.cluster_alias; this.cluster_capacity = payload.cluster_capacity; this.cluster_entry = payload.cluster_entry || []; this.cluster_name = payload.cluster_name; this.cluster_shard_num = payload.cluster_shard_num; - this.cluster_spec = payload.cluster_spec; + this.cluster_spec = payload.cluster_spec || {}; this.cluster_stats = payload.cluster_stats || {}; this.cluster_time_zone = payload.cluster_time_zone; this.cluster_type = payload.cluster_type; @@ -115,6 +120,7 @@ export default class Redis { this.creator = payload.creator; this.db_module_id = payload.db_module_id; this.db_module_name = payload.db_module_name; + this.disaster_tolerance_level = payload.disaster_tolerance_level; this.dns_to_clb = payload.dns_to_clb; this.id = payload.id; this.machine_pair_cnt = payload.machine_pair_cnt; @@ -316,4 +322,8 @@ export default class Redis { ticketId: item.ticket_id, })); } + + get disasterToleranceLevelName() { + return ClusterAffinityMap[this.disaster_tolerance_level]; + } } diff --git a/dbm-ui/frontend/src/services/model/riak/riak.ts b/dbm-ui/frontend/src/services/model/riak/riak.ts index 7f1a9aa4d7..cb8f2fdc31 100644 --- a/dbm-ui/frontend/src/services/model/riak/riak.ts +++ b/dbm-ui/frontend/src/services/model/riak/riak.ts @@ -15,6 +15,8 @@ import { uniq } from 'lodash'; import type { ClusterListEntry, ClusterListNode, ClusterListOperation } from '@services/types'; +import { ClusterAffinityMap } from '@common/const/clusterAffinity'; + import { isRecentDays, utcDisplayTime } from '@utils'; import { t } from '@locales/index'; @@ -50,6 +52,7 @@ export default class Riak { bk_biz_name: string; bk_cloud_id: number; bk_cloud_name: string; + bk_sub_zone: string; cluster_access_port: number; cluster_alias: string; cluster_entry: ClusterListEntry[]; @@ -62,6 +65,7 @@ export default class Riak { creator: string; db_module_id: number; db_module_name: string; + disaster_tolerance_level: keyof typeof ClusterAffinityMap; domain: string; id: number; major_version: string; @@ -92,6 +96,7 @@ export default class Riak { this.bk_biz_name = payload.bk_biz_name || ''; this.bk_cloud_id = payload.bk_cloud_id || 0; this.bk_cloud_name = payload.bk_cloud_name || ''; + this.bk_sub_zone = payload.bk_sub_zone; this.cluster_access_port = payload.cluster_access_port; this.cluster_alias = payload.cluster_alias; this.cluster_entry = payload.cluster_entry || []; @@ -104,6 +109,7 @@ export default class Riak { this.creator = payload.creator || ''; this.db_module_id = payload.db_module_id || 0; this.db_module_name = payload.db_module_name || ''; + this.disaster_tolerance_level = payload.disaster_tolerance_level; this.domain = payload.domain; this.id = payload.id || 0; this.master_domain = payload.master_domain || ''; @@ -223,4 +229,8 @@ export default class Riak { ticketId: item.ticket_id, })); } + + get disasterToleranceLevelName() { + return ClusterAffinityMap[this.disaster_tolerance_level]; + } } 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 9979a973b4..b07dcc80a1 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 @@ -20,7 +20,11 @@ import { isRecentDays, utcDisplayTime } from '@utils'; export default class SqlServerHaInstance { bk_cloud_id: number; bk_cloud_name: string; + bk_cpu: number; + bk_disk: number; bk_host_id: number; + bk_mem: number; + bk_sub_zone: string; cluster_id: number; cluster_name: string; cluster_type: string; @@ -47,7 +51,11 @@ export default class SqlServerHaInstance { constructor(payload: SqlServerHaInstance) { this.bk_cloud_id = payload.bk_cloud_id; this.bk_cloud_name = payload.bk_cloud_name; + this.bk_cpu = payload.bk_cpu; + this.bk_disk = payload.bk_disk; this.bk_host_id = payload.bk_host_id; + this.bk_mem = payload.bk_mem; + this.bk_sub_zone = payload.bk_sub_zone; this.cluster_id = payload.cluster_id; this.cluster_name = payload.cluster_name; this.cluster_type = payload.cluster_type; diff --git a/dbm-ui/frontend/src/services/model/sqlserver/sqlserver-ha.ts b/dbm-ui/frontend/src/services/model/sqlserver/sqlserver-ha.ts index 21f033df53..6bcbdb5060 100644 --- a/dbm-ui/frontend/src/services/model/sqlserver/sqlserver-ha.ts +++ b/dbm-ui/frontend/src/services/model/sqlserver/sqlserver-ha.ts @@ -15,6 +15,8 @@ import { uniq } from 'lodash'; import type { ClusterListEntry, ClusterListNode, ClusterListOperation, ClusterListSpec } from '@services/types'; +import { ClusterAffinityMap } from '@common/const/clusterAffinity'; + import { t } from '@locales/index'; import DateTime from '../_dateTime'; @@ -45,6 +47,7 @@ export default class SqlServerHaCluster extends DateTime { bk_biz_name: string; bk_cloud_id: number; bk_cloud_name: string; + bk_sub_zone: string; cluster_access_port: number; cluster_alias: string; cluster_entry: ClusterListEntry[]; @@ -57,6 +60,7 @@ export default class SqlServerHaCluster extends DateTime { creator: string; db_module_id: number; db_module_name: string; + disaster_tolerance_level: keyof typeof ClusterAffinityMap; id: number; major_version: string; master_domain: string; @@ -83,6 +87,7 @@ export default class SqlServerHaCluster extends DateTime { this.bk_biz_name = payload.bk_biz_name; this.bk_cloud_id = payload.bk_cloud_id; this.bk_cloud_name = payload.bk_cloud_name; + this.bk_sub_zone = payload.bk_sub_zone; this.cluster_access_port = payload.cluster_access_port; this.cluster_alias = payload.cluster_alias; this.cluster_entry = payload.cluster_entry || []; @@ -95,6 +100,7 @@ export default class SqlServerHaCluster extends DateTime { this.creator = payload.creator; this.db_module_id = payload.db_module_id; this.db_module_name = payload.db_module_name; + this.disaster_tolerance_level = payload.disaster_tolerance_level; this.id = payload.id; this.major_version = payload.major_version; this.master_domain = payload.master_domain; @@ -229,4 +235,8 @@ export default class SqlServerHaCluster extends DateTime { get isStarting() { return Boolean(this.operations.find((item) => item.ticket_type === SqlServerHaCluster.SQLSERVER_ENABLE)); } + + get disasterToleranceLevelName() { + return ClusterAffinityMap[this.disaster_tolerance_level]; + } } diff --git a/dbm-ui/frontend/src/services/model/tendbcluster/tendbcluster-instance.ts b/dbm-ui/frontend/src/services/model/tendbcluster/tendbcluster-instance.ts index aa69a23211..d2255183c5 100644 --- a/dbm-ui/frontend/src/services/model/tendbcluster/tendbcluster-instance.ts +++ b/dbm-ui/frontend/src/services/model/tendbcluster/tendbcluster-instance.ts @@ -18,6 +18,7 @@ export default class TendbInstance { bk_cloud_id: number; bk_cloud_name: string; bk_host_id: number; + bk_sub_zone: string; cluster_id: number; cluster_name: string; cluster_type: string; @@ -45,6 +46,7 @@ export default class TendbInstance { this.bk_cloud_id = payload.bk_cloud_id; this.bk_cloud_name = payload.bk_cloud_name; this.bk_host_id = payload.bk_host_id; + this.bk_sub_zone = payload.bk_sub_zone; this.cluster_id = payload.cluster_id; this.cluster_name = payload.cluster_name; this.cluster_type = payload.cluster_type; diff --git a/dbm-ui/frontend/src/services/model/tendbcluster/tendbcluster.ts b/dbm-ui/frontend/src/services/model/tendbcluster/tendbcluster.ts index 837159351f..6acc9820f8 100644 --- a/dbm-ui/frontend/src/services/model/tendbcluster/tendbcluster.ts +++ b/dbm-ui/frontend/src/services/model/tendbcluster/tendbcluster.ts @@ -15,6 +15,8 @@ import { uniq } from 'lodash'; import type { ClusterListEntry, ClusterListNode, ClusterListOperation, ClusterListSpec } from '@services/types'; +import { ClusterAffinityMap } from '@common/const/clusterAffinity'; + import { isRecentDays, utcDisplayTime } from '@utils'; import { t } from '@locales/index'; @@ -74,6 +76,7 @@ export default class TendbCluster { bk_biz_name: string; bk_cloud_id: number; bk_cloud_name: string; + bk_sub_zone: string; cluster_access_port: number; cluster_alias: string; cluster_capacity: number; @@ -89,6 +92,7 @@ export default class TendbCluster { creator: string; db_module_id: number; db_module_name: string; + disaster_tolerance_level: keyof typeof ClusterAffinityMap; id: number; machine_pair_cnt: number; major_version: string; @@ -130,13 +134,14 @@ export default class TendbCluster { this.bk_biz_name = payload.bk_biz_name; this.bk_cloud_id = payload.bk_cloud_id; this.bk_cloud_name = payload.bk_cloud_name; + this.bk_sub_zone = payload.bk_sub_zone; this.cluster_access_port = payload.cluster_access_port; this.cluster_alias = payload.cluster_alias; this.cluster_capacity = payload.cluster_capacity; this.cluster_entry = payload.cluster_entry || []; this.cluster_name = payload.cluster_name; this.cluster_shard_num = payload.cluster_shard_num; - this.cluster_spec = payload.cluster_spec; + this.cluster_spec = payload.cluster_spec || {}; this.cluster_stats = payload.cluster_stats || {}; this.cluster_type = payload.cluster_type; this.cluster_type_name = payload.cluster_type_name; @@ -145,6 +150,7 @@ export default class TendbCluster { this.creator = payload.creator; this.db_module_id = payload.db_module_id; this.db_module_name = payload.db_module_name; + this.disaster_tolerance_level = payload.disaster_tolerance_level; this.id = payload.id; this.machine_pair_cnt = payload.machine_pair_cnt; this.major_version = payload.major_version; @@ -284,4 +290,8 @@ export default class TendbCluster { get createAtDisplay() { return utcDisplayTime(this.create_at); } + + get disasterToleranceLevelName() { + return ClusterAffinityMap[this.disaster_tolerance_level]; + } } diff --git a/dbm-ui/frontend/src/views/db-manage/common/RenderBaseInfo.vue b/dbm-ui/frontend/src/views/db-manage/common/RenderBaseInfo.vue index 5018e374d1..a2f83b183c 100644 --- a/dbm-ui/frontend/src/views/db-manage/common/RenderBaseInfo.vue +++ b/dbm-ui/frontend/src/views/db-manage/common/RenderBaseInfo.vue @@ -47,6 +47,20 @@ {{ $t('创建时间') }}: {{ data.create_at }} + {{ $t('容灾要求') }}: + {{ data.disasterToleranceLevelName || '--' }} + + + {{ $t('地域') }}: + {{ data.region || '--' }} + {{ $t('园区') }}: + {{ data.bk_sub_zone || '--' }} + + + {{ $t('规格') }}: + {{ data.cluster_spec.spec_name || '--' }} + {{ $t('管控区域') }}: + {{ data.bk_cloud_name ? `${data.bk_cloud_name}[${data.bk_cloud_id}]` : '--' }} diff --git a/dbm-ui/frontend/src/views/db-manage/common/apply-items/CloudItem.vue b/dbm-ui/frontend/src/views/db-manage/common/apply-items/CloudItem.vue index a6f4f45b21..f6011c7b7d 100644 --- a/dbm-ui/frontend/src/views/db-manage/common/apply-items/CloudItem.vue +++ b/dbm-ui/frontend/src/views/db-manage/common/apply-items/CloudItem.vue @@ -28,7 +28,7 @@ diff --git a/dbm-ui/frontend/src/views/db-manage/doris/list/components/list/Index.vue b/dbm-ui/frontend/src/views/db-manage/doris/list/components/list/Index.vue index b4682fdb1f..260bc6ecc3 100644 --- a/dbm-ui/frontend/src/views/db-manage/doris/list/components/list/Index.vue +++ b/dbm-ui/frontend/src/views/db-manage/doris/list/components/list/Index.vue @@ -437,15 +437,6 @@ ), }, - { - label: t('管控区域'), - field: 'bk_cloud_id', - filter: { - list: columnAttrs.value.bk_cloud_id, - checked: columnCheckedMap.value.bk_cloud_id, - }, - render: ({ data }: {data: DorisModel}) => {data.bk_cloud_name ?? '--'}, - }, { label: t('状态'), field: 'status', @@ -481,6 +472,12 @@ checked: columnCheckedMap.value.major_version, }, }, + { + label: t('容灾要求'), + field: 'disaster_tolerance_level', + minWidth: 100, + render: ({ data }: { data: DorisModel }) => data.disasterToleranceLevelName || '--', + }, { label: t('地域'), field: 'region', @@ -491,6 +488,21 @@ }, render: ({ data }: {data: DorisModel}) => {data?.region || '--'}, }, + { + label: t('园区'), + field: 'bk_sub_zone', + minWidth: 100, + render: ({ data }: { data: DorisModel }) => data.bk_sub_zone || '--', + }, + { + label: t('管控区域'), + field: 'bk_cloud_id', + filter: { + list: columnAttrs.value.bk_cloud_id, + checked: columnCheckedMap.value.bk_cloud_id, + }, + render: ({ data }: { data: DorisModel }) => data.bk_cloud_name ? `${data.bk_cloud_name}[${data.bk_cloud_id}]` : '--', + }, { label: t('Follower节点'), field: 'doris_follower', @@ -801,6 +813,7 @@ 'cluster_name', 'bk_cloud_id', 'major_version', + 'disaster_tolerance_level', 'region', 'status', 'doris_follower', diff --git a/dbm-ui/frontend/src/views/db-manage/elastic-search/list/components/list/Index.vue b/dbm-ui/frontend/src/views/db-manage/elastic-search/list/components/list/Index.vue index 268f48963a..6958b6f978 100644 --- a/dbm-ui/frontend/src/views/db-manage/elastic-search/list/components/list/Index.vue +++ b/dbm-ui/frontend/src/views/db-manage/elastic-search/list/components/list/Index.vue @@ -440,15 +440,6 @@ ), }, - { - label: t('管控区域'), - field: 'bk_cloud_id', - filter: { - list: columnAttrs.value.bk_cloud_id, - checked: columnCheckedMap.value.bk_cloud_id, - }, - render: ({ data }: {data: EsModel}) => {data.bk_cloud_name ?? '--'}, - }, { label: t('状态'), field: 'status', @@ -484,6 +475,18 @@ checked: columnCheckedMap.value.major_version, }, }, + { + label: t('容灾要求'), + field: 'disaster_tolerance_level', + minWidth: 100, + render: ({ data }: { data: EsModel }) => data.disasterToleranceLevelName || '--', + }, + { + label: t('园区'), + field: 'bk_sub_zone', + minWidth: 100, + render: ({ data }: { data: EsModel }) => data.bk_sub_zone || '--', + }, { label: t('地域'), field: 'region', @@ -494,6 +497,15 @@ }, render: ({ data }: {data: EsModel}) => {data?.region || '--'}, }, + { + label: t('管控区域'), + field: 'bk_cloud_id', + filter: { + list: columnAttrs.value.bk_cloud_id, + checked: columnCheckedMap.value.bk_cloud_id, + }, + render: ({ data }: { data: EsModel }) => data.bk_cloud_name ? `${data.bk_cloud_name}[${data.bk_cloud_id}]` : '--', + }, { label: t('Master节点'), field: 'es_master', @@ -808,6 +820,7 @@ 'cluster_stats', 'major_version', 'region', + 'disaster_tolerance_level', 'es_master', 'es_client', 'es_datanode_hot', diff --git a/dbm-ui/frontend/src/views/db-manage/hdfs/list/components/list/Index.vue b/dbm-ui/frontend/src/views/db-manage/hdfs/list/components/list/Index.vue index 880bffb2a5..7590a1a9d8 100644 --- a/dbm-ui/frontend/src/views/db-manage/hdfs/list/components/list/Index.vue +++ b/dbm-ui/frontend/src/views/db-manage/hdfs/list/components/list/Index.vue @@ -456,15 +456,6 @@ ), }, - { - label: t('管控区域'), - field: 'bk_cloud_id', - filter: { - list: columnAttrs.value.bk_cloud_id, - checked: columnCheckedMap.value.bk_cloud_id, - }, - render: ({ data }: {data: HdfsModel}) => {data.bk_cloud_name ?? '--'}, - }, { label: t('状态'), field: 'status', @@ -499,6 +490,12 @@ checked: columnCheckedMap.value.major_version, }, }, + { + label: t('容灾要求'), + field: 'disaster_tolerance_level', + minWidth: 100, + render: ({ data }: { data: HdfsModel }) => data.disasterToleranceLevelName || '--', + }, { label: t('地域'), field: 'region', @@ -509,6 +506,21 @@ }, render: ({ data }: {data: HdfsModel}) => {data?.region || '--'}, }, + { + label: t('园区'), + field: 'bk_sub_zone', + minWidth: 100, + render: ({ data }: { data: HdfsModel }) => data.bk_sub_zone || '--', + }, + { + label: t('管控区域'), + field: 'bk_cloud_id', + filter: { + list: columnAttrs.value.bk_cloud_id, + checked: columnCheckedMap.value.bk_cloud_id, + }, + render: ({ data }: { data: HdfsModel }) => data.bk_cloud_name ? `${data.bk_cloud_name}[${data.bk_cloud_id}]` : '--', + }, { label: 'NameNode', field: 'hdfs_namenode', @@ -839,6 +851,7 @@ 'status', 'cluster_stats', 'major_version', + 'disaster_tolerance_level', 'region', 'hdfs_namenode', 'hdfs_zookeeper', diff --git a/dbm-ui/frontend/src/views/db-manage/kafka/list/components/list/Index.vue b/dbm-ui/frontend/src/views/db-manage/kafka/list/components/list/Index.vue index b0e81c769b..6cefdc7205 100644 --- a/dbm-ui/frontend/src/views/db-manage/kafka/list/components/list/Index.vue +++ b/dbm-ui/frontend/src/views/db-manage/kafka/list/components/list/Index.vue @@ -445,15 +445,6 @@ ), }, - { - label: t('管控区域'), - field: 'bk_cloud_id', - filter: { - list: columnAttrs.value.bk_cloud_id, - checked: columnCheckedMap.value.bk_cloud_id, - }, - render: ({ data }: {data: KafkaModel}) => {data.bk_cloud_name ?? '--'}, - }, { label: t('状态'), field: 'status', @@ -488,6 +479,13 @@ checked: columnCheckedMap.value.major_version, }, }, + { + label: t('容灾要求'), + field: 'disaster_tolerance_level', + minWidth: 100, + render: ({ data }: { data: KafkaModel }) => data.disasterToleranceLevelName || '--', + }, + { label: t('地域'), field: 'region', @@ -498,6 +496,21 @@ }, render: ({ data }: {data: KafkaModel}) => {data?.region || '--'}, }, + { + label: t('园区'), + field: 'bk_sub_zone', + minWidth: 100, + render: ({ data }: { data: KafkaModel }) => data.bk_sub_zone || '--', + }, + { + label: t('管控区域'), + field: 'bk_cloud_id', + filter: { + list: columnAttrs.value.bk_cloud_id, + checked: columnCheckedMap.value.bk_cloud_id, + }, + render: ({ data }: { data: KafkaModel }) => data.bk_cloud_name ? `${data.bk_cloud_name}[${data.bk_cloud_id}]` : '--', + }, { label: 'Zookeeper', field: 'zookeeper', @@ -748,6 +761,7 @@ 'status', 'cluster_stats', 'major_version', + 'disaster_tolerance_level', 'region', 'zookeeper', 'broker', 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 2d3fb5048c..c33f38d471 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 @@ -90,7 +90,7 @@ key: 'idc_city_name', }, { - label: t('所在机房'), + label: t('所在园区'), key: 'bk_idc_name', }, ], diff --git a/dbm-ui/frontend/src/views/db-manage/mongodb/mongodb-instance/list/index.vue b/dbm-ui/frontend/src/views/db-manage/mongodb/mongodb-instance/list/index.vue index 7498f4fa5e..845e3487b9 100644 --- a/dbm-ui/frontend/src/views/db-manage/mongodb/mongodb-instance/list/index.vue +++ b/dbm-ui/frontend/src/views/db-manage/mongodb/mongodb-instance/list/index.vue @@ -293,6 +293,12 @@ render: ({ data }: { data: MongodbInstanceModel }) => data.shard || '--', }, + { + label: t('所在园区'), + field: 'bk_sub_zone', + width: 140, + render: ({ data }: { data: MongodbInstanceModel }) => data.bk_sub_zone || '--', + }, { label: t('部署时间'), field: 'createAtDisplay', diff --git a/dbm-ui/frontend/src/views/db-manage/mongodb/replica-set-list/components/detail/BaseInfo.vue b/dbm-ui/frontend/src/views/db-manage/mongodb/replica-set-list/components/detail/BaseInfo.vue index e641bf3437..8104a2e3e2 100644 --- a/dbm-ui/frontend/src/views/db-manage/mongodb/replica-set-list/components/detail/BaseInfo.vue +++ b/dbm-ui/frontend/src/views/db-manage/mongodb/replica-set-list/components/detail/BaseInfo.vue @@ -54,6 +54,11 @@ { label: t('管控区域'), key: 'bk_cloud_name', + render: () => (props.data.bk_cloud_name ? `${props.data.bk_cloud_name}[${props.data.bk_cloud_id}]` : '--'), + }, + { + label: t('容灾要求'), + key: 'disasterToleranceLevelName', }, ], [ diff --git a/dbm-ui/frontend/src/views/db-manage/mongodb/replica-set-list/components/list/Index.vue b/dbm-ui/frontend/src/views/db-manage/mongodb/replica-set-list/components/list/Index.vue index d4cd9c840e..57f5cd277b 100644 --- a/dbm-ui/frontend/src/views/db-manage/mongodb/replica-set-list/components/list/Index.vue +++ b/dbm-ui/frontend/src/views/db-manage/mongodb/replica-set-list/components/list/Index.vue @@ -466,15 +466,6 @@ ), }, - { - label: t('管控区域'), - field: 'bk_cloud_id', - filter: { - list: columnAttrs.value.bk_cloud_id, - checked: columnCheckedMap.value.bk_cloud_id, - }, - render: ({ data }: { data: MongodbModel }) => {data.bk_cloud_name || '--'}, - }, { label: t('状态'), field: 'status', @@ -511,6 +502,12 @@ }, render: ({ data }: { data: MongodbModel }) => {data.major_version || '--'}, }, + { + label: t('容灾要求'), + field: 'disaster_tolerance_level', + minWidth: 100, + render: ({ data }: { data: MongodbModel }) => data.disasterToleranceLevelName || '--', + }, { label: t('地域'), field: 'region', @@ -521,6 +518,21 @@ }, render: ({ data }: { data: MongodbModel }) => {data.region || '--'}, }, + { + label: t('园区'), + field: 'bk_sub_zone', + minWidth: 100, + render: ({ data }: { data: MongodbModel }) => data.bk_sub_zone || '--', + }, + { + label: t('管控区域'), + field: 'bk_cloud_id', + filter: { + list: columnAttrs.value.bk_cloud_id, + checked: columnCheckedMap.value.bk_cloud_id, + }, + render: ({ data }: { data: MongodbModel }) => data.bk_cloud_name ? `${data.bk_cloud_name}[${data.bk_cloud_id}]` : '--', + }, { label: t('节点'), field: 'mongodb', @@ -693,6 +705,7 @@ 'cluster_stats', 'major_version', 'region', + 'disaster_tolerance_level', 'mongodb', ], showLineHeight: false, diff --git a/dbm-ui/frontend/src/views/db-manage/mongodb/shared-cluster-list/components/detail/BaseInfo.vue b/dbm-ui/frontend/src/views/db-manage/mongodb/shared-cluster-list/components/detail/BaseInfo.vue index cb2afbdbe4..0d0acf5b2a 100644 --- a/dbm-ui/frontend/src/views/db-manage/mongodb/shared-cluster-list/components/detail/BaseInfo.vue +++ b/dbm-ui/frontend/src/views/db-manage/mongodb/shared-cluster-list/components/detail/BaseInfo.vue @@ -54,6 +54,11 @@ { label: t('管控区域'), key: 'bk_cloud_name', + render: () => (props.data.bk_cloud_name ? `${props.data.bk_cloud_name}[${props.data.bk_cloud_id}]` : '--'), + }, + { + label: t('容灾要求'), + key: 'disasterToleranceLevelName', }, { label: t('创建人'), diff --git a/dbm-ui/frontend/src/views/db-manage/mongodb/shared-cluster-list/components/list/Index.vue b/dbm-ui/frontend/src/views/db-manage/mongodb/shared-cluster-list/components/list/Index.vue index 9564e60bee..d33e567bdd 100644 --- a/dbm-ui/frontend/src/views/db-manage/mongodb/shared-cluster-list/components/list/Index.vue +++ b/dbm-ui/frontend/src/views/db-manage/mongodb/shared-cluster-list/components/list/Index.vue @@ -421,15 +421,6 @@ ), }, - { - label: t('管控区域'), - field: 'bk_cloud_id', - filter: { - list: columnAttrs.value.bk_cloud_id, - checked: columnCheckedMap.value.bk_cloud_id, - }, - render: ({ data }: { data: MongodbModel }) => {data.bk_cloud_name || '--'}, - }, { label: t('状态'), field: 'status', @@ -466,6 +457,12 @@ }, render: ({ data }: { data: MongodbModel }) => {data.major_version || '--'}, }, + { + label: t('容灾要求'), + field: 'disaster_tolerance_level', + minWidth: 100, + render: ({ data }: { data: MongodbModel }) => data.disasterToleranceLevelName || '--', + }, { label: t('地域'), field: 'region', @@ -476,6 +473,21 @@ }, render: ({ data }: { data: MongodbModel }) => {data.bk_cloud_name || '--'}, }, + { + label: t('园区'), + field: 'bk_sub_zone', + minWidth: 100, + render: ({ data }: { data: MongodbModel }) => data.bk_sub_zone || '--', + }, + { + label: t('管控区域'), + field: 'bk_cloud_id', + filter: { + list: columnAttrs.value.bk_cloud_id, + checked: columnCheckedMap.value.bk_cloud_id, + }, + render: ({ data }: { data: MongodbModel }) => data.bk_cloud_name ? `${data.bk_cloud_name}[${data.bk_cloud_id}]` : '--', + }, { label: 'ConfigSvr', field: 'mongo_config', @@ -712,6 +724,7 @@ 'status', 'cluster_stats', 'major_version', + 'disaster_tolerance_level', 'region', 'mongo_config', 'mongos', diff --git a/dbm-ui/frontend/src/views/db-manage/mysql/ha-cluster-list/components/List.vue b/dbm-ui/frontend/src/views/db-manage/mysql/ha-cluster-list/components/List.vue index 23327f2690..719b74af5c 100644 --- a/dbm-ui/frontend/src/views/db-manage/mysql/ha-cluster-list/components/List.vue +++ b/dbm-ui/frontend/src/views/db-manage/mysql/ha-cluster-list/components/List.vue @@ -506,16 +506,6 @@ ), }, - { - label: t('管控区域'), - field: 'bk_cloud_id', - filter: { - list: columnAttrs.value.bk_cloud_id, - checked: columnCheckedMap.value.bk_cloud_id, - }, - width: 90, - render: ({ data }: ColumnData) => {data.bk_cloud_name ?? '--'}, - }, { label: t('状态'), field: 'status', @@ -748,6 +738,12 @@ }, render: ({ cell }: ColumnData) => {cell || '--'}, }, + { + label: t('容灾要求'), + field: 'disaster_tolerance_level', + minWidth: 100, + render: ({ data }: ColumnData) => data.disasterToleranceLevelName || '--', + }, { label: t('地域'), field: 'region', @@ -758,6 +754,22 @@ }, render: ({ cell }: ColumnData) => {cell || '--'}, }, + { + label: t('园区'), + field: 'bk_sub_zone', + minWidth: 100, + render: ({ data }: ColumnData) => data.bk_sub_zone || '--', + }, + { + label: t('管控区域'), + field: 'bk_cloud_id', + filter: { + list: columnAttrs.value.bk_cloud_id, + checked: columnCheckedMap.value.bk_cloud_id, + }, + width: 90, + render: ({ data }: ColumnData) => data.bk_cloud_name ? `${data.bk_cloud_name}[${data.bk_cloud_id}]` : '--', + }, { label: t('创建人'), field: 'creator', @@ -910,7 +922,10 @@ 'slaves', 'db_module_id', 'major_version', + 'disaster_tolerance_level', 'region', + 'bk_sub_zone', + 'bk_cloud_id' ], showLineHeight: false, trigger: 'manual' as const, diff --git a/dbm-ui/frontend/src/views/db-manage/mysql/ha-cluster-list/components/detail/components/BaseInfo.vue b/dbm-ui/frontend/src/views/db-manage/mysql/ha-cluster-list/components/detail/components/BaseInfo.vue index 37330d6383..f9ab8365cc 100644 --- a/dbm-ui/frontend/src/views/db-manage/mysql/ha-cluster-list/components/detail/components/BaseInfo.vue +++ b/dbm-ui/frontend/src/views/db-manage/mysql/ha-cluster-list/components/detail/components/BaseInfo.vue @@ -54,6 +54,11 @@ { label: t('管控区域'), key: 'bk_cloud_name', + render: () => (props.data.bk_cloud_name ? `${props.data.bk_cloud_name}[${props.data.bk_cloud_id}]` : '--'), + }, + { + label: t('容灾要求'), + key: 'disasterToleranceLevelName', }, ], [ @@ -80,6 +85,10 @@ label: t('创建时间'), key: 'create_at', }, + { + label: t('园区'), + key: 'bk_sub_zone', + }, ], ]; diff --git a/dbm-ui/frontend/src/views/db-manage/mysql/ha-instance-list/components/List.vue b/dbm-ui/frontend/src/views/db-manage/mysql/ha-instance-list/components/List.vue index c014526a89..40c1e4f506 100644 --- a/dbm-ui/frontend/src/views/db-manage/mysql/ha-instance-list/components/List.vue +++ b/dbm-ui/frontend/src/views/db-manage/mysql/ha-instance-list/components/List.vue @@ -239,6 +239,12 @@ checked: columnCheckedMap.value.role, }, }, + { + label: t('所在园区'), + field: 'bk_sub_zone', + width: 140, + render: ({ cell }: ColumnData) => cell || '--', + }, { label: t('所属集群'), field: 'master_domain', 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 d05d623590..0ad9f3472e 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 @@ -102,8 +102,8 @@ key: 'idc_city_name', }, { - label: t('所在机房'), - key: 'bk_idc_name', + label: t('所在园区'), + key: 'bk_sub_zone', }, ], [ diff --git a/dbm-ui/frontend/src/views/db-manage/pulsar/list/components/list/Index.vue b/dbm-ui/frontend/src/views/db-manage/pulsar/list/components/list/Index.vue index 3684c962fc..3627d66b52 100644 --- a/dbm-ui/frontend/src/views/db-manage/pulsar/list/components/list/Index.vue +++ b/dbm-ui/frontend/src/views/db-manage/pulsar/list/components/list/Index.vue @@ -381,6 +381,12 @@ checked: columnCheckedMap.value.major_version, }, }, + { + label: t('容灾要求'), + field: 'disaster_tolerance_level', + minWidth: 100, + render: ({ data }: { data: PulsarModel }) => data.disasterToleranceLevelName || '--', + }, { label: t('地域'), field: 'region', @@ -391,6 +397,17 @@ }, render: ({ data }: {data: PulsarModel}) => {data?.region || '--'}, }, + { + label: t('园区'), + field: 'bk_sub_zone', + minWidth: 100, + render: ({ data }: { data: PulsarModel }) => data.bk_sub_zone || '--', + }, + { + label: t('管控区域'), + field: 'bk_cloud_id', + render: ({ data }: { data: PulsarModel }) => data.bk_cloud_name ? `${data.bk_cloud_name}[${data.bk_cloud_id}]` : '--', + }, { label: t('状态'), field: 'status', @@ -776,6 +793,7 @@ checked: [ 'domain', 'major_version', + 'disaster_tolerance_level', 'region', 'status', 'cluster_stats', diff --git a/dbm-ui/frontend/src/views/db-manage/redis/instance-list-ha/components/list/Index.vue b/dbm-ui/frontend/src/views/db-manage/redis/instance-list-ha/components/list/Index.vue index 9ad082728b..ed8f3b3320 100644 --- a/dbm-ui/frontend/src/views/db-manage/redis/instance-list-ha/components/list/Index.vue +++ b/dbm-ui/frontend/src/views/db-manage/redis/instance-list-ha/components/list/Index.vue @@ -299,6 +299,12 @@ // // ), // }, + { + label: t('所在园区'), + field: 'bk_sub_zone', + width: 140, + render: ({ data }: { data: RedisInstanceModel }) => data.bk_sub_zone || '--', + }, { label: t('部署角色'), field: 'role', 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 f87db0a845..80bdfb0e75 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 @@ -102,8 +102,8 @@ key: 'idc_city_name', }, { - label: t('所在机房'), - key: 'bk_idc_name', + label: t('所在园区'), + key: 'bk_sub_zone', }, ], [ diff --git a/dbm-ui/frontend/src/views/db-manage/redis/instance-list/components/list/Index.vue b/dbm-ui/frontend/src/views/db-manage/redis/instance-list/components/list/Index.vue index f1174a5d2e..9456023d77 100644 --- a/dbm-ui/frontend/src/views/db-manage/redis/instance-list/components/list/Index.vue +++ b/dbm-ui/frontend/src/views/db-manage/redis/instance-list/components/list/Index.vue @@ -292,6 +292,12 @@ checked: columnCheckedMap.value.role, }, }, + { + label: t('所在园区'), + field: 'bk_sub_zone', + width: 140, + render: ({ data }: { data: RedisInstanceModel }) => data.bk_sub_zone || '--', + }, { label: t('部署时间'), field: 'create_at', diff --git a/dbm-ui/frontend/src/views/db-manage/redis/list/components/detail/BaseInfo.vue b/dbm-ui/frontend/src/views/db-manage/redis/list/components/detail/BaseInfo.vue index 77430ca88f..7aedce85ed 100644 --- a/dbm-ui/frontend/src/views/db-manage/redis/list/components/detail/BaseInfo.vue +++ b/dbm-ui/frontend/src/views/db-manage/redis/list/components/detail/BaseInfo.vue @@ -29,7 +29,7 @@ data: RedisModel; } - defineProps(); + const props = defineProps(); const { t } = useI18n(); @@ -47,6 +47,19 @@ label: t('域名'), key: 'master_domain', }, + { + label: t('容灾要求'), + key: 'disasterToleranceLevelName', + }, + { + label: t('园区'), + key: 'bk_sub_zone', + }, + { + label: t('规格'), + key: 'spec_name', + render: () => props.data.cluster_spec.spec_name || '--', + }, ], [ { diff --git a/dbm-ui/frontend/src/views/db-manage/redis/list/components/list/Index.vue b/dbm-ui/frontend/src/views/db-manage/redis/list/components/list/Index.vue index ca95e3afb0..712a7ca5b6 100644 --- a/dbm-ui/frontend/src/views/db-manage/redis/list/components/list/Index.vue +++ b/dbm-ui/frontend/src/views/db-manage/redis/list/components/list/Index.vue @@ -570,15 +570,6 @@ ), }, - { - label: t('管控区域'), - field: 'bk_cloud_id', - filter: { - list: columnAttrs.value.bk_cloud_id, - checked: columnCheckedMap.value.bk_cloud_id, - }, - render: ({ data }: ColumnRenderData) => {data.bk_cloud_name ?? '--'}, - }, { label: t('状态'), field: 'status', @@ -748,6 +739,12 @@ }, render: ({ data }: ColumnRenderData) => data.major_version || '--', }, + { + label: t('容灾要求'), + field: 'disaster_tolerance_level', + minWidth: 100, + render: ({ data }: ColumnRenderData) => data.disasterToleranceLevelName || '--', + }, { label: t('地域'), field: 'region', @@ -758,6 +755,21 @@ }, render: ({ data }: ColumnRenderData) => data.region || '--', }, + { + label: t('园区'), + field: 'bk_sub_zone', + minWidth: 100, + render: ({ data }: ColumnRenderData) => data.bk_sub_zone || '--', + }, + { + label: t('管控区域'), + field: 'bk_cloud_id', + filter: { + list: columnAttrs.value.bk_cloud_id, + checked: columnCheckedMap.value.bk_cloud_id, + }, + render: ({ data }: ColumnRenderData) => data.bk_cloud_name ? `${data.bk_cloud_name}[${data.bk_cloud_id}]` : '--', + }, { label: t('更新人'), field: 'updater', @@ -1062,7 +1074,9 @@ ClusterNodeKeys.REDIS_SLAVE, 'cluster_type_name', 'major_version', + 'disaster_tolerance_level', 'region', + 'spec_name', ], showLineHeight: false, trigger: 'manual' as const, diff --git a/dbm-ui/frontend/src/views/db-manage/riak/list/components/detail/components/BaseInfo.vue b/dbm-ui/frontend/src/views/db-manage/riak/list/components/detail/components/BaseInfo.vue index 70259fe8de..dc2b4a5117 100644 --- a/dbm-ui/frontend/src/views/db-manage/riak/list/components/detail/components/BaseInfo.vue +++ b/dbm-ui/frontend/src/views/db-manage/riak/list/components/detail/components/BaseInfo.vue @@ -29,7 +29,7 @@ data: RiakModel; } - defineProps(); + const props = defineProps(); const { t } = useI18n(); @@ -43,9 +43,14 @@ label: t('访问入口'), key: 'domain', }, + { + label: t('地域'), + key: 'region', + }, { label: t('管控区域'), key: 'bk_cloud_name', + render: () => (props.data.bk_cloud_name ? `${props.data.bk_cloud_name}[${props.data.bk_cloud_id}]` : '--'), }, ], [ @@ -57,6 +62,14 @@ label: t('创建时间'), key: 'create_at', }, + { + label: t('容灾要求'), + key: 'disasterToleranceLevelName', + }, + { + label: t('园区'), + key: 'bk_sub_zone', + }, ], ]; diff --git a/dbm-ui/frontend/src/views/db-manage/riak/list/components/list/Index.vue b/dbm-ui/frontend/src/views/db-manage/riak/list/components/list/Index.vue index 2d758f6856..42af12ac7c 100644 --- a/dbm-ui/frontend/src/views/db-manage/riak/list/components/list/Index.vue +++ b/dbm-ui/frontend/src/views/db-manage/riak/list/components/list/Index.vue @@ -333,6 +333,29 @@ }, render: ({ data }: { data: RiakModel }) => {data.db_module_name || '--'}, }, + { + label: t('容灾要求'), + field: 'disaster_tolerance_level', + minWidth: 100, + render: ({ data }: { data: RiakModel }) => data.disasterToleranceLevelName || '--', + }, + { + label: t('地域'), + field: 'region', + minWidth: 100, + filter: { + list: columnAttrs.value.region, + checked: columnCheckedMap.value.region, + }, + render: ({ data }: { data: RiakModel }) => {data.region || '--'}, + }, + { + label: t('园区'), + field: 'bk_sub_zone', + minWidth: 100, + render: ({ data }: { data: RiakModel }) => data.bk_sub_zone || '--', + }, + { label: t('管控区域'), width: 120, @@ -341,7 +364,7 @@ list: columnAttrs.value.bk_cloud_id, checked: columnCheckedMap.value.bk_cloud_id, }, - render: ({ data }: { data: RiakModel }) => {data.bk_cloud_name || '--'}, + render: ({ data }: { data: RiakModel }) => data.bk_cloud_name ? `${data.bk_cloud_name}[${data.bk_cloud_id}]` : '--', }, { label: t('状态'), @@ -527,7 +550,9 @@ checked: [ 'cluster_name', 'major_version', + 'disaster_tolerance_level', 'region', + 'bk_cloud_id', 'db_module_id', 'status', 'cluster_stats', diff --git a/dbm-ui/frontend/src/views/db-manage/sqlserver/ha-cluster-list/components/List.vue b/dbm-ui/frontend/src/views/db-manage/sqlserver/ha-cluster-list/components/List.vue index 5c690c1fdd..cb32138e31 100644 --- a/dbm-ui/frontend/src/views/db-manage/sqlserver/ha-cluster-list/components/List.vue +++ b/dbm-ui/frontend/src/views/db-manage/sqlserver/ha-cluster-list/components/List.vue @@ -465,16 +465,6 @@ ), }, - { - label: t('管控区域'), - field: 'bk_cloud_id', - filter: { - list: columnAttrs.value.bk_cloud_id, - checked: columnCheckedMap.value.bk_cloud_id, - }, - width: 90, - render: ({ data }: { data: SqlServerHaModel }) => {data.bk_cloud_name || '--'}, - }, { label: t('状态'), field: 'status', @@ -670,6 +660,12 @@ width: 120, render: ({ data }: { data: SqlServerHaModel }) => {data.sync_mode || '--'}, }, + { + label: t('容灾要求'), + field: 'disaster_tolerance_level', + minWidth: 100, + render: ({ data }: { data: SqlServerHaModel }) => data.disasterToleranceLevelName || '--', + }, { label: t('地域'), field: 'region', @@ -680,6 +676,28 @@ }, render: ({ data }: { data: SqlServerHaModel }) => {data.region || '--'}, }, + { + label: t('园区'), + field: 'bk_sub_zone', + minWidth: 100, + render: ({ data }: { data: SqlServerHaModel }) => data.bk_sub_zone || '--', + }, + { + label: t('规格'), + field: 'spec_name', + minWidth: 180, + render: ({ data }: { data: SqlServerHaModel }) => data.spec_config.spec_name || '--', + }, + { + label: t('管控区域'), + field: 'bk_cloud_id', + filter: { + list: columnAttrs.value.bk_cloud_id, + checked: columnCheckedMap.value.bk_cloud_id, + }, + width: 90, + render: ({ data }: { data: SqlServerHaModel }) => data.bk_cloud_name ? `${data.bk_cloud_name}[${data.bk_cloud_id}]` : '--', + }, { label: t('创建人'), field: 'creator', @@ -794,7 +812,9 @@ 'slaves', 'db_module_id', 'major_version', + 'disaster_tolerance_level', 'region', + 'spec_name', ], showLineHeight: false, trigger: 'manual' as const, diff --git a/dbm-ui/frontend/src/views/db-manage/sqlserver/ha-cluster-list/components/detail/BaseInfo.vue b/dbm-ui/frontend/src/views/db-manage/sqlserver/ha-cluster-list/components/detail/BaseInfo.vue index 1f7c38869d..42f0934790 100644 --- a/dbm-ui/frontend/src/views/db-manage/sqlserver/ha-cluster-list/components/detail/BaseInfo.vue +++ b/dbm-ui/frontend/src/views/db-manage/sqlserver/ha-cluster-list/components/detail/BaseInfo.vue @@ -45,6 +45,14 @@ label: t('管控区域'), key: 'bk_cloud_name', }, + { + label: t('容灾要求'), + key: 'disasterToleranceLevelName', + }, + { + label: t('园区'), + key: 'bk_sub_zone', + }, ], [ { diff --git a/dbm-ui/frontend/src/views/db-manage/sqlserver/ha-instance-list/components/List.vue b/dbm-ui/frontend/src/views/db-manage/sqlserver/ha-instance-list/components/List.vue index adc9176efe..2228453234 100644 --- a/dbm-ui/frontend/src/views/db-manage/sqlserver/ha-instance-list/components/List.vue +++ b/dbm-ui/frontend/src/views/db-manage/sqlserver/ha-instance-list/components/List.vue @@ -305,6 +305,12 @@ checked: columnCheckedMap.value.role, }, }, + { + label: t('所在园区'), + field: 'bk_sub_zone', + width: 140, + render:({ data }: { data: SqlServerHaInstanceModel }) => data.bk_sub_zone || '--', + }, { label: t('部署时间'), field: 'create_at', 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 a687df053f..d5f2b43afe 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 @@ -95,8 +95,8 @@ key: 'idc_city_name', }, { - label: t('所在机房'), - key: 'bk_idc_name', + label: t('所在园区'), + key: 'bk_sub_zone', }, ], [ @@ -112,6 +112,36 @@ label: t('部署时间'), key: 'create_at', }, + { + label: 'CPU', + key: 'bk_cpu', + render: () => { + if (!Number.isFinite(props.data.bk_cpu)) { + return '--'; + } + return `${props.data.bk_cpu}${t('核')}`; + }, + }, + { + label: t('内存'), + key: 'bk_mem', + render: () => { + if (!Number.isFinite(props.data.bk_mem)) { + return '--'; + } + return `${props.data.bk_mem}MB`; + }, + }, + { + label: t('磁盘'), + key: 'bk_disk', + render: () => { + if (!Number.isFinite(props.data.bk_disk)) { + return '--'; + } + return `${props.data.bk_disk}GB`; + }, + }, ], ]; diff --git a/dbm-ui/frontend/src/views/db-manage/tendb-cluster/list-instance/components/list/Index.vue b/dbm-ui/frontend/src/views/db-manage/tendb-cluster/list-instance/components/list/Index.vue index b4e357c7bd..aad2b6b6dc 100644 --- a/dbm-ui/frontend/src/views/db-manage/tendb-cluster/list-instance/components/list/Index.vue +++ b/dbm-ui/frontend/src/views/db-manage/tendb-cluster/list-instance/components/list/Index.vue @@ -201,6 +201,12 @@ checked: columnCheckedMap.value.role, }, }, + { + label: t('所在园区'), + field: 'bk_sub_zone', + width: 140, + render: ({ data }: IColumn) => data.bk_sub_zone || '--', + }, { label: t('所属集群'), field: 'master_domain', diff --git a/dbm-ui/frontend/src/views/db-manage/tendb-cluster/list/components/detail/components/BaseInfo.vue b/dbm-ui/frontend/src/views/db-manage/tendb-cluster/list/components/detail/components/BaseInfo.vue index f37f47701f..08bbad52b9 100644 --- a/dbm-ui/frontend/src/views/db-manage/tendb-cluster/list/components/detail/components/BaseInfo.vue +++ b/dbm-ui/frontend/src/views/db-manage/tendb-cluster/list/components/detail/components/BaseInfo.vue @@ -54,6 +54,7 @@ { label: t('管控区域'), key: 'bk_cloud_name', + render: () => (props.data.bk_cloud_name ? `${props.data.bk_cloud_name}[${props.data.bk_cloud_id}]` : '--'), }, { label: t('创建人'), @@ -63,6 +64,11 @@ label: t('创建时间'), key: 'create_at', }, + { + label: t('规格'), + key: 'spec_name', + render: () => props.data.cluster_spec.spec_name || '--', + }, ], [ { @@ -95,6 +101,14 @@ key: 'remote_dr', render: () => props.data.remote_dr.map((item) => item.instance).join(','), }, + { + label: t('容灾要求'), + key: 'disasterToleranceLevelName', + }, + { + label: t('园区'), + key: 'bk_sub_zone', + }, ], ]; diff --git a/dbm-ui/frontend/src/views/db-manage/tendb-cluster/list/components/list/Index.vue b/dbm-ui/frontend/src/views/db-manage/tendb-cluster/list/components/list/Index.vue index ddb690a2ef..5654aad83c 100644 --- a/dbm-ui/frontend/src/views/db-manage/tendb-cluster/list/components/list/Index.vue +++ b/dbm-ui/frontend/src/views/db-manage/tendb-cluster/list/components/list/Index.vue @@ -616,16 +616,6 @@ // width: 120, // render: ({ data }: IColumn) => data.major_version, // }, - { - label: t('管控区域'), - width: 120, - field: 'bk_cloud_id', - filter: { - list: columnAttrs.value.bk_cloud_id, - checked: columnCheckedMap.value.bk_cloud_id, - }, - render: ({ data }: IColumn) => {data.bk_cloud_name ?? '--'}, - }, { label: t('状态'), field: 'status', @@ -895,6 +885,13 @@ }, render: ({ data }: IColumn) => {data.major_version || '--'}, }, + { + label: t('容灾要求'), + field: 'disaster_tolerance_level', + minWidth: 100, + render: ({ data }: IColumn) => data.disasterToleranceLevelName || '--', + }, + { label: t('地域'), field: 'region', @@ -905,6 +902,28 @@ }, render: ({ data }: IColumn) => {data.region || '--'}, }, + { + label: t('园区'), + field: 'bk_sub_zone', + minWidth: 100, + render: ({ data }: IColumn) => data.bk_sub_zone || '--', + }, + { + label: t('规格'), + field: 'spec_name', + minWidth: 180, + render: ({ data }: IColumn) => data.cluster_spec.spec_name || '--', + }, + { + label: t('管控区域'), + width: 120, + field: 'bk_cloud_id', + filter: { + list: columnAttrs.value.bk_cloud_id, + checked: columnCheckedMap.value.bk_cloud_id, + }, + render: ({ data }: IColumn) => data.bk_cloud_name ? `${data.bk_cloud_name}[${data.bk_cloud_id}]` : '--', + }, { label: t('创建人'), field: 'creator', @@ -1186,7 +1205,11 @@ 'remote_db', 'remote_dr', 'major_version', + 'disaster_tolerance_level', 'region', + 'bk_sub_zone', + 'spec_name', + 'bk_cloud_id', ], showLineHeight: false, trigger: 'manual' as const,