diff --git a/backend/src/main/java/io/metersphere/service/TestResourcePoolService.java b/backend/src/main/java/io/metersphere/service/TestResourcePoolService.java index 8e0501e46a..6f487a37dd 100644 --- a/backend/src/main/java/io/metersphere/service/TestResourcePoolService.java +++ b/backend/src/main/java/io/metersphere/service/TestResourcePoolService.java @@ -73,8 +73,14 @@ public class TestResourcePoolService { LoadTestExample example = new LoadTestExample(); example.createCriteria() .andTestResourcePoolIdEqualTo(testResourcePoolId); - if (loadTestMapper.countByExample(example) > 0) { - MSException.throwException(Translator.get("test_resource_pool_is_use")); + List loadTests = loadTestMapper.selectByExample(example); + StringBuilder loadTestNames = new StringBuilder(); + if (loadTests.size() > 0) { + for (LoadTest loadTest : loadTests) { + loadTestNames = loadTestNames.append(loadTest.getName()).append(","); + } + String str = loadTestNames.substring(0, loadTestNames.length() - 1); + MSException.throwException(Translator.get("load_test") + " " + str + " " + Translator.get("test_resource_pool_is_use")); } } 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 fc176ad5e1..82c99bff35 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestCaseService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestCaseService.java @@ -546,7 +546,7 @@ public class TestCaseService { for (TestCase testCase : testCases) { caseName = caseName.append(testCase.getName()).append(","); } - String str = caseName.toString().substring(0, caseName.length() - 1); + String str = caseName.substring(0, caseName.length() - 1); MSException.throwException(Translator.get("related_case_del_fail_prefix") + " " + str + " " + Translator.get("related_case_del_fail_suffix")); } } diff --git a/backend/src/main/resources/i18n/messages_en_US.properties b/backend/src/main/resources/i18n/messages_en_US.properties index 9c54d7b580..ea9fe501cc 100644 --- a/backend/src/main/resources/i18n/messages_en_US.properties +++ b/backend/src/main/resources/i18n/messages_en_US.properties @@ -57,7 +57,8 @@ workspace_not_exists=Workspace is not exists test_resource_pool_id_is_null=Test Resource Pool ID cannot be null test_resource_pool_name_is_null=Test Resource Pool name cannot be null test_resource_pool_name_already_exists=The test resource pool name already exists -test_resource_pool_is_use=The test resource pool is in use and cannot be deleted +load_test=Load Test +test_resource_pool_is_use=This resource pool is in use and cannot be deleted #project project_name_is_null=Project name cannot be null project_name_already_exists=The project name already exists diff --git a/backend/src/main/resources/i18n/messages_zh_CN.properties b/backend/src/main/resources/i18n/messages_zh_CN.properties index e321dcbcf3..7745c3acd2 100644 --- a/backend/src/main/resources/i18n/messages_zh_CN.properties +++ b/backend/src/main/resources/i18n/messages_zh_CN.properties @@ -57,7 +57,8 @@ workspace_not_exists=工作空间不存在 test_resource_pool_id_is_null=资源池ID不能为空 test_resource_pool_name_is_null=资源池名称不能为空 test_resource_pool_name_already_exists=资源池名称已存在 -test_resource_pool_is_use=资源池正在使用中,无法删除 +load_test=性能测试 +test_resource_pool_is_use=正在使用此资源池,无法删除 #project project_name_is_null=项目名称不能为空 project_name_already_exists=项目名称已存在 diff --git a/backend/src/main/resources/i18n/messages_zh_TW.properties b/backend/src/main/resources/i18n/messages_zh_TW.properties index a1f7c77210..32411f615d 100644 --- a/backend/src/main/resources/i18n/messages_zh_TW.properties +++ b/backend/src/main/resources/i18n/messages_zh_TW.properties @@ -57,7 +57,8 @@ workspace_not_exists=工作空間不存在 test_resource_pool_id_is_null=資源池ID不能為空 test_resource_pool_name_is_null=資源池名稱不能為空 test_resource_pool_name_already_exists=資源池名稱已存在 -test_resource_pool_is_use=資源池正在使用中,無法刪除 +load_test=性能測試 +test_resource_pool_is_use=正在使用此資源池,無法刪除 #project project_name_is_null=項目名稱不能為空 project_name_already_exists=項目名稱已存在 diff --git a/frontend/src/business/components/settings/system/TestResourcePool.vue b/frontend/src/business/components/settings/system/TestResourcePool.vue index fe57e7d68a..a4d755dcff 100644 --- a/frontend/src/business/components/settings/system/TestResourcePool.vue +++ b/frontend/src/business/components/settings/system/TestResourcePool.vue @@ -295,7 +295,6 @@ export default { this.infoList = resources; }, del(row) { - window.console.log(row); this.$confirm(this.$t('test_resource_pool.delete_prompt'), this.$t('commons.prompt'), { confirmButtonText: this.$t('commons.confirm'), cancelButtonText: this.$t('commons.cancel'), diff --git a/frontend/src/business/components/xpack b/frontend/src/business/components/xpack index f6f172c645..b9091a47b1 160000 --- a/frontend/src/business/components/xpack +++ b/frontend/src/business/components/xpack @@ -1 +1 @@ -Subproject commit f6f172c6451d0f9c51f5e3246a66dde9edcd7a5d +Subproject commit b9091a47b197faef77c72b134b7cf604fe3209f0