item.db_module_id === formdata.details.db_module_id);
// const moduleName = moduleInfo?.name ?? '';
- // const moduleNameQuery = moduleName ? { module_name: moduleName } : {};
+ // const moduleNameQuery = moduleName ? { alias_name: moduleName } : {};
// isBindModule.value = true;
// const url = router.resolve({
// name: 'SelfServiceBindDbModule',
diff --git a/dbm-ui/frontend/src/views/db-manage/tendb-cluster/proxy-slave-apply/pages/page1/components/cluster-selector-table/useSpiderClusterData.ts b/dbm-ui/frontend/src/views/db-manage/tendb-cluster/proxy-slave-apply/pages/page1/components/cluster-selector-table/useSpiderClusterData.ts
index 2540eabc1b..8b784db3f1 100644
--- a/dbm-ui/frontend/src/views/db-manage/tendb-cluster/proxy-slave-apply/pages/page1/components/cluster-selector-table/useSpiderClusterData.ts
+++ b/dbm-ui/frontend/src/views/db-manage/tendb-cluster/proxy-slave-apply/pages/page1/components/cluster-selector-table/useSpiderClusterData.ts
@@ -96,7 +96,7 @@ export function useClusterData(activeTab: Ref, searchParams: Ref {
dbModuleList.value = res.map((item) => ({
id: item.db_module_id,
- name: item.name,
+ name: item.alias_name,
}));
return dbModuleList.value;
});
diff --git a/dbm-ui/frontend/src/views/service-apply/create-db-module/Index.vue b/dbm-ui/frontend/src/views/service-apply/create-db-module/Index.vue
index 8a5b39ec52..8a03d7ee17 100644
--- a/dbm-ui/frontend/src/views/service-apply/create-db-module/Index.vue
+++ b/dbm-ui/frontend/src/views/service-apply/create-db-module/Index.vue
@@ -23,11 +23,11 @@
:title="t('模块信息')">
+ :rules="rules.alias_name">
{{ t('所属业务') }} : {{ bizInfo.name }}
@@ -158,7 +158,7 @@
* 获取表单基础信息
*/
const getFormData = () => ({
- module_name: (route.query.module_name ?? '') as string,
+ alias_name: (route.query.alias_name ?? '') as string,
mysql_type: ticketType,
version: '',
character_set: '',
@@ -191,7 +191,7 @@
submit: false,
});
const rules = {
- module_name: [
+ alias_name: [
{
required: true,
message: t('模块名称不能为空'),
@@ -367,9 +367,12 @@
// 新建模块或已经新建成功则不执行创建
if (!isReadonly.value) {
+ // aliasname-version-charset
+ const dbModuleName = `${formData.alias_name}-${formData.version}-${formData.character_set}`;
const createResult = await createModules({
biz_id: bizId,
- db_module_name: formData.module_name,
+ alias_name: formData.alias_name,
+ db_module_name: dbModuleName,
cluster_type: ticketInfo.type,
});
moduleId.value = createResult.db_module_id;
@@ -409,7 +412,7 @@
});
await updateBusinessConfig({
- name: formData.module_name,
+ name: formData.alias_name,
conf_items: confItems,
description: '',
publish_description: '',
diff --git a/dbm-ui/frontend/src/views/service-apply/create-db-module/SqlServerCreateDbModule.vue b/dbm-ui/frontend/src/views/service-apply/create-db-module/SqlServerCreateDbModule.vue
index 43f4177ef3..6838a95ad0 100644
--- a/dbm-ui/frontend/src/views/service-apply/create-db-module/SqlServerCreateDbModule.vue
+++ b/dbm-ui/frontend/src/views/service-apply/create-db-module/SqlServerCreateDbModule.vue
@@ -10,11 +10,11 @@
:title="t('模块信息')">
+ :rules="rules.alias_name">
{{ t('所属业务') }} : {{ bizInfo.name }}
@@ -209,7 +209,7 @@
const bizInfo = bizs.find((info) => info.bk_biz_id === bizId) || { name: '' };
const rules = {
- module_name: [
+ alias_name: [
{
required: true,
message: t('模块名称不能为空'),
@@ -227,7 +227,7 @@
* 获取表单基础信息
*/
const getFormData = () => ({
- module_name: '',
+ alias_name: '',
version: '',
camelCase: '', // 数据库配置
character_set: 'Chinese_PRC_CI_AS', // 字符集
@@ -355,7 +355,8 @@
await formRef.value.validate();
// 创建模块
await runCreateModules({
- db_module_name: formData.module_name,
+ alias_name: formData.alias_name,
+ db_module_name: formData.alias_name,
cluster_type: ticketInfo.type,
biz_id: bizId,
});
diff --git a/dbm-ui/frontend/src/views/tickets/common/components/demand-factory/spider/TargetClusterPreview.vue b/dbm-ui/frontend/src/views/tickets/common/components/demand-factory/spider/TargetClusterPreview.vue
index 983264df24..615d3e3732 100644
--- a/dbm-ui/frontend/src/views/tickets/common/components/demand-factory/spider/TargetClusterPreview.vue
+++ b/dbm-ui/frontend/src/views/tickets/common/components/demand-factory/spider/TargetClusterPreview.vue
@@ -145,7 +145,7 @@
onSuccess(res) {
listState.dbModuleList = res.map(item => ({
id: item.db_module_id,
- name: item.name,
+ name: item.alias_name,
}));
},
});