feat: 删除资源池时提示哪些测试正在使用
This commit is contained in:
parent
ff6015754a
commit
6e287d6188
|
@ -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<LoadTest> 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"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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"));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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=项目名称已存在
|
||||
|
|
|
@ -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=項目名稱已存在
|
||||
|
|
|
@ -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'),
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit f6f172c6451d0f9c51f5e3246a66dde9edcd7a5d
|
||||
Subproject commit b9091a47b197faef77c72b134b7cf604fe3209f0
|
Loading…
Reference in New Issue