diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtLoadTestReportMapper.java b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtLoadTestReportMapper.java index 541877a15b..8393cbe12a 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtLoadTestReportMapper.java +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtLoadTestReportMapper.java @@ -1,8 +1,8 @@ package io.metersphere.base.mapper.ext; import io.metersphere.base.domain.LoadTestReport; -import io.metersphere.controller.request.ReportRequest; import io.metersphere.dto.ReportDTO; +import io.metersphere.performance.controller.request.ReportRequest; import org.apache.ibatis.annotations.Param; import java.util.List; diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.java b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.java index 9635eb28ef..f9c0d46ce7 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.java +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.java @@ -1,12 +1,8 @@ package io.metersphere.base.mapper.ext; import io.metersphere.base.domain.TestCase; -import io.metersphere.controller.request.ReportRequest; import io.metersphere.controller.request.testcase.QueryTestCaseRequest; -import io.metersphere.controller.request.testplancase.QueryTestPlanCaseRequest; -import io.metersphere.dto.ReportDTO; import io.metersphere.dto.TestCaseDTO; -import io.metersphere.dto.TestPlanCaseDTO; import org.apache.ibatis.annotations.Param; import java.util.List; diff --git a/backend/src/main/java/io/metersphere/controller/handler/ResultResponseBodyAdvice.java b/backend/src/main/java/io/metersphere/controller/handler/ResultResponseBodyAdvice.java index 4fc16f306c..5f2e7e0ce3 100644 --- a/backend/src/main/java/io/metersphere/controller/handler/ResultResponseBodyAdvice.java +++ b/backend/src/main/java/io/metersphere/controller/handler/ResultResponseBodyAdvice.java @@ -15,7 +15,7 @@ import org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice; /** * 统一处理返回结果集 */ -@RestControllerAdvice(value = {"io.metersphere.controller", "io.metersphere.api.controller"}) +@RestControllerAdvice(value = {"io.metersphere"}) public class ResultResponseBodyAdvice implements ResponseBodyAdvice { @Override diff --git a/backend/src/main/java/io/metersphere/controller/request/LoginRequest.java b/backend/src/main/java/io/metersphere/controller/request/LoginRequest.java index 3f1ec2737e..ae01b80255 100644 --- a/backend/src/main/java/io/metersphere/controller/request/LoginRequest.java +++ b/backend/src/main/java/io/metersphere/controller/request/LoginRequest.java @@ -1,24 +1,11 @@ package io.metersphere.controller.request; +import lombok.Getter; +import lombok.Setter; + +@Getter +@Setter public class LoginRequest { - private String username; - private String password; - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password; - } } diff --git a/backend/src/main/java/io/metersphere/controller/request/OrderRequest.java b/backend/src/main/java/io/metersphere/controller/request/OrderRequest.java index c22fb75b79..b877fb011c 100644 --- a/backend/src/main/java/io/metersphere/controller/request/OrderRequest.java +++ b/backend/src/main/java/io/metersphere/controller/request/OrderRequest.java @@ -1,8 +1,10 @@ package io.metersphere.controller.request; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; -@Data +@Getter +@Setter public class OrderRequest { private String name; private String type; diff --git a/backend/src/main/java/io/metersphere/controller/request/OrganizationRequest.java b/backend/src/main/java/io/metersphere/controller/request/OrganizationRequest.java index 3ef692b766..f4128438bb 100644 --- a/backend/src/main/java/io/metersphere/controller/request/OrganizationRequest.java +++ b/backend/src/main/java/io/metersphere/controller/request/OrganizationRequest.java @@ -1,13 +1,10 @@ package io.metersphere.controller.request; +import lombok.Getter; +import lombok.Setter; + +@Getter +@Setter public class OrganizationRequest { private String name; - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } } diff --git a/backend/src/main/java/io/metersphere/controller/request/ProjectRequest.java b/backend/src/main/java/io/metersphere/controller/request/ProjectRequest.java index 4a79086123..cf2a689215 100644 --- a/backend/src/main/java/io/metersphere/controller/request/ProjectRequest.java +++ b/backend/src/main/java/io/metersphere/controller/request/ProjectRequest.java @@ -1,22 +1,11 @@ package io.metersphere.controller.request; +import lombok.Getter; +import lombok.Setter; + +@Getter +@Setter public class ProjectRequest { private String workspaceId; private String name; - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getWorkspaceId() { - return workspaceId; - } - - public void setWorkspaceId(String workspaceId) { - this.workspaceId = workspaceId; - } } diff --git a/backend/src/main/java/io/metersphere/controller/request/ReportRequest.java b/backend/src/main/java/io/metersphere/controller/request/ReportRequest.java deleted file mode 100644 index 010ffd0623..0000000000 --- a/backend/src/main/java/io/metersphere/controller/request/ReportRequest.java +++ /dev/null @@ -1,22 +0,0 @@ -package io.metersphere.controller.request; - -public class ReportRequest { - private String name; - private String workspaceId; - - public String getWorkspaceId() { - return workspaceId; - } - - public void setWorkspaceId(String workspaceId) { - this.workspaceId = workspaceId; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } -} diff --git a/backend/src/main/java/io/metersphere/controller/request/UserRequest.java b/backend/src/main/java/io/metersphere/controller/request/UserRequest.java index 73dab356a3..37808b1f4c 100644 --- a/backend/src/main/java/io/metersphere/controller/request/UserRequest.java +++ b/backend/src/main/java/io/metersphere/controller/request/UserRequest.java @@ -1,32 +1,12 @@ package io.metersphere.controller.request; -public class UserRequest { +import lombok.Getter; +import lombok.Setter; +@Getter +@Setter +public class UserRequest { private String id; private String name; private String email; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } } diff --git a/backend/src/main/java/io/metersphere/controller/request/WorkspaceRequest.java b/backend/src/main/java/io/metersphere/controller/request/WorkspaceRequest.java index 5e092cd913..ce51de92c2 100644 --- a/backend/src/main/java/io/metersphere/controller/request/WorkspaceRequest.java +++ b/backend/src/main/java/io/metersphere/controller/request/WorkspaceRequest.java @@ -1,22 +1,11 @@ package io.metersphere.controller.request; +import lombok.Getter; +import lombok.Setter; + +@Getter +@Setter public class WorkspaceRequest { private String organizationId; private String name; - - public String getOrganizationId() { - return organizationId; - } - - public void setOrganizationId(String organizationId) { - this.organizationId = organizationId; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } } diff --git a/backend/src/main/java/io/metersphere/controller/request/member/AddMemberRequest.java b/backend/src/main/java/io/metersphere/controller/request/member/AddMemberRequest.java index 40513843de..21ba337037 100644 --- a/backend/src/main/java/io/metersphere/controller/request/member/AddMemberRequest.java +++ b/backend/src/main/java/io/metersphere/controller/request/member/AddMemberRequest.java @@ -1,34 +1,15 @@ package io.metersphere.controller.request.member; +import lombok.Getter; +import lombok.Setter; + import java.util.List; +@Getter +@Setter public class AddMemberRequest { private String workspaceId; private List userIds; private List roleIds; - - public List getRoleIds() { - return roleIds; - } - - public void setRoleIds(List roleIds) { - this.roleIds = roleIds; - } - - public String getWorkspaceId() { - return workspaceId; - } - - public void setWorkspaceId(String workspaceId) { - this.workspaceId = workspaceId; - } - - public List getUserIds() { - return userIds; - } - - public void setUserIds(List userIds) { - this.userIds = userIds; - } } diff --git a/backend/src/main/java/io/metersphere/controller/request/member/EditPassWordRequest.java b/backend/src/main/java/io/metersphere/controller/request/member/EditPassWordRequest.java index d8af36dd7e..4ddca01af9 100644 --- a/backend/src/main/java/io/metersphere/controller/request/member/EditPassWordRequest.java +++ b/backend/src/main/java/io/metersphere/controller/request/member/EditPassWordRequest.java @@ -1,9 +1,12 @@ package io.metersphere.controller.request.member; -import lombok.Data; -@Data +import lombok.Getter; +import lombok.Setter; + +@Getter +@Setter public class EditPassWordRequest { - private String password; - private String newpassword; - private String id; + private String password; + private String newpassword; + private String id; } diff --git a/backend/src/main/java/io/metersphere/controller/request/member/QueryMemberRequest.java b/backend/src/main/java/io/metersphere/controller/request/member/QueryMemberRequest.java index 0795c9b98a..40360cb01f 100644 --- a/backend/src/main/java/io/metersphere/controller/request/member/QueryMemberRequest.java +++ b/backend/src/main/java/io/metersphere/controller/request/member/QueryMemberRequest.java @@ -1,23 +1,11 @@ package io.metersphere.controller.request.member; +import lombok.Getter; +import lombok.Setter; +@Getter +@Setter public class QueryMemberRequest { private String name; private String workspaceId; - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getWorkspaceId() { - return workspaceId; - } - - public void setWorkspaceId(String workspaceId) { - this.workspaceId = workspaceId; - } } diff --git a/backend/src/main/java/io/metersphere/controller/request/organization/AddOrgMemberRequest.java b/backend/src/main/java/io/metersphere/controller/request/organization/AddOrgMemberRequest.java index c9ed0ccb9a..98d5593bd1 100644 --- a/backend/src/main/java/io/metersphere/controller/request/organization/AddOrgMemberRequest.java +++ b/backend/src/main/java/io/metersphere/controller/request/organization/AddOrgMemberRequest.java @@ -1,34 +1,15 @@ package io.metersphere.controller.request.organization; +import lombok.Getter; +import lombok.Setter; + import java.util.List; +@Getter +@Setter public class AddOrgMemberRequest { private String organizationId; private List userIds; private List roleIds; - - public String getOrganizationId() { - return organizationId; - } - - public void setOrganizationId(String organizationId) { - this.organizationId = organizationId; - } - - public List getUserIds() { - return userIds; - } - - public void setUserIds(List userIds) { - this.userIds = userIds; - } - - public List getRoleIds() { - return roleIds; - } - - public void setRoleIds(List roleIds) { - this.roleIds = roleIds; - } } diff --git a/backend/src/main/java/io/metersphere/controller/request/organization/QueryOrgMemberRequest.java b/backend/src/main/java/io/metersphere/controller/request/organization/QueryOrgMemberRequest.java index 1703823a6d..684cdae270 100644 --- a/backend/src/main/java/io/metersphere/controller/request/organization/QueryOrgMemberRequest.java +++ b/backend/src/main/java/io/metersphere/controller/request/organization/QueryOrgMemberRequest.java @@ -1,24 +1,11 @@ package io.metersphere.controller.request.organization; +import lombok.Getter; +import lombok.Setter; +@Getter +@Setter public class QueryOrgMemberRequest { - private String name; private String organizationId; - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getOrganizationId() { - return organizationId; - } - - public void setOrganizationId(String organizationId) { - this.organizationId = organizationId; - } } diff --git a/backend/src/main/java/io/metersphere/controller/request/resourcepool/QueryResourcePoolRequest.java b/backend/src/main/java/io/metersphere/controller/request/resourcepool/QueryResourcePoolRequest.java index f3d05e793c..718622d243 100644 --- a/backend/src/main/java/io/metersphere/controller/request/resourcepool/QueryResourcePoolRequest.java +++ b/backend/src/main/java/io/metersphere/controller/request/resourcepool/QueryResourcePoolRequest.java @@ -1,14 +1,10 @@ package io.metersphere.controller.request.resourcepool; +import lombok.Getter; +import lombok.Setter; + +@Getter +@Setter public class QueryResourcePoolRequest { - private String name; - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } } diff --git a/backend/src/main/java/io/metersphere/controller/request/testCaseReport/CreateReportRequest.java b/backend/src/main/java/io/metersphere/controller/request/testCaseReport/CreateReportRequest.java index 163570003c..57729499f2 100644 --- a/backend/src/main/java/io/metersphere/controller/request/testCaseReport/CreateReportRequest.java +++ b/backend/src/main/java/io/metersphere/controller/request/testCaseReport/CreateReportRequest.java @@ -1,8 +1,10 @@ package io.metersphere.controller.request.testCaseReport; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; -@Data +@Getter +@Setter public class CreateReportRequest { String planId; String templateId; diff --git a/backend/src/main/java/io/metersphere/controller/request/testCaseReport/QueryTemplateRequest.java b/backend/src/main/java/io/metersphere/controller/request/testCaseReport/QueryTemplateRequest.java index d3bcb50929..d7e5e3446d 100644 --- a/backend/src/main/java/io/metersphere/controller/request/testCaseReport/QueryTemplateRequest.java +++ b/backend/src/main/java/io/metersphere/controller/request/testCaseReport/QueryTemplateRequest.java @@ -1,9 +1,11 @@ package io.metersphere.controller.request.testCaseReport; import io.metersphere.base.domain.TestCaseReportTemplate; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; -@Data +@Getter +@Setter public class QueryTemplateRequest extends TestCaseReportTemplate { Boolean queryDefault; } diff --git a/backend/src/main/java/io/metersphere/controller/request/testcase/PlanCaseRelevanceRequest.java b/backend/src/main/java/io/metersphere/controller/request/testcase/PlanCaseRelevanceRequest.java index 5948c57867..260a15b0c7 100644 --- a/backend/src/main/java/io/metersphere/controller/request/testcase/PlanCaseRelevanceRequest.java +++ b/backend/src/main/java/io/metersphere/controller/request/testcase/PlanCaseRelevanceRequest.java @@ -1,26 +1,14 @@ package io.metersphere.controller.request.testcase; +import lombok.Getter; +import lombok.Setter; + import java.util.ArrayList; import java.util.List; +@Getter +@Setter public class PlanCaseRelevanceRequest { - private String planId; private List testCaseIds = new ArrayList<>(); - - public String getPlanId() { - return planId; - } - - public void setPlanId(String planId) { - this.planId = planId; - } - - public List getTestCaseIds() { - return testCaseIds; - } - - public void setTestCaseIds(List testCaseIds) { - this.testCaseIds = testCaseIds; - } } diff --git a/backend/src/main/java/io/metersphere/controller/request/testcase/QueryTestCaseRequest.java b/backend/src/main/java/io/metersphere/controller/request/testcase/QueryTestCaseRequest.java index 12a9124cd3..6ccff8be77 100644 --- a/backend/src/main/java/io/metersphere/controller/request/testcase/QueryTestCaseRequest.java +++ b/backend/src/main/java/io/metersphere/controller/request/testcase/QueryTestCaseRequest.java @@ -2,12 +2,14 @@ package io.metersphere.controller.request.testcase; import io.metersphere.base.domain.TestCase; import io.metersphere.controller.request.OrderRequest; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.util.List; import java.util.Map; -@Data +@Getter +@Setter public class QueryTestCaseRequest extends TestCase { private List nodeIds; diff --git a/backend/src/main/java/io/metersphere/controller/request/testcase/QueryTestPlanRequest.java b/backend/src/main/java/io/metersphere/controller/request/testcase/QueryTestPlanRequest.java index ffc8c55a0a..0e07ea55a3 100644 --- a/backend/src/main/java/io/metersphere/controller/request/testcase/QueryTestPlanRequest.java +++ b/backend/src/main/java/io/metersphere/controller/request/testcase/QueryTestPlanRequest.java @@ -1,19 +1,12 @@ package io.metersphere.controller.request.testcase; -import io.metersphere.base.domain.TestCase; import io.metersphere.base.domain.TestPlan; +import lombok.Getter; +import lombok.Setter; -import java.util.List; - +@Getter +@Setter public class QueryTestPlanRequest extends TestPlan { private boolean recent = false; - - public boolean isRecent() { - return recent; - } - - public void setRecent(boolean recent) { - this.recent = recent; - } } diff --git a/backend/src/main/java/io/metersphere/controller/request/testcase/TestCaseBatchRequest.java b/backend/src/main/java/io/metersphere/controller/request/testcase/TestCaseBatchRequest.java index d0e7c07690..2ccbbe1f5e 100644 --- a/backend/src/main/java/io/metersphere/controller/request/testcase/TestCaseBatchRequest.java +++ b/backend/src/main/java/io/metersphere/controller/request/testcase/TestCaseBatchRequest.java @@ -1,19 +1,13 @@ package io.metersphere.controller.request.testcase; import io.metersphere.base.domain.TestCaseWithBLOBs; -import io.metersphere.base.domain.TestPlanTestCase; +import lombok.Getter; +import lombok.Setter; import java.util.List; +@Getter +@Setter public class TestCaseBatchRequest extends TestCaseWithBLOBs { - private List ids; - - public List getIds() { - return ids; - } - - public void setIds(List ids) { - this.ids = ids; - } } diff --git a/backend/src/main/java/io/metersphere/controller/request/testcase/TestPlanCaseBatchRequest.java b/backend/src/main/java/io/metersphere/controller/request/testcase/TestPlanCaseBatchRequest.java index caf82aeb67..18d3dbd466 100644 --- a/backend/src/main/java/io/metersphere/controller/request/testcase/TestPlanCaseBatchRequest.java +++ b/backend/src/main/java/io/metersphere/controller/request/testcase/TestPlanCaseBatchRequest.java @@ -1,14 +1,13 @@ package io.metersphere.controller.request.testcase; -import io.metersphere.base.domain.TestCase; import io.metersphere.base.domain.TestPlanTestCase; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.util.List; -@Data +@Getter +@Setter public class TestPlanCaseBatchRequest extends TestPlanTestCase { - private List ids; - } diff --git a/backend/src/main/java/io/metersphere/controller/request/testplan/EditTestPlanRequest.java b/backend/src/main/java/io/metersphere/controller/request/testplan/EditTestPlanRequest.java index 1d59fcd4ab..05a076b68c 100644 --- a/backend/src/main/java/io/metersphere/controller/request/testplan/EditTestPlanRequest.java +++ b/backend/src/main/java/io/metersphere/controller/request/testplan/EditTestPlanRequest.java @@ -1,17 +1,13 @@ package io.metersphere.controller.request.testplan; import io.metersphere.base.domain.FileMetadata; +import lombok.Getter; +import lombok.Setter; import java.util.List; +@Getter +@Setter public class EditTestPlanRequest extends TestPlanRequest { private List updatedFileList; - - public List getUpdatedFileList() { - return updatedFileList; - } - - public void setUpdatedFileList(List updatedFileList) { - this.updatedFileList = updatedFileList; - } } diff --git a/backend/src/main/java/io/metersphere/controller/request/testplan/FileOperationRequest.java b/backend/src/main/java/io/metersphere/controller/request/testplan/FileOperationRequest.java index 20853dc30b..0dd3997cd1 100644 --- a/backend/src/main/java/io/metersphere/controller/request/testplan/FileOperationRequest.java +++ b/backend/src/main/java/io/metersphere/controller/request/testplan/FileOperationRequest.java @@ -1,22 +1,11 @@ package io.metersphere.controller.request.testplan; +import lombok.Getter; +import lombok.Setter; + +@Getter +@Setter public class FileOperationRequest { private String id; private String name; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } } diff --git a/backend/src/main/java/io/metersphere/controller/request/testplan/QueryTestPlanRequest.java b/backend/src/main/java/io/metersphere/controller/request/testplan/QueryTestPlanRequest.java index d2751e08b6..0ba100cf57 100644 --- a/backend/src/main/java/io/metersphere/controller/request/testplan/QueryTestPlanRequest.java +++ b/backend/src/main/java/io/metersphere/controller/request/testplan/QueryTestPlanRequest.java @@ -1,8 +1,10 @@ package io.metersphere.controller.request.testplan; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; -@Data +@Getter +@Setter public class QueryTestPlanRequest extends TestPlanRequest { private String workspaceId; private boolean recent = false; // 表示查询最近的测试 diff --git a/backend/src/main/java/io/metersphere/controller/request/testplan/TestPlanRequest.java b/backend/src/main/java/io/metersphere/controller/request/testplan/TestPlanRequest.java index d823c982c9..b199668252 100644 --- a/backend/src/main/java/io/metersphere/controller/request/testplan/TestPlanRequest.java +++ b/backend/src/main/java/io/metersphere/controller/request/testplan/TestPlanRequest.java @@ -1,8 +1,10 @@ package io.metersphere.controller.request.testplan; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; -@Data +@Getter +@Setter public class TestPlanRequest { private String id; diff --git a/backend/src/main/java/io/metersphere/controller/request/testplancase/QueryTestPlanCaseRequest.java b/backend/src/main/java/io/metersphere/controller/request/testplancase/QueryTestPlanCaseRequest.java index 2027a5aa45..1803a72237 100644 --- a/backend/src/main/java/io/metersphere/controller/request/testplancase/QueryTestPlanCaseRequest.java +++ b/backend/src/main/java/io/metersphere/controller/request/testplancase/QueryTestPlanCaseRequest.java @@ -2,12 +2,14 @@ package io.metersphere.controller.request.testplancase; import io.metersphere.base.domain.TestPlanTestCase; import io.metersphere.controller.request.OrderRequest; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.util.List; import java.util.Map; -@Data +@Getter +@Setter public class QueryTestPlanCaseRequest extends TestPlanTestCase { private List nodeIds; diff --git a/backend/src/main/java/io/metersphere/report/base/ChartsData.java b/backend/src/main/java/io/metersphere/performance/base/ChartsData.java similarity index 95% rename from backend/src/main/java/io/metersphere/report/base/ChartsData.java rename to backend/src/main/java/io/metersphere/performance/base/ChartsData.java index f6450973d5..88b53b3eed 100644 --- a/backend/src/main/java/io/metersphere/report/base/ChartsData.java +++ b/backend/src/main/java/io/metersphere/performance/base/ChartsData.java @@ -1,4 +1,4 @@ -package io.metersphere.report.base; +package io.metersphere.performance.base; import lombok.Data; diff --git a/backend/src/main/java/io/metersphere/report/base/Errors.java b/backend/src/main/java/io/metersphere/performance/base/Errors.java similarity index 82% rename from backend/src/main/java/io/metersphere/report/base/Errors.java rename to backend/src/main/java/io/metersphere/performance/base/Errors.java index 41478c1b1e..de4300b698 100644 --- a/backend/src/main/java/io/metersphere/report/base/Errors.java +++ b/backend/src/main/java/io/metersphere/performance/base/Errors.java @@ -1,4 +1,4 @@ -package io.metersphere.report.base; +package io.metersphere.performance.base; import lombok.Data; diff --git a/backend/src/main/java/io/metersphere/report/base/ErrorsTop5.java b/backend/src/main/java/io/metersphere/performance/base/ErrorsTop5.java similarity index 91% rename from backend/src/main/java/io/metersphere/report/base/ErrorsTop5.java rename to backend/src/main/java/io/metersphere/performance/base/ErrorsTop5.java index 129529acd6..bcdeb43294 100644 --- a/backend/src/main/java/io/metersphere/report/base/ErrorsTop5.java +++ b/backend/src/main/java/io/metersphere/performance/base/ErrorsTop5.java @@ -1,4 +1,4 @@ -package io.metersphere.report.base; +package io.metersphere.performance.base; import lombok.Data; diff --git a/backend/src/main/java/io/metersphere/report/base/ReportTimeInfo.java b/backend/src/main/java/io/metersphere/performance/base/ReportTimeInfo.java similarity index 78% rename from backend/src/main/java/io/metersphere/report/base/ReportTimeInfo.java rename to backend/src/main/java/io/metersphere/performance/base/ReportTimeInfo.java index 72e71cb6a6..afa4de1f8f 100644 --- a/backend/src/main/java/io/metersphere/report/base/ReportTimeInfo.java +++ b/backend/src/main/java/io/metersphere/performance/base/ReportTimeInfo.java @@ -1,4 +1,4 @@ -package io.metersphere.report.base; +package io.metersphere.performance.base; import lombok.Data; diff --git a/backend/src/main/java/io/metersphere/report/base/Statistics.java b/backend/src/main/java/io/metersphere/performance/base/Statistics.java similarity index 90% rename from backend/src/main/java/io/metersphere/report/base/Statistics.java rename to backend/src/main/java/io/metersphere/performance/base/Statistics.java index 336a9fea14..119e5100c7 100644 --- a/backend/src/main/java/io/metersphere/report/base/Statistics.java +++ b/backend/src/main/java/io/metersphere/performance/base/Statistics.java @@ -1,4 +1,4 @@ -package io.metersphere.report.base; +package io.metersphere.performance.base; import lombok.Data; diff --git a/backend/src/main/java/io/metersphere/report/base/TestOverview.java b/backend/src/main/java/io/metersphere/performance/base/TestOverview.java similarity index 86% rename from backend/src/main/java/io/metersphere/report/base/TestOverview.java rename to backend/src/main/java/io/metersphere/performance/base/TestOverview.java index 304ba87443..2cdc238888 100644 --- a/backend/src/main/java/io/metersphere/report/base/TestOverview.java +++ b/backend/src/main/java/io/metersphere/performance/base/TestOverview.java @@ -1,4 +1,4 @@ -package io.metersphere.report.base; +package io.metersphere.performance.base; import lombok.Data; diff --git a/backend/src/main/java/io/metersphere/controller/PerformanceReportController.java b/backend/src/main/java/io/metersphere/performance/controller/PerformanceReportController.java similarity index 95% rename from backend/src/main/java/io/metersphere/controller/PerformanceReportController.java rename to backend/src/main/java/io/metersphere/performance/controller/PerformanceReportController.java index dbbacda10c..0a50a1a855 100644 --- a/backend/src/main/java/io/metersphere/controller/PerformanceReportController.java +++ b/backend/src/main/java/io/metersphere/performance/controller/PerformanceReportController.java @@ -1,4 +1,4 @@ -package io.metersphere.controller; +package io.metersphere.performance.controller; import com.github.pagehelper.Page; import com.github.pagehelper.PageHelper; @@ -6,11 +6,11 @@ import io.metersphere.base.domain.LoadTestReport; import io.metersphere.commons.constants.RoleConstants; import io.metersphere.commons.utils.PageUtils; import io.metersphere.commons.utils.Pager; -import io.metersphere.controller.request.ReportRequest; import io.metersphere.dto.LogDetailDTO; import io.metersphere.dto.ReportDTO; -import io.metersphere.report.base.*; -import io.metersphere.service.ReportService; +import io.metersphere.performance.base.*; +import io.metersphere.performance.controller.request.ReportRequest; +import io.metersphere.performance.service.ReportService; import io.metersphere.user.SessionUtils; import org.apache.shiro.authz.annotation.Logical; import org.apache.shiro.authz.annotation.RequiresRoles; diff --git a/backend/src/main/java/io/metersphere/controller/PerformanceTestController.java b/backend/src/main/java/io/metersphere/performance/controller/PerformanceTestController.java similarity index 97% rename from backend/src/main/java/io/metersphere/controller/PerformanceTestController.java rename to backend/src/main/java/io/metersphere/performance/controller/PerformanceTestController.java index a046035ed0..56e0968664 100644 --- a/backend/src/main/java/io/metersphere/controller/PerformanceTestController.java +++ b/backend/src/main/java/io/metersphere/performance/controller/PerformanceTestController.java @@ -1,4 +1,4 @@ -package io.metersphere.controller; +package io.metersphere.performance.controller; import com.github.pagehelper.Page; import com.github.pagehelper.PageHelper; @@ -8,8 +8,8 @@ import io.metersphere.commons.utils.PageUtils; import io.metersphere.commons.utils.Pager; import io.metersphere.controller.request.testplan.*; import io.metersphere.dto.LoadTestDTO; +import io.metersphere.performance.service.PerformanceTestService; import io.metersphere.service.FileService; -import io.metersphere.service.PerformanceTestService; import io.metersphere.user.SessionUtils; import org.apache.shiro.authz.annotation.Logical; import org.apache.shiro.authz.annotation.RequiresRoles; diff --git a/backend/src/main/java/io/metersphere/performance/controller/request/ReportRequest.java b/backend/src/main/java/io/metersphere/performance/controller/request/ReportRequest.java new file mode 100644 index 0000000000..f5c8cf6596 --- /dev/null +++ b/backend/src/main/java/io/metersphere/performance/controller/request/ReportRequest.java @@ -0,0 +1,11 @@ +package io.metersphere.performance.controller.request; + +import lombok.Getter; +import lombok.Setter; + +@Getter +@Setter +public class ReportRequest { + private String name; + private String workspaceId; +} diff --git a/backend/src/main/java/io/metersphere/engine/AbstractEngine.java b/backend/src/main/java/io/metersphere/performance/engine/AbstractEngine.java similarity index 97% rename from backend/src/main/java/io/metersphere/engine/AbstractEngine.java rename to backend/src/main/java/io/metersphere/performance/engine/AbstractEngine.java index c7e07b5d90..be48194868 100644 --- a/backend/src/main/java/io/metersphere/engine/AbstractEngine.java +++ b/backend/src/main/java/io/metersphere/performance/engine/AbstractEngine.java @@ -1,4 +1,4 @@ -package io.metersphere.engine; +package io.metersphere.performance.engine; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; @@ -11,7 +11,7 @@ import io.metersphere.commons.constants.ResourcePoolTypeEnum; import io.metersphere.commons.exception.MSException; import io.metersphere.commons.utils.CommonBeanFactory; import io.metersphere.config.JmeterProperties; -import io.metersphere.service.PerformanceTestService; +import io.metersphere.performance.service.PerformanceTestService; import io.metersphere.service.TestResourcePoolService; import io.metersphere.service.TestResourceService; import org.apache.commons.collections.CollectionUtils; diff --git a/backend/src/main/java/io/metersphere/engine/Engine.java b/backend/src/main/java/io/metersphere/performance/engine/Engine.java similarity index 80% rename from backend/src/main/java/io/metersphere/engine/Engine.java rename to backend/src/main/java/io/metersphere/performance/engine/Engine.java index a7bb071a31..6394f9d410 100644 --- a/backend/src/main/java/io/metersphere/engine/Engine.java +++ b/backend/src/main/java/io/metersphere/performance/engine/Engine.java @@ -1,4 +1,4 @@ -package io.metersphere.engine; +package io.metersphere.performance.engine; import java.util.Map; diff --git a/backend/src/main/java/io/metersphere/engine/EngineContext.java b/backend/src/main/java/io/metersphere/performance/engine/EngineContext.java similarity index 98% rename from backend/src/main/java/io/metersphere/engine/EngineContext.java rename to backend/src/main/java/io/metersphere/performance/engine/EngineContext.java index f3eac08cd9..e140ab4dc5 100644 --- a/backend/src/main/java/io/metersphere/engine/EngineContext.java +++ b/backend/src/main/java/io/metersphere/performance/engine/EngineContext.java @@ -1,4 +1,4 @@ -package io.metersphere.engine; +package io.metersphere.performance.engine; import java.util.HashMap; import java.util.Map; diff --git a/backend/src/main/java/io/metersphere/engine/EngineFactory.java b/backend/src/main/java/io/metersphere/performance/engine/EngineFactory.java similarity index 95% rename from backend/src/main/java/io/metersphere/engine/EngineFactory.java rename to backend/src/main/java/io/metersphere/performance/engine/EngineFactory.java index 909bc95809..01b3eeff48 100644 --- a/backend/src/main/java/io/metersphere/engine/EngineFactory.java +++ b/backend/src/main/java/io/metersphere/performance/engine/EngineFactory.java @@ -1,4 +1,4 @@ -package io.metersphere.engine; +package io.metersphere.performance.engine; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; @@ -10,11 +10,11 @@ import io.metersphere.commons.constants.FileType; import io.metersphere.commons.constants.ResourcePoolTypeEnum; import io.metersphere.commons.exception.MSException; import io.metersphere.config.KafkaProperties; -import io.metersphere.engine.docker.DockerTestEngine; -import io.metersphere.engine.kubernetes.KubernetesTestEngine; import io.metersphere.i18n.Translator; -import io.metersphere.parse.EngineSourceParser; -import io.metersphere.parse.EngineSourceParserFactory; +import io.metersphere.performance.engine.docker.DockerTestEngine; +import io.metersphere.performance.engine.kubernetes.KubernetesTestEngine; +import io.metersphere.performance.parse.EngineSourceParser; +import io.metersphere.performance.parse.EngineSourceParserFactory; import io.metersphere.service.FileService; import io.metersphere.service.TestResourcePoolService; import org.apache.commons.collections.CollectionUtils; diff --git a/backend/src/main/java/io/metersphere/engine/EngineThread.java b/backend/src/main/java/io/metersphere/performance/engine/EngineThread.java similarity index 96% rename from backend/src/main/java/io/metersphere/engine/EngineThread.java rename to backend/src/main/java/io/metersphere/performance/engine/EngineThread.java index c37ed127f8..e00c9b1354 100644 --- a/backend/src/main/java/io/metersphere/engine/EngineThread.java +++ b/backend/src/main/java/io/metersphere/performance/engine/EngineThread.java @@ -1,4 +1,4 @@ -package io.metersphere.engine; +package io.metersphere.performance.engine; import java.util.concurrent.atomic.AtomicBoolean; diff --git a/backend/src/main/java/io/metersphere/engine/docker/DockerTestEngine.java b/backend/src/main/java/io/metersphere/performance/engine/docker/DockerTestEngine.java similarity index 93% rename from backend/src/main/java/io/metersphere/engine/docker/DockerTestEngine.java rename to backend/src/main/java/io/metersphere/performance/engine/docker/DockerTestEngine.java index a998e6ffbd..0f09c8501e 100644 --- a/backend/src/main/java/io/metersphere/engine/docker/DockerTestEngine.java +++ b/backend/src/main/java/io/metersphere/performance/engine/docker/DockerTestEngine.java @@ -1,4 +1,4 @@ -package io.metersphere.engine.docker; +package io.metersphere.performance.engine.docker; import com.alibaba.fastjson.JSON; import io.metersphere.base.domain.LoadTestWithBLOBs; @@ -7,11 +7,11 @@ import io.metersphere.commons.constants.ResourceStatusEnum; import io.metersphere.commons.exception.MSException; import io.metersphere.commons.utils.CommonBeanFactory; import io.metersphere.dto.NodeDTO; -import io.metersphere.engine.AbstractEngine; -import io.metersphere.engine.EngineContext; -import io.metersphere.engine.EngineFactory; -import io.metersphere.engine.docker.request.TestRequest; import io.metersphere.i18n.Translator; +import io.metersphere.performance.engine.AbstractEngine; +import io.metersphere.performance.engine.EngineContext; +import io.metersphere.performance.engine.EngineFactory; +import io.metersphere.performance.engine.docker.request.TestRequest; import org.springframework.web.client.RestTemplate; import java.util.HashMap; diff --git a/backend/src/main/java/io/metersphere/engine/docker/request/BaseRequest.java b/backend/src/main/java/io/metersphere/performance/engine/docker/request/BaseRequest.java similarity index 77% rename from backend/src/main/java/io/metersphere/engine/docker/request/BaseRequest.java rename to backend/src/main/java/io/metersphere/performance/engine/docker/request/BaseRequest.java index 9f7de0c369..f0e1670684 100644 --- a/backend/src/main/java/io/metersphere/engine/docker/request/BaseRequest.java +++ b/backend/src/main/java/io/metersphere/performance/engine/docker/request/BaseRequest.java @@ -1,4 +1,4 @@ -package io.metersphere.engine.docker.request; +package io.metersphere.performance.engine.docker.request; public class BaseRequest { private String testId; diff --git a/backend/src/main/java/io/metersphere/engine/docker/request/TestRequest.java b/backend/src/main/java/io/metersphere/performance/engine/docker/request/TestRequest.java similarity index 94% rename from backend/src/main/java/io/metersphere/engine/docker/request/TestRequest.java rename to backend/src/main/java/io/metersphere/performance/engine/docker/request/TestRequest.java index 0cdd97f42a..8cc6f8ab7e 100644 --- a/backend/src/main/java/io/metersphere/engine/docker/request/TestRequest.java +++ b/backend/src/main/java/io/metersphere/performance/engine/docker/request/TestRequest.java @@ -1,4 +1,4 @@ -package io.metersphere.engine.docker.request; +package io.metersphere.performance.engine.docker.request; import java.util.HashMap; import java.util.Map; diff --git a/backend/src/main/java/io/metersphere/engine/kubernetes/KubernetesTestEngine.java b/backend/src/main/java/io/metersphere/performance/engine/kubernetes/KubernetesTestEngine.java similarity index 91% rename from backend/src/main/java/io/metersphere/engine/kubernetes/KubernetesTestEngine.java rename to backend/src/main/java/io/metersphere/performance/engine/kubernetes/KubernetesTestEngine.java index bdd60a871e..63fee0f0ec 100644 --- a/backend/src/main/java/io/metersphere/engine/kubernetes/KubernetesTestEngine.java +++ b/backend/src/main/java/io/metersphere/performance/engine/kubernetes/KubernetesTestEngine.java @@ -1,4 +1,4 @@ -package io.metersphere.engine.kubernetes; +package io.metersphere.performance.engine.kubernetes; import com.alibaba.fastjson.JSON; import io.fabric8.kubernetes.api.model.ConfigMap; @@ -8,14 +8,14 @@ import io.metersphere.base.domain.LoadTestWithBLOBs; import io.metersphere.commons.constants.FileType; import io.metersphere.commons.exception.MSException; import io.metersphere.commons.utils.LogUtil; -import io.metersphere.engine.AbstractEngine; -import io.metersphere.engine.EngineContext; -import io.metersphere.engine.EngineFactory; -import io.metersphere.engine.kubernetes.crds.jmeter.Jmeter; -import io.metersphere.engine.kubernetes.crds.jmeter.JmeterSpec; -import io.metersphere.engine.kubernetes.provider.ClientCredential; -import io.metersphere.engine.kubernetes.provider.KubernetesProvider; import io.metersphere.i18n.Translator; +import io.metersphere.performance.engine.AbstractEngine; +import io.metersphere.performance.engine.EngineContext; +import io.metersphere.performance.engine.EngineFactory; +import io.metersphere.performance.engine.kubernetes.crds.jmeter.Jmeter; +import io.metersphere.performance.engine.kubernetes.crds.jmeter.JmeterSpec; +import io.metersphere.performance.engine.kubernetes.provider.ClientCredential; +import io.metersphere.performance.engine.kubernetes.provider.KubernetesProvider; import org.apache.commons.collections.MapUtils; import java.util.HashMap; diff --git a/backend/src/main/java/io/metersphere/engine/kubernetes/crds/MeterSphereCustomResource.java b/backend/src/main/java/io/metersphere/performance/engine/kubernetes/crds/MeterSphereCustomResource.java similarity index 90% rename from backend/src/main/java/io/metersphere/engine/kubernetes/crds/MeterSphereCustomResource.java rename to backend/src/main/java/io/metersphere/performance/engine/kubernetes/crds/MeterSphereCustomResource.java index 91a0dce6a2..d0eed411c2 100644 --- a/backend/src/main/java/io/metersphere/engine/kubernetes/crds/MeterSphereCustomResource.java +++ b/backend/src/main/java/io/metersphere/performance/engine/kubernetes/crds/MeterSphereCustomResource.java @@ -1,4 +1,4 @@ -package io.metersphere.engine.kubernetes.crds; +package io.metersphere.performance.engine.kubernetes.crds; import io.fabric8.kubernetes.client.CustomResource; diff --git a/backend/src/main/java/io/metersphere/engine/kubernetes/crds/MeterSphereCustomResourceDoneable.java b/backend/src/main/java/io/metersphere/performance/engine/kubernetes/crds/MeterSphereCustomResourceDoneable.java similarity index 85% rename from backend/src/main/java/io/metersphere/engine/kubernetes/crds/MeterSphereCustomResourceDoneable.java rename to backend/src/main/java/io/metersphere/performance/engine/kubernetes/crds/MeterSphereCustomResourceDoneable.java index f3075fa695..a0aae5efa7 100644 --- a/backend/src/main/java/io/metersphere/engine/kubernetes/crds/MeterSphereCustomResourceDoneable.java +++ b/backend/src/main/java/io/metersphere/performance/engine/kubernetes/crds/MeterSphereCustomResourceDoneable.java @@ -1,4 +1,4 @@ -package io.metersphere.engine.kubernetes.crds; +package io.metersphere.performance.engine.kubernetes.crds; import io.fabric8.kubernetes.api.builder.Function; import io.fabric8.kubernetes.client.CustomResourceDoneable; diff --git a/backend/src/main/java/io/metersphere/engine/kubernetes/crds/MeterSphereCustomResourceList.java b/backend/src/main/java/io/metersphere/performance/engine/kubernetes/crds/MeterSphereCustomResourceList.java similarity index 74% rename from backend/src/main/java/io/metersphere/engine/kubernetes/crds/MeterSphereCustomResourceList.java rename to backend/src/main/java/io/metersphere/performance/engine/kubernetes/crds/MeterSphereCustomResourceList.java index 086cf9e1b6..73b0d494c5 100644 --- a/backend/src/main/java/io/metersphere/engine/kubernetes/crds/MeterSphereCustomResourceList.java +++ b/backend/src/main/java/io/metersphere/performance/engine/kubernetes/crds/MeterSphereCustomResourceList.java @@ -1,4 +1,4 @@ -package io.metersphere.engine.kubernetes.crds; +package io.metersphere.performance.engine.kubernetes.crds; import io.fabric8.kubernetes.client.CustomResourceList; diff --git a/backend/src/main/java/io/metersphere/engine/kubernetes/crds/jmeter/Jmeter.java b/backend/src/main/java/io/metersphere/performance/engine/kubernetes/crds/jmeter/Jmeter.java similarity index 80% rename from backend/src/main/java/io/metersphere/engine/kubernetes/crds/jmeter/Jmeter.java rename to backend/src/main/java/io/metersphere/performance/engine/kubernetes/crds/jmeter/Jmeter.java index 0727157ecc..91ce1804ec 100644 --- a/backend/src/main/java/io/metersphere/engine/kubernetes/crds/jmeter/Jmeter.java +++ b/backend/src/main/java/io/metersphere/performance/engine/kubernetes/crds/jmeter/Jmeter.java @@ -1,6 +1,6 @@ -package io.metersphere.engine.kubernetes.crds.jmeter; +package io.metersphere.performance.engine.kubernetes.crds.jmeter; -import io.metersphere.engine.kubernetes.crds.MeterSphereCustomResource; +import io.metersphere.performance.engine.kubernetes.crds.MeterSphereCustomResource; public class Jmeter extends MeterSphereCustomResource { public static final String CRD = "jmeters.metersphere.io"; diff --git a/backend/src/main/java/io/metersphere/engine/kubernetes/crds/jmeter/JmeterDoneable.java b/backend/src/main/java/io/metersphere/performance/engine/kubernetes/crds/jmeter/JmeterDoneable.java similarity index 82% rename from backend/src/main/java/io/metersphere/engine/kubernetes/crds/jmeter/JmeterDoneable.java rename to backend/src/main/java/io/metersphere/performance/engine/kubernetes/crds/jmeter/JmeterDoneable.java index 42acb26aef..ec8b80d742 100644 --- a/backend/src/main/java/io/metersphere/engine/kubernetes/crds/jmeter/JmeterDoneable.java +++ b/backend/src/main/java/io/metersphere/performance/engine/kubernetes/crds/jmeter/JmeterDoneable.java @@ -1,4 +1,4 @@ -package io.metersphere.engine.kubernetes.crds.jmeter; +package io.metersphere.performance.engine.kubernetes.crds.jmeter; import io.fabric8.kubernetes.api.builder.Function; import io.fabric8.kubernetes.client.CustomResourceDoneable; diff --git a/backend/src/main/java/io/metersphere/engine/kubernetes/crds/jmeter/JmeterSpec.java b/backend/src/main/java/io/metersphere/performance/engine/kubernetes/crds/jmeter/JmeterSpec.java similarity index 93% rename from backend/src/main/java/io/metersphere/engine/kubernetes/crds/jmeter/JmeterSpec.java rename to backend/src/main/java/io/metersphere/performance/engine/kubernetes/crds/jmeter/JmeterSpec.java index 9ed26694e0..6603e0257b 100644 --- a/backend/src/main/java/io/metersphere/engine/kubernetes/crds/jmeter/JmeterSpec.java +++ b/backend/src/main/java/io/metersphere/performance/engine/kubernetes/crds/jmeter/JmeterSpec.java @@ -1,4 +1,4 @@ -package io.metersphere.engine.kubernetes.crds.jmeter; +package io.metersphere.performance.engine.kubernetes.crds.jmeter; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; diff --git a/backend/src/main/java/io/metersphere/engine/kubernetes/crds/jmeter/JmeterStatus.java b/backend/src/main/java/io/metersphere/performance/engine/kubernetes/crds/jmeter/JmeterStatus.java similarity index 92% rename from backend/src/main/java/io/metersphere/engine/kubernetes/crds/jmeter/JmeterStatus.java rename to backend/src/main/java/io/metersphere/performance/engine/kubernetes/crds/jmeter/JmeterStatus.java index 9b24290bf7..8132f1781a 100644 --- a/backend/src/main/java/io/metersphere/engine/kubernetes/crds/jmeter/JmeterStatus.java +++ b/backend/src/main/java/io/metersphere/performance/engine/kubernetes/crds/jmeter/JmeterStatus.java @@ -1,4 +1,4 @@ -package io.metersphere.engine.kubernetes.crds.jmeter; +package io.metersphere.performance.engine.kubernetes.crds.jmeter; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; diff --git a/backend/src/main/java/io/metersphere/engine/kubernetes/provider/AbstractClientProvider.java b/backend/src/main/java/io/metersphere/performance/engine/kubernetes/provider/AbstractClientProvider.java similarity index 97% rename from backend/src/main/java/io/metersphere/engine/kubernetes/provider/AbstractClientProvider.java rename to backend/src/main/java/io/metersphere/performance/engine/kubernetes/provider/AbstractClientProvider.java index ba65cd2cb5..4add6c111c 100644 --- a/backend/src/main/java/io/metersphere/engine/kubernetes/provider/AbstractClientProvider.java +++ b/backend/src/main/java/io/metersphere/performance/engine/kubernetes/provider/AbstractClientProvider.java @@ -1,4 +1,4 @@ -package io.metersphere.engine.kubernetes.provider; +package io.metersphere.performance.engine.kubernetes.provider; import com.alibaba.fastjson.JSONObject; import com.fasterxml.jackson.databind.ObjectMapper; @@ -8,9 +8,9 @@ import io.fabric8.kubernetes.client.ConfigBuilder; import io.fabric8.kubernetes.client.DefaultKubernetesClient; import io.fabric8.kubernetes.client.KubernetesClient; import io.fabric8.kubernetes.client.dsl.*; -import io.metersphere.engine.kubernetes.crds.MeterSphereCustomResource; -import io.metersphere.engine.kubernetes.crds.MeterSphereCustomResourceDoneable; -import io.metersphere.engine.kubernetes.crds.MeterSphereCustomResourceList; +import io.metersphere.performance.engine.kubernetes.crds.MeterSphereCustomResource; +import io.metersphere.performance.engine.kubernetes.crds.MeterSphereCustomResourceDoneable; +import io.metersphere.performance.engine.kubernetes.crds.MeterSphereCustomResourceList; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.MapUtils; import org.apache.commons.lang3.StringUtils; diff --git a/backend/src/main/java/io/metersphere/engine/kubernetes/provider/ClientCredential.java b/backend/src/main/java/io/metersphere/performance/engine/kubernetes/provider/ClientCredential.java similarity index 90% rename from backend/src/main/java/io/metersphere/engine/kubernetes/provider/ClientCredential.java rename to backend/src/main/java/io/metersphere/performance/engine/kubernetes/provider/ClientCredential.java index 8a509a5214..0da95ac909 100644 --- a/backend/src/main/java/io/metersphere/engine/kubernetes/provider/ClientCredential.java +++ b/backend/src/main/java/io/metersphere/performance/engine/kubernetes/provider/ClientCredential.java @@ -1,4 +1,4 @@ -package io.metersphere.engine.kubernetes.provider; +package io.metersphere.performance.engine.kubernetes.provider; public class ClientCredential { diff --git a/backend/src/main/java/io/metersphere/engine/kubernetes/provider/DockerRegistry.java b/backend/src/main/java/io/metersphere/performance/engine/kubernetes/provider/DockerRegistry.java similarity index 93% rename from backend/src/main/java/io/metersphere/engine/kubernetes/provider/DockerRegistry.java rename to backend/src/main/java/io/metersphere/performance/engine/kubernetes/provider/DockerRegistry.java index 344afdbbac..301835fb4d 100644 --- a/backend/src/main/java/io/metersphere/engine/kubernetes/provider/DockerRegistry.java +++ b/backend/src/main/java/io/metersphere/performance/engine/kubernetes/provider/DockerRegistry.java @@ -1,4 +1,4 @@ -package io.metersphere.engine.kubernetes.provider; +package io.metersphere.performance.engine.kubernetes.provider; public class DockerRegistry { diff --git a/backend/src/main/java/io/metersphere/engine/kubernetes/provider/DockerRegistryUtil.java b/backend/src/main/java/io/metersphere/performance/engine/kubernetes/provider/DockerRegistryUtil.java similarity index 92% rename from backend/src/main/java/io/metersphere/engine/kubernetes/provider/DockerRegistryUtil.java rename to backend/src/main/java/io/metersphere/performance/engine/kubernetes/provider/DockerRegistryUtil.java index 11340e7f2f..f11512537a 100644 --- a/backend/src/main/java/io/metersphere/engine/kubernetes/provider/DockerRegistryUtil.java +++ b/backend/src/main/java/io/metersphere/performance/engine/kubernetes/provider/DockerRegistryUtil.java @@ -1,4 +1,4 @@ -package io.metersphere.engine.kubernetes.provider; +package io.metersphere.performance.engine.kubernetes.provider; import com.alibaba.fastjson.JSONObject; diff --git a/backend/src/main/java/io/metersphere/engine/kubernetes/provider/KubernetesProvider.java b/backend/src/main/java/io/metersphere/performance/engine/kubernetes/provider/KubernetesProvider.java similarity index 70% rename from backend/src/main/java/io/metersphere/engine/kubernetes/provider/KubernetesProvider.java rename to backend/src/main/java/io/metersphere/performance/engine/kubernetes/provider/KubernetesProvider.java index 26a41c29a4..c7b645020d 100644 --- a/backend/src/main/java/io/metersphere/engine/kubernetes/provider/KubernetesProvider.java +++ b/backend/src/main/java/io/metersphere/performance/engine/kubernetes/provider/KubernetesProvider.java @@ -1,4 +1,4 @@ -package io.metersphere.engine.kubernetes.provider; +package io.metersphere.performance.engine.kubernetes.provider; public class KubernetesProvider extends AbstractClientProvider { public KubernetesProvider(String credential) { diff --git a/backend/src/main/java/io/metersphere/parse/EngineSourceParser.java b/backend/src/main/java/io/metersphere/performance/parse/EngineSourceParser.java similarity index 60% rename from backend/src/main/java/io/metersphere/parse/EngineSourceParser.java rename to backend/src/main/java/io/metersphere/performance/parse/EngineSourceParser.java index 25de3624d2..8035145812 100644 --- a/backend/src/main/java/io/metersphere/parse/EngineSourceParser.java +++ b/backend/src/main/java/io/metersphere/performance/parse/EngineSourceParser.java @@ -1,6 +1,6 @@ -package io.metersphere.parse; +package io.metersphere.performance.parse; -import io.metersphere.engine.EngineContext; +import io.metersphere.performance.engine.EngineContext; import java.io.InputStream; diff --git a/backend/src/main/java/io/metersphere/parse/EngineSourceParserFactory.java b/backend/src/main/java/io/metersphere/performance/parse/EngineSourceParserFactory.java similarity index 77% rename from backend/src/main/java/io/metersphere/parse/EngineSourceParserFactory.java rename to backend/src/main/java/io/metersphere/performance/parse/EngineSourceParserFactory.java index 6659d8d17d..e2e54994d2 100644 --- a/backend/src/main/java/io/metersphere/parse/EngineSourceParserFactory.java +++ b/backend/src/main/java/io/metersphere/performance/parse/EngineSourceParserFactory.java @@ -1,7 +1,7 @@ -package io.metersphere.parse; +package io.metersphere.performance.parse; import io.metersphere.commons.constants.FileType; -import io.metersphere.parse.xml.XmlEngineSourceParse; +import io.metersphere.performance.parse.xml.XmlEngineSourceParse; public class EngineSourceParserFactory { public static EngineSourceParser createEngineSourceParser(String type) { diff --git a/backend/src/main/java/io/metersphere/parse/xml/XmlEngineSourceParse.java b/backend/src/main/java/io/metersphere/performance/parse/xml/XmlEngineSourceParse.java similarity index 75% rename from backend/src/main/java/io/metersphere/parse/xml/XmlEngineSourceParse.java rename to backend/src/main/java/io/metersphere/performance/parse/xml/XmlEngineSourceParse.java index db8dfe02ae..3723b45433 100644 --- a/backend/src/main/java/io/metersphere/parse/xml/XmlEngineSourceParse.java +++ b/backend/src/main/java/io/metersphere/performance/parse/xml/XmlEngineSourceParse.java @@ -1,9 +1,9 @@ -package io.metersphere.parse.xml; +package io.metersphere.performance.parse.xml; -import io.metersphere.engine.EngineContext; -import io.metersphere.parse.EngineSourceParser; -import io.metersphere.parse.xml.reader.DocumentParser; -import io.metersphere.parse.xml.reader.DocumentParserFactory; +import io.metersphere.performance.engine.EngineContext; +import io.metersphere.performance.parse.EngineSourceParser; +import io.metersphere.performance.parse.xml.reader.DocumentParser; +import io.metersphere.performance.parse.xml.reader.DocumentParserFactory; import org.w3c.dom.Document; import org.xml.sax.InputSource; diff --git a/backend/src/main/java/io/metersphere/parse/xml/reader/DocumentParser.java b/backend/src/main/java/io/metersphere/performance/parse/xml/reader/DocumentParser.java similarity index 55% rename from backend/src/main/java/io/metersphere/parse/xml/reader/DocumentParser.java rename to backend/src/main/java/io/metersphere/performance/parse/xml/reader/DocumentParser.java index 2ab6f67a72..34c8be44f2 100644 --- a/backend/src/main/java/io/metersphere/parse/xml/reader/DocumentParser.java +++ b/backend/src/main/java/io/metersphere/performance/parse/xml/reader/DocumentParser.java @@ -1,10 +1,8 @@ -package io.metersphere.parse.xml.reader; +package io.metersphere.performance.parse.xml.reader; -import io.metersphere.engine.EngineContext; +import io.metersphere.performance.engine.EngineContext; import org.w3c.dom.Document; -import java.io.InputStream; - public interface DocumentParser { String parse(EngineContext context, Document document) throws Exception; } diff --git a/backend/src/main/java/io/metersphere/parse/xml/reader/DocumentParserFactory.java b/backend/src/main/java/io/metersphere/performance/parse/xml/reader/DocumentParserFactory.java similarity index 75% rename from backend/src/main/java/io/metersphere/parse/xml/reader/DocumentParserFactory.java rename to backend/src/main/java/io/metersphere/performance/parse/xml/reader/DocumentParserFactory.java index d5772d174a..dc3e8ee20b 100644 --- a/backend/src/main/java/io/metersphere/parse/xml/reader/DocumentParserFactory.java +++ b/backend/src/main/java/io/metersphere/performance/parse/xml/reader/DocumentParserFactory.java @@ -1,7 +1,7 @@ -package io.metersphere.parse.xml.reader; +package io.metersphere.performance.parse.xml.reader; import io.metersphere.commons.constants.FileType; -import io.metersphere.parse.xml.reader.jmx.JmeterDocumentParser; +import io.metersphere.performance.parse.xml.reader.jmx.JmeterDocumentParser; public class DocumentParserFactory { public static DocumentParser createDocumentParser(String type) { diff --git a/backend/src/main/java/io/metersphere/parse/xml/reader/jmx/JmeterDocumentParser.java b/backend/src/main/java/io/metersphere/performance/parse/xml/reader/jmx/JmeterDocumentParser.java similarity index 99% rename from backend/src/main/java/io/metersphere/parse/xml/reader/jmx/JmeterDocumentParser.java rename to backend/src/main/java/io/metersphere/performance/parse/xml/reader/jmx/JmeterDocumentParser.java index 1e2b2dc2c3..40efd5fffd 100644 --- a/backend/src/main/java/io/metersphere/parse/xml/reader/jmx/JmeterDocumentParser.java +++ b/backend/src/main/java/io/metersphere/performance/parse/xml/reader/jmx/JmeterDocumentParser.java @@ -1,11 +1,11 @@ -package io.metersphere.parse.xml.reader.jmx; +package io.metersphere.performance.parse.xml.reader.jmx; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import io.metersphere.commons.utils.CommonBeanFactory; import io.metersphere.config.KafkaProperties; -import io.metersphere.engine.EngineContext; -import io.metersphere.parse.xml.reader.DocumentParser; +import io.metersphere.performance.engine.EngineContext; +import io.metersphere.performance.parse.xml.reader.DocumentParser; import org.apache.commons.lang3.StringUtils; import org.w3c.dom.Document; import org.w3c.dom.Element; diff --git a/backend/src/main/java/io/metersphere/service/PerformanceTestService.java b/backend/src/main/java/io/metersphere/performance/service/PerformanceTestService.java similarity index 98% rename from backend/src/main/java/io/metersphere/service/PerformanceTestService.java rename to backend/src/main/java/io/metersphere/performance/service/PerformanceTestService.java index 8496274ee1..707f26398b 100644 --- a/backend/src/main/java/io/metersphere/service/PerformanceTestService.java +++ b/backend/src/main/java/io/metersphere/performance/service/PerformanceTestService.java @@ -1,4 +1,4 @@ -package io.metersphere.service; +package io.metersphere.performance.service; import io.metersphere.base.domain.*; import io.metersphere.base.mapper.*; @@ -10,9 +10,11 @@ import io.metersphere.commons.exception.MSException; import io.metersphere.commons.utils.LogUtil; import io.metersphere.controller.request.testplan.*; import io.metersphere.dto.LoadTestDTO; -import io.metersphere.engine.Engine; -import io.metersphere.engine.EngineFactory; import io.metersphere.i18n.Translator; +import io.metersphere.performance.engine.Engine; +import io.metersphere.performance.engine.EngineFactory; +import io.metersphere.service.FileService; +import io.metersphere.service.TestResourceService; import org.apache.commons.collections4.ListUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; diff --git a/backend/src/main/java/io/metersphere/service/ReportService.java b/backend/src/main/java/io/metersphere/performance/service/ReportService.java similarity index 96% rename from backend/src/main/java/io/metersphere/service/ReportService.java rename to backend/src/main/java/io/metersphere/performance/service/ReportService.java index a8265df607..95eaa13bd9 100644 --- a/backend/src/main/java/io/metersphere/service/ReportService.java +++ b/backend/src/main/java/io/metersphere/performance/service/ReportService.java @@ -1,4 +1,4 @@ -package io.metersphere.service; +package io.metersphere.performance.service; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; @@ -12,21 +12,19 @@ import io.metersphere.commons.constants.PerformanceTestStatus; import io.metersphere.commons.constants.ReportKeys; import io.metersphere.commons.exception.MSException; import io.metersphere.commons.utils.LogUtil; -import io.metersphere.controller.request.ReportRequest; import io.metersphere.dto.LogDetailDTO; import io.metersphere.dto.ReportDTO; -import io.metersphere.engine.Engine; -import io.metersphere.engine.EngineFactory; -import io.metersphere.report.base.*; +import io.metersphere.performance.base.*; +import io.metersphere.performance.controller.request.ReportRequest; +import io.metersphere.performance.engine.Engine; +import io.metersphere.performance.engine.EngineFactory; +import io.metersphere.service.TestResourceService; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; -import java.util.ArrayList; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.stream.Collectors; @Service diff --git a/backend/src/main/java/io/metersphere/service/ProjectService.java b/backend/src/main/java/io/metersphere/service/ProjectService.java index 4dc397a05d..bba9dc89e8 100644 --- a/backend/src/main/java/io/metersphere/service/ProjectService.java +++ b/backend/src/main/java/io/metersphere/service/ProjectService.java @@ -12,6 +12,7 @@ import io.metersphere.controller.request.ProjectRequest; import io.metersphere.controller.request.testplan.DeleteTestPlanRequest; import io.metersphere.dto.ProjectDTO; import io.metersphere.i18n.Translator; +import io.metersphere.performance.service.PerformanceTestService; import io.metersphere.user.SessionUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; diff --git a/backend/src/main/java/io/metersphere/service/TestResourcePoolService.java b/backend/src/main/java/io/metersphere/service/TestResourcePoolService.java index 0be3736ad5..1055347a62 100644 --- a/backend/src/main/java/io/metersphere/service/TestResourcePoolService.java +++ b/backend/src/main/java/io/metersphere/service/TestResourcePoolService.java @@ -14,8 +14,8 @@ import io.metersphere.commons.utils.LogUtil; import io.metersphere.controller.request.resourcepool.QueryResourcePoolRequest; import io.metersphere.dto.NodeDTO; import io.metersphere.dto.TestResourcePoolDTO; -import io.metersphere.engine.kubernetes.provider.KubernetesProvider; import io.metersphere.i18n.Translator; +import io.metersphere.performance.engine.kubernetes.provider.KubernetesProvider; import org.apache.commons.beanutils.BeanUtils; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; diff --git a/backend/src/main/java/io/metersphere/service/UserService.java b/backend/src/main/java/io/metersphere/service/UserService.java index 1043d86aec..9c4aab264d 100644 --- a/backend/src/main/java/io/metersphere/service/UserService.java +++ b/backend/src/main/java/io/metersphere/service/UserService.java @@ -131,6 +131,10 @@ public class UserService { } public void deleteUser(String userId) { + SessionUser user = SessionUtils.getUser(); + if (StringUtils.equals(user.getId(), userId)) { + MSException.throwException(Translator.get("cannot_delete_current_user")); + } userMapper.deleteByPrimaryKey(userId); } diff --git a/backend/src/main/resources/i18n/messages_en_US.properties b/backend/src/main/resources/i18n/messages_en_US.properties index e10d0175b2..64b1a1dfba 100644 --- a/backend/src/main/resources/i18n/messages_en_US.properties +++ b/backend/src/main/resources/i18n/messages_en_US.properties @@ -32,4 +32,5 @@ workspace_not_exists=Workspace is not exists #api api_load_script_error=Load script error user_id_already_exists=User ID already exists -password_modification_failed=Password modification failed \ No newline at end of file +password_modification_failed=Password modification failed +cannot_delete_current_user=Cannot delete the user currently logged in \ No newline at end of file diff --git a/backend/src/main/resources/i18n/messages_zh_CN.properties b/backend/src/main/resources/i18n/messages_zh_CN.properties index c2da3003cd..4304cc53b2 100644 --- a/backend/src/main/resources/i18n/messages_zh_CN.properties +++ b/backend/src/main/resources/i18n/messages_zh_CN.properties @@ -32,4 +32,5 @@ workspace_not_exists=工作空间不存在 #api api_load_script_error=读取脚本失败 user_id_already_exists=用户id已存在 -password_modification_failed=密码修改失败 \ No newline at end of file +password_modification_failed=密码修改失败 +cannot_delete_current_user=无法删除当前登录用户 \ No newline at end of file