diff --git a/Dockerfile b/Dockerfile index ce96082847..2b95f96957 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,10 +2,12 @@ FROM registry.fit2cloud.com/metersphere/fabric8-java-alpine-openjdk8-jre MAINTAINER FIT2CLOUD -RUN mkdir -p /opt/apps +RUN mkdir -p /opt/apps && mkdir -p /opt/jmeter ADD backend/target/backend-1.0.jar /opt/apps +ADD backend/target/classes/jmeter/ /opt/jmeter/ + ENV JAVA_APP_JAR=/opt/apps/backend-1.0.jar ENV AB_OFF=true diff --git a/backend/src/main/java/io/metersphere/api/jmeter/JMeterService.java b/backend/src/main/java/io/metersphere/api/jmeter/JMeterService.java index 74282e34bd..bc5207fa0a 100644 --- a/backend/src/main/java/io/metersphere/api/jmeter/JMeterService.java +++ b/backend/src/main/java/io/metersphere/api/jmeter/JMeterService.java @@ -1,16 +1,13 @@ package io.metersphere.api.jmeter; import io.metersphere.commons.exception.MSException; -import io.metersphere.commons.utils.LogUtil; import io.metersphere.config.JmeterProperties; import io.metersphere.i18n.Translator; import org.apache.jmeter.save.SaveService; import org.apache.jmeter.util.JMeterUtils; import org.apache.jorphan.collections.HashTree; import org.springframework.stereotype.Service; -import org.springframework.util.ResourceUtils; -import java.io.FileNotFoundException; import java.io.InputStream; import java.lang.reflect.Field; @@ -25,8 +22,8 @@ public class JMeterService { public void run(InputStream is) { String JMETER_HOME = jmeterProperties.getHome(); String JMETER_PROPERTIES = JMETER_HOME + "/bin/jmeter.properties"; - JMeterUtils.loadJMeterProperties(getPath(JMETER_PROPERTIES)); - JMeterUtils.setJMeterHome(getPath(JMETER_HOME)); + JMeterUtils.loadJMeterProperties(JMETER_PROPERTIES); + JMeterUtils.setJMeterHome(JMETER_HOME); try { Object scriptWrapper = SaveService.loadElement(is); HashTree testPlan = getHashTree(scriptWrapper); @@ -43,14 +40,4 @@ public class JMeterService { field.setAccessible(true); return (HashTree) field.get(scriptWrapper); } - - private String getPath(String path) { - try { - return ResourceUtils.getURL(ResourceUtils.CLASSPATH_URL_PREFIX + path).getPath(); - } catch (FileNotFoundException e) { - LogUtil.error("file not found: " + path, e); - MSException.throwException(Translator.get("api_file_not_found_error")); - } - return null; - } } diff --git a/backend/src/main/java/io/metersphere/dto/ApiReportDTO.java b/backend/src/main/java/io/metersphere/dto/ApiReportDTO.java index e9573633f2..76b0d66fc3 100644 --- a/backend/src/main/java/io/metersphere/dto/ApiReportDTO.java +++ b/backend/src/main/java/io/metersphere/dto/ApiReportDTO.java @@ -1,5 +1,10 @@ package io.metersphere.dto; +import lombok.Getter; +import lombok.Setter; + +@Getter +@Setter public class ApiReportDTO { private String id; @@ -13,92 +18,4 @@ public class ApiReportDTO { private String testName; private String projectId; private String projectName; - - public String getProjectId() { - return projectId; - } - - public void setProjectId(String projectId) { - this.projectId = projectId; - } - - public String getProjectName() { - return projectName; - } - - public void setProjectName(String projectName) { - this.projectName = projectName; - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getTestId() { - return testId; - } - - public void setTestId(String testId) { - this.testId = testId; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public Long getCreateTime() { - return createTime; - } - - public void setCreateTime(Long createTime) { - this.createTime = createTime; - } - - public Long getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Long updateTime) { - this.updateTime = updateTime; - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status; - } - - public String getContent() { - return content; - } - - public void setContent(String content) { - this.content = content; - } - - public String getTestName() { - return testName; - } - - public void setTestName(String testName) { - this.testName = testName; - } } diff --git a/backend/src/main/java/io/metersphere/dto/LoadTestDTO.java b/backend/src/main/java/io/metersphere/dto/LoadTestDTO.java index f6a0ed2c12..d0153bf648 100644 --- a/backend/src/main/java/io/metersphere/dto/LoadTestDTO.java +++ b/backend/src/main/java/io/metersphere/dto/LoadTestDTO.java @@ -1,15 +1,11 @@ package io.metersphere.dto; import io.metersphere.base.domain.LoadTest; +import lombok.Getter; +import lombok.Setter; +@Getter +@Setter public class LoadTestDTO extends LoadTest { private String projectName; - - public String getProjectName() { - return projectName; - } - - public void setProjectName(String projectName) { - this.projectName = projectName; - } } diff --git a/backend/src/main/java/io/metersphere/dto/NodeDTO.java b/backend/src/main/java/io/metersphere/dto/NodeDTO.java index 899139afec..b856672398 100644 --- a/backend/src/main/java/io/metersphere/dto/NodeDTO.java +++ b/backend/src/main/java/io/metersphere/dto/NodeDTO.java @@ -1,31 +1,12 @@ package io.metersphere.dto; +import lombok.Getter; +import lombok.Setter; + +@Getter +@Setter public class NodeDTO { private String ip; private Integer port; private Integer maxConcurrency; - - public String getIp() { - return ip; - } - - public void setIp(String ip) { - this.ip = ip; - } - - public Integer getPort() { - return port; - } - - public void setPort(Integer port) { - this.port = port; - } - - public Integer getMaxConcurrency() { - return maxConcurrency; - } - - public void setMaxConcurrency(Integer maxConcurrency) { - this.maxConcurrency = maxConcurrency; - } } diff --git a/backend/src/main/java/io/metersphere/dto/OrganizationMemberDTO.java b/backend/src/main/java/io/metersphere/dto/OrganizationMemberDTO.java index 479919e9f6..c33e97cf91 100644 --- a/backend/src/main/java/io/metersphere/dto/OrganizationMemberDTO.java +++ b/backend/src/main/java/io/metersphere/dto/OrganizationMemberDTO.java @@ -1,106 +1,23 @@ package io.metersphere.dto; +import lombok.Getter; +import lombok.Setter; + import java.util.ArrayList; import java.util.List; +@Getter +@Setter public class OrganizationMemberDTO { private String id; - private String name; - private String email; - private String phone; - private String status; - private Long createTime; - private Long updateTime; - private String language; - private String organizationId; - - public String getOrganizationId() { - return organizationId; - } - - public void setOrganizationId(String organizationId) { - this.organizationId = organizationId; - } - private List roleIds = new ArrayList<>(); - public List getRoleIds() { - return roleIds; - } - - public void setRoleIds(List roleIds) { - this.roleIds = roleIds; - } - - 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; - } - - public String getPhone() { - return phone; - } - - public void setPhone(String phone) { - this.phone = phone; - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status; - } - - public Long getCreateTime() { - return createTime; - } - - public void setCreateTime(Long createTime) { - this.createTime = createTime; - } - - public Long getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Long updateTime) { - this.updateTime = updateTime; - } - - public String getLanguage() { - return language; - } - - public void setLanguage(String language) { - this.language = language; - } } diff --git a/backend/src/main/java/io/metersphere/dto/ProjectDTO.java b/backend/src/main/java/io/metersphere/dto/ProjectDTO.java index bf4482668c..38f1de39f8 100644 --- a/backend/src/main/java/io/metersphere/dto/ProjectDTO.java +++ b/backend/src/main/java/io/metersphere/dto/ProjectDTO.java @@ -1,5 +1,10 @@ package io.metersphere.dto; +import lombok.Getter; +import lombok.Setter; + +@Getter +@Setter public class ProjectDTO { private String id; @@ -10,59 +15,4 @@ public class ProjectDTO { private Long createTime; private Long updateTime; - 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 getWorkspaceId() { - return workspaceId; - } - - public void setWorkspaceId(String workspaceId) { - this.workspaceId = workspaceId; - } - - public String getWorkspaceName() { - return workspaceName; - } - - public void setWorkspaceName(String workspaceName) { - this.workspaceName = workspaceName; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public Long getCreateTime() { - return createTime; - } - - public void setCreateTime(Long createTime) { - this.createTime = createTime; - } - - public Long getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Long updateTime) { - this.updateTime = updateTime; - } } diff --git a/backend/src/main/java/io/metersphere/dto/ReportDTO.java b/backend/src/main/java/io/metersphere/dto/ReportDTO.java index 1897c7bc12..b5137550a4 100644 --- a/backend/src/main/java/io/metersphere/dto/ReportDTO.java +++ b/backend/src/main/java/io/metersphere/dto/ReportDTO.java @@ -1,5 +1,10 @@ package io.metersphere.dto; +import lombok.Getter; +import lombok.Setter; + +@Getter +@Setter public class ReportDTO { private String id; @@ -13,92 +18,4 @@ public class ReportDTO { private String testName; private String projectId; private String projectName; - - public String getProjectId() { - return projectId; - } - - public void setProjectId(String projectId) { - this.projectId = projectId; - } - - public String getProjectName() { - return projectName; - } - - public void setProjectName(String projectName) { - this.projectName = projectName; - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getTestId() { - return testId; - } - - public void setTestId(String testId) { - this.testId = testId; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public Long getCreateTime() { - return createTime; - } - - public void setCreateTime(Long createTime) { - this.createTime = createTime; - } - - public Long getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Long updateTime) { - this.updateTime = updateTime; - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status; - } - - public String getContent() { - return content; - } - - public void setContent(String content) { - this.content = content; - } - - public String getTestName() { - return testName; - } - - public void setTestName(String testName) { - this.testName = testName; - } } diff --git a/backend/src/main/java/io/metersphere/dto/TestCaseDTO.java b/backend/src/main/java/io/metersphere/dto/TestCaseDTO.java index e2c8585dd0..62a46b000d 100644 --- a/backend/src/main/java/io/metersphere/dto/TestCaseDTO.java +++ b/backend/src/main/java/io/metersphere/dto/TestCaseDTO.java @@ -1,18 +1,13 @@ package io.metersphere.dto; import io.metersphere.base.domain.TestCaseWithBLOBs; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; -@Data +@Getter +@Setter public class TestCaseDTO extends TestCaseWithBLOBs{ private String maintainerName; - public String getMaintainerName() { - return maintainerName; - } - - public void setMaintainerName(String maintainerName) { - this.maintainerName = maintainerName; - } } diff --git a/backend/src/main/java/io/metersphere/dto/TestCaseNodeDTO.java b/backend/src/main/java/io/metersphere/dto/TestCaseNodeDTO.java index 15bdc402b7..15cf229f7e 100644 --- a/backend/src/main/java/io/metersphere/dto/TestCaseNodeDTO.java +++ b/backend/src/main/java/io/metersphere/dto/TestCaseNodeDTO.java @@ -1,27 +1,16 @@ package io.metersphere.dto; import io.metersphere.base.domain.TestCaseNode; +import lombok.Getter; +import lombok.Setter; import java.util.List; +@Getter +@Setter public class TestCaseNodeDTO extends TestCaseNode { private String label; private List children; - public String getLabel() { - return label; - } - - public void setLabel(String label) { - this.label = label; - } - - public List getChildren() { - return children; - } - - public void setChildren(List children) { - this.children = children; - } } diff --git a/backend/src/main/java/io/metersphere/dto/TestCaseReportMetricDTO.java b/backend/src/main/java/io/metersphere/dto/TestCaseReportMetricDTO.java index e04fd5f5d0..292dd712ff 100644 --- a/backend/src/main/java/io/metersphere/dto/TestCaseReportMetricDTO.java +++ b/backend/src/main/java/io/metersphere/dto/TestCaseReportMetricDTO.java @@ -1,18 +1,20 @@ package io.metersphere.dto; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; import java.util.List; -@Data +@Getter +@Setter public class TestCaseReportMetricDTO { - private List executeResult; - private List moduleExecuteResult; - private List executors; - private String principal; - private Long startTime; - private Long endTime; - private String projectName; + private List executeResult; + private List moduleExecuteResult; + private List executors; + private String principal; + private Long startTime; + private Long endTime; + private String projectName; } diff --git a/backend/src/main/java/io/metersphere/dto/TestCaseReportModuleResultDTO.java b/backend/src/main/java/io/metersphere/dto/TestCaseReportModuleResultDTO.java index df72d8d4c0..59c68873bd 100644 --- a/backend/src/main/java/io/metersphere/dto/TestCaseReportModuleResultDTO.java +++ b/backend/src/main/java/io/metersphere/dto/TestCaseReportModuleResultDTO.java @@ -1,8 +1,10 @@ package io.metersphere.dto; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; -@Data +@Getter +@Setter public class TestCaseReportModuleResultDTO { private String moduleId; private String moduleName; diff --git a/backend/src/main/java/io/metersphere/dto/TestCaseReportStatusResultDTO.java b/backend/src/main/java/io/metersphere/dto/TestCaseReportStatusResultDTO.java index f54dbb316e..60d482dfd7 100644 --- a/backend/src/main/java/io/metersphere/dto/TestCaseReportStatusResultDTO.java +++ b/backend/src/main/java/io/metersphere/dto/TestCaseReportStatusResultDTO.java @@ -1,7 +1,10 @@ package io.metersphere.dto; -import lombok.Data; -@Data +import lombok.Getter; +import lombok.Setter; + +@Getter +@Setter public class TestCaseReportStatusResultDTO { private String status; private Integer count; diff --git a/backend/src/main/java/io/metersphere/dto/TestPlanCaseDTO.java b/backend/src/main/java/io/metersphere/dto/TestPlanCaseDTO.java index 2a39cf6187..89bd1cd2ca 100644 --- a/backend/src/main/java/io/metersphere/dto/TestPlanCaseDTO.java +++ b/backend/src/main/java/io/metersphere/dto/TestPlanCaseDTO.java @@ -1,9 +1,11 @@ package io.metersphere.dto; import io.metersphere.base.domain.TestCaseWithBLOBs; -import lombok.Data; +import lombok.Getter; +import lombok.Setter; -@Data +@Getter +@Setter public class TestPlanCaseDTO extends TestCaseWithBLOBs { private String executor; diff --git a/backend/src/main/java/io/metersphere/dto/TestPlanDTO.java b/backend/src/main/java/io/metersphere/dto/TestPlanDTO.java index a7d6f3f205..be59e9c7ec 100644 --- a/backend/src/main/java/io/metersphere/dto/TestPlanDTO.java +++ b/backend/src/main/java/io/metersphere/dto/TestPlanDTO.java @@ -1,15 +1,11 @@ package io.metersphere.dto; import io.metersphere.base.domain.TestPlan; +import lombok.Getter; +import lombok.Setter; +@Getter +@Setter public class TestPlanDTO extends TestPlan { private String projectName; - - public String getProjectName() { - return projectName; - } - - public void setProjectName(String projectName) { - this.projectName = projectName; - } } diff --git a/backend/src/main/java/io/metersphere/dto/TestResourcePoolDTO.java b/backend/src/main/java/io/metersphere/dto/TestResourcePoolDTO.java index 2e99214649..3468400806 100644 --- a/backend/src/main/java/io/metersphere/dto/TestResourcePoolDTO.java +++ b/backend/src/main/java/io/metersphere/dto/TestResourcePoolDTO.java @@ -2,18 +2,15 @@ package io.metersphere.dto; import io.metersphere.base.domain.TestResource; import io.metersphere.base.domain.TestResourcePool; +import lombok.Getter; +import lombok.Setter; import java.util.List; +@Getter +@Setter public class TestResourcePoolDTO extends TestResourcePool { private List resources; - public List getResources() { - return resources; - } - - public void setResources(List resources) { - this.resources = resources; - } } diff --git a/backend/src/main/java/io/metersphere/dto/UserDTO.java b/backend/src/main/java/io/metersphere/dto/UserDTO.java index bb0835c43c..d736479da7 100644 --- a/backend/src/main/java/io/metersphere/dto/UserDTO.java +++ b/backend/src/main/java/io/metersphere/dto/UserDTO.java @@ -2,10 +2,14 @@ package io.metersphere.dto; import io.metersphere.base.domain.Role; import io.metersphere.base.domain.UserRole; +import lombok.Getter; +import lombok.Setter; import java.util.ArrayList; import java.util.List; +@Getter +@Setter public class UserDTO { private String id; @@ -31,101 +35,6 @@ public class UserDTO { private List userRoles = new ArrayList<>(); - public List getRoles() { - return roles; - } - - public void setRoles(List roles) { - this.roles = roles; - } - private static final long serialVersionUID = 1L; - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id == null ? null : id.trim(); - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name == null ? null : name.trim(); - } - - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email == null ? null : email.trim(); - } - - public String getPhone() { - return phone; - } - - public void setPhone(String phone) { - this.phone = phone == null ? null : phone.trim(); - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status == null ? null : status.trim(); - } - - public Long getCreateTime() { - return createTime; - } - - public void setCreateTime(Long createTime) { - this.createTime = createTime; - } - - public Long getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Long updateTime) { - this.updateTime = updateTime; - } - - public List getUserRoles() { - return userRoles; - } - - public void setUserRoles(List userRoles) { - this.userRoles = userRoles; - } - - public String getLanguage() { - return language; - } - - public void setLanguage(String language) { - this.language = language; - } - - public String getLastWorkspaceId() { - return lastWorkspaceId; - } - - public void setLastWorkspaceId(String lastWorkspaceId) { - this.lastWorkspaceId = lastWorkspaceId; - } - - public String getLastOrganizationId() { - return lastOrganizationId; - } - - public void setLastOrganizationId(String lastOrganizationId) { - this.lastOrganizationId = lastOrganizationId; - } } diff --git a/backend/src/main/java/io/metersphere/dto/UserOperateDTO.java b/backend/src/main/java/io/metersphere/dto/UserOperateDTO.java index b1af90cce8..fb473085cb 100644 --- a/backend/src/main/java/io/metersphere/dto/UserOperateDTO.java +++ b/backend/src/main/java/io/metersphere/dto/UserOperateDTO.java @@ -2,18 +2,15 @@ package io.metersphere.dto; import io.metersphere.base.domain.Role; import io.metersphere.base.domain.User; +import lombok.Getter; +import lombok.Setter; import java.util.List; +@Getter +@Setter public class UserOperateDTO extends User { private List roleList; - public List getRoleList() { - return roleList; - } - - public void setRoleList(List roleList) { - this.roleList = roleList; - } } diff --git a/backend/src/main/java/io/metersphere/dto/UserRoleDTO.java b/backend/src/main/java/io/metersphere/dto/UserRoleDTO.java index 602fa101db..6a9a2bf1ba 100644 --- a/backend/src/main/java/io/metersphere/dto/UserRoleDTO.java +++ b/backend/src/main/java/io/metersphere/dto/UserRoleDTO.java @@ -1,5 +1,10 @@ package io.metersphere.dto; +import lombok.Getter; +import lombok.Setter; + +@Getter +@Setter public class UserRoleDTO { private String id; @@ -10,59 +15,4 @@ public class UserRoleDTO { private String parentId; private Boolean switchable = true; - public String getRoleId() { - return roleId; - } - - public void setRoleId(String roleId) { - this.roleId = roleId; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public Boolean getSwitchable() { - return switchable; - } - - public void setSwitchable(Boolean switchable) { - this.switchable = switchable; - } - - 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 getDesc() { - return desc; - } - - public void setDesc(String desc) { - this.desc = desc; - } - - public String getParentId() { - return parentId; - } - - public void setParentId(String parentId) { - this.parentId = parentId; - } } diff --git a/backend/src/main/java/io/metersphere/dto/UserRoleHelpDTO.java b/backend/src/main/java/io/metersphere/dto/UserRoleHelpDTO.java index f36e94ea96..9d86f4f38f 100644 --- a/backend/src/main/java/io/metersphere/dto/UserRoleHelpDTO.java +++ b/backend/src/main/java/io/metersphere/dto/UserRoleHelpDTO.java @@ -1,5 +1,10 @@ package io.metersphere.dto; +import lombok.Getter; +import lombok.Setter; + +@Getter +@Setter public class UserRoleHelpDTO { private String roleId; @@ -8,43 +13,4 @@ public class UserRoleHelpDTO { private String sourceName; private String parentId; - public String getParentId() { - return parentId; - } - - public void setParentId(String parentId) { - this.parentId = parentId; - } - - public String getRoleId() { - return roleId; - } - - public void setRoleId(String roleId) { - this.roleId = roleId; - } - - public String getRoleName() { - return roleName; - } - - public void setRoleName(String roleName) { - this.roleName = roleName; - } - - public String getSourceId() { - return sourceId; - } - - public void setSourceId(String sourceId) { - this.sourceId = sourceId; - } - - public String getSourceName() { - return sourceName; - } - - public void setSourceName(String sourceName) { - this.sourceName = sourceName; - } } diff --git a/backend/src/main/java/io/metersphere/dto/WorkspaceDTO.java b/backend/src/main/java/io/metersphere/dto/WorkspaceDTO.java index 49b72b78fc..e895a71b66 100644 --- a/backend/src/main/java/io/metersphere/dto/WorkspaceDTO.java +++ b/backend/src/main/java/io/metersphere/dto/WorkspaceDTO.java @@ -1,5 +1,10 @@ package io.metersphere.dto; +import lombok.Getter; +import lombok.Setter; + +@Getter +@Setter public class WorkspaceDTO { private String id; @@ -8,43 +13,4 @@ public class WorkspaceDTO { private String description; private String organizationName; - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getOrganizationId() { - return organizationId; - } - - public void setOrganizationId(String organizationId) { - this.organizationId = organizationId; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public String getOrganizationName() { - return organizationName; - } - - public void setOrganizationName(String organizationName) { - this.organizationName = organizationName; - } } diff --git a/backend/src/main/java/io/metersphere/dto/WorkspaceMemberDTO.java b/backend/src/main/java/io/metersphere/dto/WorkspaceMemberDTO.java index d21e3b196f..1cf0c6c5e3 100644 --- a/backend/src/main/java/io/metersphere/dto/WorkspaceMemberDTO.java +++ b/backend/src/main/java/io/metersphere/dto/WorkspaceMemberDTO.java @@ -1,8 +1,13 @@ package io.metersphere.dto; +import lombok.Getter; +import lombok.Setter; + import java.util.ArrayList; import java.util.List; +@Getter +@Setter public class WorkspaceMemberDTO { private String id; @@ -16,83 +21,4 @@ public class WorkspaceMemberDTO { private String workspaceId; private List roleIds = new ArrayList<>(); - 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; - } - - public String getPhone() { - return phone; - } - - public void setPhone(String phone) { - this.phone = phone; - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status; - } - - public Long getCreateTime() { - return createTime; - } - - public void setCreateTime(Long createTime) { - this.createTime = createTime; - } - - public Long getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Long updateTime) { - this.updateTime = updateTime; - } - - public String getLanguage() { - return language; - } - - public void setLanguage(String language) { - this.language = language; - } - - public String getWorkspaceId() { - return workspaceId; - } - - public void setWorkspaceId(String workspaceId) { - this.workspaceId = workspaceId; - } - - public List getRoleIds() { - return roleIds; - } - - public void setRoleIds(List roleIds) { - this.roleIds = roleIds; - } } diff --git a/backend/src/main/resources/application.properties b/backend/src/main/resources/application.properties index 2db3e8cb57..32cd3cb002 100644 --- a/backend/src/main/resources/application.properties +++ b/backend/src/main/resources/application.properties @@ -65,4 +65,4 @@ kafka.ssl.truststore-type= # jmeter jmeter.image=registry.fit2cloud.com/metersphere/jmeter-master:0.0.4 -jmeter.home=jmeter \ No newline at end of file +jmeter.home=/opt/jmeter \ No newline at end of file diff --git a/backend/src/main/resources/i18n/messages_en_US.properties b/backend/src/main/resources/i18n/messages_en_US.properties index 9ee4d6b1d3..db75d19904 100644 --- a/backend/src/main/resources/i18n/messages_en_US.properties +++ b/backend/src/main/resources/i18n/messages_en_US.properties @@ -30,5 +30,4 @@ user_email_is_null=User email cannot be null password_is_null=Password cannot be null workspace_not_exists=Workspace is not exists #api -api_load_script_error="Load script error" -api_file_not_found_error="File not found" \ No newline at end of file +api_load_script_error="Load script error" \ 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 a514441820..29bde1069c 100644 --- a/backend/src/main/resources/i18n/messages_zh_CN.properties +++ b/backend/src/main/resources/i18n/messages_zh_CN.properties @@ -30,5 +30,4 @@ user_email_is_null=用户邮箱不能为空 password_is_null=密码不能为空 workspace_not_exists=工作空间不存在 #api -api_load_script_error="读取脚本失败" -api_file_not_found_error="文件未找到" \ No newline at end of file +api_load_script_error="读取脚本失败" \ No newline at end of file diff --git a/frontend/src/business/components/common/head/HeaderUser.vue b/frontend/src/business/components/common/head/HeaderUser.vue index 510cf349c7..685bfb86fb 100644 --- a/frontend/src/business/components/common/head/HeaderUser.vue +++ b/frontend/src/business/components/common/head/HeaderUser.vue @@ -85,7 +85,7 @@ handleCommand(command) { switch (command) { case "personal": - this.$setLang("en-US"); + this.$setLang("en_US"); break; case "logout": this.$get("/signout", function () { diff --git a/frontend/src/i18n/en-US.js b/frontend/src/i18n/en-US.js index 9ea2a7f6e9..81307a209b 100644 --- a/frontend/src/i18n/en-US.js +++ b/frontend/src/i18n/en-US.js @@ -197,24 +197,24 @@ export default { running: "Running", reset: "Rest", input_name: "Please enter the test name", - select_project: "Please select project", + select_project: "Select project", scenario: { config: "Scenario Config", input_name: "Please enter the scenario name", name: "Scenario Name", base_url: "Base URL", base_url_description: "Base URL as URL prefix for all requests", - parameters: "arguments", + parameters: "Parameters", headers: "Headers", kv_description: "Will be used for requests where the item is not set", }, request: { input_name: "Please enter the request name", - name: "Request Name", + name: "Name", method: "Method", - url: "url", + url: "URL", url_description: "etc: https://fit2cloud.com", - parameters: "arguments", + parameters: "Parameters", parameters_desc: "Parameters will be appended to the URL e.g. https://fit2cloud.com?Name=Value&Name2=Value2", headers: "Headers", body: "Body", @@ -238,6 +238,7 @@ export default { response_in_time: "Response in time", }, extract: "Extract from response", + extract_desc: "Extract data from the response and store it in variables. Use the variables in subsequent requests.", } }, api_report: { diff --git a/frontend/src/i18n/i18n.js b/frontend/src/i18n/i18n.js index a20d001557..bf0b4d74bf 100644 --- a/frontend/src/i18n/i18n.js +++ b/frontend/src/i18n/i18n.js @@ -13,8 +13,8 @@ const messages = { ...enLocale }, 'zh_CN': { - ...zh_CN, - ...zh_CNLocale + ...zh_CNLocale, + ...zh_CN }, 'zh_TW': { ...zh_TWLocale @@ -38,7 +38,8 @@ function setI18nLanguage(lang) { Vue.prototype.$setLang = function (lang) { if (i18n.locale !== lang) { if (!loadedLanguages.includes(lang)) { - return import(`./${lang}`).then(response => { + let file = lang.replace("_", "-"); + return import(`./${file}`).then(response => { i18n.mergeLocaleMessage(lang, response.default); loadedLanguages.push(lang); return setI18nLanguage(lang) diff --git a/frontend/src/i18n/zh-CN.js b/frontend/src/i18n/zh-CN.js index 1958a22d72..72d8a0fe6c 100644 --- a/frontend/src/i18n/zh-CN.js +++ b/frontend/src/i18n/zh-CN.js @@ -241,6 +241,7 @@ export default { response_in_time: "响应时间在...毫秒以内", }, extract: "提取", + extract_desc: "从响应中提取数据并将其存储在变量中。在后续请求中使用变量", } }, api_report: {