diff --git a/dbm-ui/frontend/src/common/const/queryClusterTypes.ts b/dbm-ui/frontend/src/common/const/dbClusterTypes.ts similarity index 97% rename from dbm-ui/frontend/src/common/const/queryClusterTypes.ts rename to dbm-ui/frontend/src/common/const/dbClusterTypes.ts index ea08f507c0..2d1e760df4 100644 --- a/dbm-ui/frontend/src/common/const/queryClusterTypes.ts +++ b/dbm-ui/frontend/src/common/const/dbClusterTypes.ts @@ -4,7 +4,7 @@ import { DBTypes } from './dbTypes'; /** * db类型关联集群类型集合映射关系 */ -export const queryClusterTypes = { +export const DBClusterTypes = { [DBTypes.MYSQL]: [ClusterTypes.TENDBSINGLE, ClusterTypes.TENDBHA], [DBTypes.TENDBCLUSTER]: [ClusterTypes.TENDBCLUSTER], [DBTypes.REDIS]: [ diff --git a/dbm-ui/frontend/src/common/const/index.ts b/dbm-ui/frontend/src/common/const/index.ts index e600c24e77..78405019b9 100644 --- a/dbm-ui/frontend/src/common/const/index.ts +++ b/dbm-ui/frontend/src/common/const/index.ts @@ -4,6 +4,7 @@ export * from './clusterInsStatus'; export * from './clusterTypeInfos'; export * from './clusterTypes'; export * from './confLevels'; +export * from './dbClusterTypes'; export * from './dbSysExclude'; export * from './dbTypeInfos'; export * from './dbTypes'; @@ -12,7 +13,6 @@ export * from './machineTypes'; export * from './occupiedInnerHeight'; export * from './osTypes'; export * from './pipelineStatus'; -export * from './queryClusterTypes'; export * from './ticketTypeInfos'; export * from './ticketTypes'; export * from './userPersonalSettings'; diff --git a/dbm-ui/frontend/src/services/source/dbbase.ts b/dbm-ui/frontend/src/services/source/dbbase.ts index 8170495351..149d2ebc61 100644 --- a/dbm-ui/frontend/src/services/source/dbbase.ts +++ b/dbm-ui/frontend/src/services/source/dbbase.ts @@ -106,6 +106,28 @@ export function checkInstance(params: { instance_addres // 查询全集群信息 export function queryAllTypeCluster(params: { + bk_biz_id: number; + cluster_types?: string; + immute_domain?: string; + phase?: string; + limit?: number; + offset?: number; +}) { + return http.get< + { + bk_cloud_id: number; + cluster_type: string; + id: number; + immute_domain: string; + major_version: string; + name: string; + region: string; + }[] + >(`${path}/simple_query_cluster/`, params); +} + +// 全集群列表 +export function queryAllTypeClusterList(params: { bk_biz_id?: number; // 业务id cluster_types?: string; // 集群类型(逗号间隔) immute_domain?: string; // 集群域名 @@ -140,5 +162,13 @@ export function queryAllTypeCluster(params: { status: string; }[] > - >(`${path}/simple_query_cluster/`, params); + >(`${path}/simple_query_cluster_v2/`, params); +} +export type ClusterInfo = ServiceReturnType['results'][number]; + +/** + * 根据用户手动输入的域名列表查询 + */ +export function checkDomains(params: { domains: string[] }) { + return http.post(`${path}/check_domains/`, params); } diff --git a/dbm-ui/frontend/src/services/source/mysql.ts b/dbm-ui/frontend/src/services/source/mysql.ts index edf6079f95..4e9077ac8f 100644 --- a/dbm-ui/frontend/src/services/source/mysql.ts +++ b/dbm-ui/frontend/src/services/source/mysql.ts @@ -39,10 +39,3 @@ export function getClusterList(params: { }) { return http.post>(`/apis/mysql/query_clusters/`, params); } - -/** - * 根据用户手动输入的域名列表查询 - */ -export function checkDomains(params: { domains: Array }) { - return http.post>(`/apis/mysql/check_domains/`, params); -} diff --git a/dbm-ui/frontend/src/views/cluster-standardize/components/cluster-selector/Index.vue b/dbm-ui/frontend/src/views/cluster-standardize/components/cluster-selector/Index.vue index c1bde80c03..ea3f761319 100644 --- a/dbm-ui/frontend/src/views/cluster-standardize/components/cluster-selector/Index.vue +++ b/dbm-ui/frontend/src/views/cluster-standardize/components/cluster-selector/Index.vue @@ -68,30 +68,26 @@ + -