diff --git a/backend/src/main/java/io/metersphere/api/dto/automation/parse/MsScenarioParser.java b/backend/src/main/java/io/metersphere/api/dto/automation/parse/MsScenarioParser.java index abe9011f61..d9b9413239 100644 --- a/backend/src/main/java/io/metersphere/api/dto/automation/parse/MsScenarioParser.java +++ b/backend/src/main/java/io/metersphere/api/dto/automation/parse/MsScenarioParser.java @@ -194,7 +194,7 @@ public class MsScenarioParser extends MsAbstractParser { if (StringUtils.isNotBlank(this.selectModulePath)) { apiScenarioWithBLOBs.setModulePath(this.selectModulePath + path); } else if (StringUtils.isBlank(importRequest.getModuleId())) { - apiScenarioWithBLOBs.setModulePath("/默认模块" + path); + apiScenarioWithBLOBs.setModulePath("/未规划场景" + path); } } } diff --git a/backend/src/main/java/io/metersphere/api/dto/definition/parse/HarParser.java b/backend/src/main/java/io/metersphere/api/dto/definition/parse/HarParser.java index c2c0b9c379..eef0424ac5 100644 --- a/backend/src/main/java/io/metersphere/api/dto/definition/parse/HarParser.java +++ b/backend/src/main/java/io/metersphere/api/dto/definition/parse/HarParser.java @@ -123,7 +123,7 @@ public class HarParser extends HarAbstractParser { if (StringUtils.isNotBlank(selectModulePath)) { apiDefinition.setModulePath(selectModulePath); } else { - apiDefinition.setModulePath("/默认模块"); + apiDefinition.setModulePath("/未规划接口"); } results.add(apiDefinition); } diff --git a/backend/src/main/java/io/metersphere/api/dto/definition/parse/MsDefinitionParser.java b/backend/src/main/java/io/metersphere/api/dto/definition/parse/MsDefinitionParser.java index 6365b63fb6..046a7258e7 100644 --- a/backend/src/main/java/io/metersphere/api/dto/definition/parse/MsDefinitionParser.java +++ b/backend/src/main/java/io/metersphere/api/dto/definition/parse/MsDefinitionParser.java @@ -165,7 +165,7 @@ public class MsDefinitionParser extends MsAbstractParser { if (StringUtils.isNotBlank(this.selectModulePath)) { apiDefinition.setModulePath(this.selectModulePath + path); } else if (StringUtils.isBlank(importRequest.getModuleId())){ - apiDefinition.setModulePath("/默认模块" + path); + apiDefinition.setModulePath("/未规划接口" + path); } } } diff --git a/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java b/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java index df87a6c37c..5b8daa7a9d 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java @@ -407,7 +407,7 @@ public class ApiAutomationService { if (StringUtils.isEmpty(request.getApiScenarioModuleId()) || "default-module".equals(request.getApiScenarioModuleId())) { ApiScenarioModuleExample example = new ApiScenarioModuleExample(); - example.createCriteria().andProjectIdEqualTo(request.getProjectId()).andNameEqualTo("默认模块"); + example.createCriteria().andProjectIdEqualTo(request.getProjectId()).andNameEqualTo("未规划场景"); List modules = apiScenarioModuleMapper.selectByExample(example); if (CollectionUtils.isNotEmpty(modules)) { scenario.setApiScenarioModuleId(modules.get(0).getId()); diff --git a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java index 6c5cf78779..b954f723e5 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java @@ -408,11 +408,11 @@ public class ApiDefinitionService { test.setFollowPeople(request.getFollowPeople()); if (StringUtils.isEmpty(request.getModuleId()) || "default-module".equals(request.getModuleId())) { ApiModuleExample example = new ApiModuleExample(); - example.createCriteria().andProjectIdEqualTo(test.getProjectId()).andProtocolEqualTo(test.getProtocol()).andNameEqualTo("默认模块"); + example.createCriteria().andProjectIdEqualTo(test.getProjectId()).andProtocolEqualTo(test.getProtocol()).andNameEqualTo("未规划接口"); List modules = apiModuleMapper.selectByExample(example); if (CollectionUtils.isNotEmpty(modules)) { test.setModuleId(modules.get(0).getId()); - test.setModulePath("/默认模块"); + test.setModulePath("/未规划接口"); } } test.setResponse(JSONObject.toJSONString(request.getResponse())); @@ -770,7 +770,7 @@ public class ApiDefinitionService { private void setModule(ApiDefinitionWithBLOBs item) { if (item != null && StringUtils.isEmpty(item.getModuleId()) || "default-module".equals(item.getModuleId())) { ApiModuleExample example = new ApiModuleExample(); - example.createCriteria().andProjectIdEqualTo(item.getProjectId()).andProtocolEqualTo(item.getProtocol()).andNameEqualTo("默认模块"); + example.createCriteria().andProjectIdEqualTo(item.getProjectId()).andProtocolEqualTo(item.getProtocol()).andNameEqualTo("未规划接口"); List modules = apiModuleMapper.selectByExample(example); if (CollectionUtils.isNotEmpty(modules)) { item.setModuleId(modules.get(0).getId()); diff --git a/backend/src/main/java/io/metersphere/api/service/ApiModuleService.java b/backend/src/main/java/io/metersphere/api/service/ApiModuleService.java index 17e5e20735..04696bd2bb 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiModuleService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiModuleService.java @@ -504,12 +504,12 @@ public class ApiModuleService extends NodeTreeService { public ApiModule getDefaultNode(String projectId,String protocol) { ApiModuleExample example = new ApiModuleExample(); - example.createCriteria().andProjectIdEqualTo(projectId).andProtocolEqualTo(protocol).andNameEqualTo("默认模块").andParentIdIsNull();; + example.createCriteria().andProjectIdEqualTo(projectId).andProtocolEqualTo(protocol).andNameEqualTo("未规划接口").andParentIdIsNull();; List list = apiModuleMapper.selectByExample(example); if (CollectionUtils.isEmpty(list)) { ApiModule record = new ApiModule(); record.setId(UUID.randomUUID().toString()); - record.setName("默认模块"); + record.setName("未规划接口"); record.setProtocol(protocol); record.setPos(1.0); record.setLevel(1); diff --git a/backend/src/main/java/io/metersphere/api/service/ApiScenarioModuleService.java b/backend/src/main/java/io/metersphere/api/service/ApiScenarioModuleService.java index 0cc6edab04..a9876e0118 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiScenarioModuleService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiScenarioModuleService.java @@ -447,12 +447,12 @@ public class ApiScenarioModuleService extends NodeTreeService list = apiScenarioModuleMapper.selectByExample(example); if (CollectionUtils.isEmpty(list)) { ApiScenarioModule record = new ApiScenarioModule(); record.setId(UUID.randomUUID().toString()); - record.setName("默认模块"); + record.setName("未规划场景"); record.setPos(1.0); record.setLevel(1); record.setCreateTime(System.currentTimeMillis()); diff --git a/backend/src/main/java/io/metersphere/track/service/TestCaseNodeService.java b/backend/src/main/java/io/metersphere/track/service/TestCaseNodeService.java index a971162c8a..ed883e1061 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestCaseNodeService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestCaseNodeService.java @@ -123,14 +123,14 @@ public class TestCaseNodeService extends NodeTreeService { public TestCaseNode getDefaultNode(String projectId) { TestCaseNodeExample example = new TestCaseNodeExample(); - example.createCriteria().andProjectIdEqualTo(projectId).andNameEqualTo("默认模块").andParentIdIsNull();; + example.createCriteria().andProjectIdEqualTo(projectId).andNameEqualTo("未规划用例").andParentIdIsNull();; List list = testCaseNodeMapper.selectByExample(example); if(CollectionUtils.isEmpty(list)){ NodeNumDTO record = new NodeNumDTO(); //TestCaseNode record = new TestCaseNode(); record.setId(UUID.randomUUID().toString()); record.setCreateUser(SessionUtils.getUserId()); - record.setName("默认模块"); + record.setName("未规划用例"); record.setPos(1.0); record.setLevel(1); record.setCreateTime(System.currentTimeMillis()); diff --git a/backend/src/main/java/io/metersphere/track/service/TestCaseService.java b/backend/src/main/java/io/metersphere/track/service/TestCaseService.java index bdb47dcc84..50ba09a3a0 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestCaseService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestCaseService.java @@ -143,7 +143,7 @@ public class TestCaseService { private void setNode(TestCaseWithBLOBs testCase) { if (StringUtils.isEmpty(testCase.getNodeId()) || "default-module".equals(testCase.getNodeId())) { TestCaseNodeExample example = new TestCaseNodeExample(); - example.createCriteria().andProjectIdEqualTo(testCase.getProjectId()).andNameEqualTo("默认模块"); + example.createCriteria().andProjectIdEqualTo(testCase.getProjectId()).andNameEqualTo("未规划用例"); List nodes = testCaseNodeMapper.selectByExample(example); if (CollectionUtils.isNotEmpty(nodes)) { testCase.setNodeId(nodes.get(0).getId()); diff --git a/backend/src/main/resources/db/migration/V95__v1.13_release.sql b/backend/src/main/resources/db/migration/V95__v1.13_release.sql index e631a78110..f8ddb2c964 100644 --- a/backend/src/main/resources/db/migration/V95__v1.13_release.sql +++ b/backend/src/main/resources/db/migration/V95__v1.13_release.sql @@ -15,4 +15,15 @@ CREATE TABLE `plugin` ( PRIMARY KEY (`id`) ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 - COLLATE utf8mb4_general_ci; \ No newline at end of file + COLLATE utf8mb4_general_ci; + +update test_case_node set name = '未规划用例' where name = '默认模块' and `level` = 1; +update test_case set node_path = replace (`node_path`,'/默认模块','/未规划用例') where node_path like '/默认模块%'; + +update api_module set name = '未规划接口' where name = '默认模块' and `level` = 1; +update api_definition set module_path = replace (`module_path`,'/默认模块','/未规划接口') where module_path like '/默认模块%'; + +update api_scenario_module set name = '未规划场景' where name = '默认模块' and `level` = 1; +update api_scenario set module_path = replace (`module_path`,'/默认模块','/未规划场景') where module_path like '/默认模块%'; + + diff --git a/frontend/src/business/components/api/automation/scenario/ApiScenarioModule.vue b/frontend/src/business/components/api/automation/scenario/ApiScenarioModule.vue index a468c486e8..3b7ecbfa27 100644 --- a/frontend/src/business/components/api/automation/scenario/ApiScenarioModule.vue +++ b/frontend/src/business/components/api/automation/scenario/ApiScenarioModule.vue @@ -7,11 +7,12 @@ :is-display="getIsRelevance" v-loading="result.loading" :tree-nodes="data" - :allLabel="$t('commons.all_module_title')" + :allLabel="$t('全部场景')" :type="isReadOnly ? 'view' : 'edit'" :delete-permission="['PROJECT_API_SCENARIO:READ+DELETE']" :add-permission="['PROJECT_API_SCENARIO:READ+CREATE']" :update-permission="['PROJECT_API_SCENARIO:READ+EDIT']" + :default-label="'未规划场景'" @add="add" @edit="edit" @drag="drag" diff --git a/frontend/src/business/components/api/definition/components/module/ApiModule.vue b/frontend/src/business/components/api/definition/components/module/ApiModule.vue index fe1d7023c9..d2bbb4d9e8 100644 --- a/frontend/src/business/components/api/definition/components/module/ApiModule.vue +++ b/frontend/src/business/components/api/definition/components/module/ApiModule.vue @@ -8,7 +8,8 @@ v-loading="result.loading" :tree-nodes="data" :type="isReadOnly ? 'view' : 'edit'" - :allLabel="$t('commons.all_module_title')" + :allLabel="$t('全部接口')" + :default-label="'未规划接口'" @add="add" @edit="edit" @drag="drag" diff --git a/frontend/src/business/components/api/test/Upgrade.vue b/frontend/src/business/components/api/test/Upgrade.vue index 40f70cbd05..3382cde18f 100644 --- a/frontend/src/business/components/api/test/Upgrade.vue +++ b/frontend/src/business/components/api/test/Upgrade.vue @@ -98,7 +98,7 @@ return; } if (this.currentModule.id === "root") { - this.$warning("不能选默认模块,请重新选择一个模块"); + this.$warning("不能选根模块,请重新选择一个模块"); return; } this.loading = true; diff --git a/frontend/src/business/components/track/case/TestCase.vue b/frontend/src/business/components/track/case/TestCase.vue index 02a6051e71..9092367995 100644 --- a/frontend/src/business/components/track/case/TestCase.vue +++ b/frontend/src/business/components/track/case/TestCase.vue @@ -369,7 +369,7 @@ export default { if ('default-module' === data.nodeId) { for (let i = 0; i < this.moduleOptions.length; i++) { let item = this.moduleOptions[i]; - if (item.path.indexOf('默认模块') > -1) { + if (item.path.indexOf('未规划用例') > -1) { data.nodeId = item.id; break; } diff --git a/frontend/src/business/components/track/case/components/TestCaseCreate.vue b/frontend/src/business/components/track/case/components/TestCaseCreate.vue index c62f436807..61da04141e 100644 --- a/frontend/src/business/components/track/case/components/TestCaseCreate.vue +++ b/frontend/src/business/components/track/case/components/TestCaseCreate.vue @@ -117,7 +117,7 @@ export default { this.testCaseForm.nodePath = this.currentModule.path; this.testCaseForm.nodeId = this.currentModule.id; } else { - this.testCaseForm.nodePath = "/默认模块" + this.testCaseForm.nodePath = "/未规划用例" this.testCaseForm.nodeId = "default-module" } this.result = this.$post(path, this.testCaseForm, response => { diff --git a/frontend/src/business/components/track/case/components/TestCaseEdit.vue b/frontend/src/business/components/track/case/components/TestCaseEdit.vue index 528240b891..95c6326f4e 100644 --- a/frontend/src/business/components/track/case/components/TestCaseEdit.vue +++ b/frontend/src/business/components/track/case/components/TestCaseEdit.vue @@ -203,7 +203,7 @@ form: { name: '', module: 'default-module', - nodePath: '/默认模块', + nodePath: '/未规划用例', maintainer: getCurrentUser().id, priority: 'P0', type: '', diff --git a/frontend/src/business/components/track/common/NodeTree.vue b/frontend/src/business/components/track/common/NodeTree.vue index 55de67626d..c1cc817086 100644 --- a/frontend/src/business/components/track/common/NodeTree.vue +++ b/frontend/src/business/components/track/common/NodeTree.vue @@ -35,7 +35,7 @@