mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-02 20:19:16 +08:00
fix: 解决冲突
This commit is contained in:
commit
9ecb428004
@ -3,12 +3,12 @@ package io.metersphere.api.controller;
|
|||||||
import com.github.pagehelper.Page;
|
import com.github.pagehelper.Page;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import io.metersphere.api.dto.*;
|
import io.metersphere.api.dto.*;
|
||||||
import io.metersphere.api.dto.dataCount.ApiDataCountResult;
|
import io.metersphere.api.dto.datacount.ApiDataCountResult;
|
||||||
import io.metersphere.api.dto.dataCount.ExecutedCaseInfoResult;
|
import io.metersphere.api.dto.datacount.ExecutedCaseInfoResult;
|
||||||
import io.metersphere.api.dto.dataCount.request.ScheduleInfoRequest;
|
import io.metersphere.api.dto.datacount.request.ScheduleInfoRequest;
|
||||||
import io.metersphere.api.dto.dataCount.response.ApiDataCountDTO;
|
import io.metersphere.api.dto.datacount.response.ApiDataCountDTO;
|
||||||
import io.metersphere.api.dto.dataCount.response.ExecutedCaseInfoDTO;
|
import io.metersphere.api.dto.datacount.response.ExecutedCaseInfoDTO;
|
||||||
import io.metersphere.api.dto.dataCount.response.TaskInfoResult;
|
import io.metersphere.api.dto.datacount.response.TaskInfoResult;
|
||||||
import io.metersphere.api.dto.scenario.request.dubbo.RegistryCenter;
|
import io.metersphere.api.dto.scenario.request.dubbo.RegistryCenter;
|
||||||
import io.metersphere.api.service.*;
|
import io.metersphere.api.service.*;
|
||||||
import io.metersphere.base.domain.ApiTest;
|
import io.metersphere.base.domain.ApiTest;
|
||||||
|
@ -1,56 +0,0 @@
|
|||||||
package io.metersphere.api.controller;
|
|
||||||
|
|
||||||
import com.github.pagehelper.Page;
|
|
||||||
import com.github.pagehelper.PageHelper;
|
|
||||||
import io.metersphere.api.dto.automation.ApiTagRequest;
|
|
||||||
import io.metersphere.api.dto.automation.SaveApiTagRequest;
|
|
||||||
import io.metersphere.api.service.ApiTagService;
|
|
||||||
import io.metersphere.base.domain.ApiTag;
|
|
||||||
import io.metersphere.commons.constants.RoleConstants;
|
|
||||||
import io.metersphere.commons.utils.PageUtils;
|
|
||||||
import io.metersphere.commons.utils.Pager;
|
|
||||||
import io.metersphere.commons.utils.SessionUtils;
|
|
||||||
import org.apache.shiro.authz.annotation.Logical;
|
|
||||||
import org.apache.shiro.authz.annotation.RequiresRoles;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@RestController
|
|
||||||
@RequestMapping(value = "/api/tag")
|
|
||||||
@RequiresRoles(value = {RoleConstants.TEST_MANAGER, RoleConstants.TEST_USER}, logical = Logical.OR)
|
|
||||||
public class ApiTagController {
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
ApiTagService apiTagService;
|
|
||||||
|
|
||||||
@PostMapping("/list")
|
|
||||||
public List<ApiTag> list(@RequestBody ApiTagRequest request) {
|
|
||||||
return apiTagService.list(request);
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("/getTgas/{goPage}/{pageSize}")
|
|
||||||
public Pager<List<ApiTag>> getTgas(@PathVariable int goPage, @PathVariable int pageSize, @RequestBody ApiTagRequest request) {
|
|
||||||
Page<Object> page = PageHelper.startPage(goPage, pageSize, true);
|
|
||||||
request.setWorkspaceId(SessionUtils.getCurrentWorkspaceId());
|
|
||||||
return PageUtils.setPageInfo(page, apiTagService.getTgas(request));
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping(value = "/create")
|
|
||||||
public void create(@RequestBody SaveApiTagRequest request) {
|
|
||||||
apiTagService.create(request);
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping(value = "/update")
|
|
||||||
public void update(@RequestBody SaveApiTagRequest request) {
|
|
||||||
apiTagService.update(request);
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("/delete/{id}")
|
|
||||||
public void delete(@PathVariable String id) {
|
|
||||||
apiTagService.delete(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -13,7 +13,7 @@ public class SaveApiScenarioRequest {
|
|||||||
|
|
||||||
private String projectId;
|
private String projectId;
|
||||||
|
|
||||||
private String tagId;
|
private String tags;
|
||||||
|
|
||||||
private String userId;
|
private String userId;
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package io.metersphere.api.dto.dataCount;
|
package io.metersphere.api.dto.datacount;
|
||||||
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
@ -1,4 +1,4 @@
|
|||||||
package io.metersphere.api.dto.dataCount;
|
package io.metersphere.api.dto.datacount;
|
||||||
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
@ -1,4 +1,4 @@
|
|||||||
package io.metersphere.api.dto.dataCount.request;
|
package io.metersphere.api.dto.datacount.request;
|
||||||
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
@ -1,14 +1,11 @@
|
|||||||
package io.metersphere.api.dto.dataCount.response;
|
package io.metersphere.api.dto.datacount.response;
|
||||||
|
|
||||||
import io.metersphere.api.dto.dataCount.ApiDataCountResult;
|
import io.metersphere.api.dto.datacount.ApiDataCountResult;
|
||||||
import io.metersphere.api.dto.scenario.request.RequestType;
|
import io.metersphere.api.dto.scenario.request.RequestType;
|
||||||
import io.metersphere.base.domain.ApiDefinition;
|
|
||||||
import io.metersphere.commons.constants.APITestStatus;
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Locale;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 接口数据统计返回
|
* 接口数据统计返回
|
||||||
@ -118,7 +115,7 @@ public class ApiDataCountDTO {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 对Protocal视角对查询结果进行统计
|
* 对Protocal视角对查询结果进行统计
|
||||||
* @param countResultList
|
* @param countResultList 查询参数
|
||||||
*/
|
*/
|
||||||
public void countProtocal(List<ApiDataCountResult> countResultList){
|
public void countProtocal(List<ApiDataCountResult> countResultList){
|
||||||
for (ApiDataCountResult countResult :
|
for (ApiDataCountResult countResult :
|
||||||
@ -146,16 +143,17 @@ public class ApiDataCountDTO {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 对Status视角对查询结果进行统计
|
* 对Status视角对查询结果进行统计
|
||||||
* @param countResultList
|
* @param countResultList 查询参数
|
||||||
*/
|
*/
|
||||||
public void countStatus(List<ApiDataCountResult> countResultList){
|
public void countStatus(List<ApiDataCountResult> countResultList){
|
||||||
for (ApiDataCountResult countResult :
|
for (ApiDataCountResult countResult :
|
||||||
countResultList) {
|
countResultList) {
|
||||||
if("Underway".equals(countResult.getGroupField())){
|
if("Underway".equals(countResult.getGroupField())){
|
||||||
|
//未开始
|
||||||
this.runningCount+= countResult.getCountNumber();
|
this.runningCount+= countResult.getCountNumber();
|
||||||
}else if("Completed".equals(countResult.getGroupField())){
|
}else if("Completed".equals(countResult.getGroupField())){
|
||||||
this.finishedCount+= countResult.getCountNumber();
|
this.finishedCount+= countResult.getCountNumber();
|
||||||
}else if("Trash".equals(countResult.getGroupField())){
|
}else if("Prepare".equals(countResult.getGroupField())){
|
||||||
this.notStartedCount+= countResult.getCountNumber();
|
this.notStartedCount+= countResult.getCountNumber();
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,4 +1,4 @@
|
|||||||
package io.metersphere.api.dto.dataCount.response;
|
package io.metersphere.api.dto.datacount.response;
|
||||||
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
@ -1,8 +1,7 @@
|
|||||||
package io.metersphere.api.dto.dataCount.response;
|
package io.metersphere.api.dto.datacount.response;
|
||||||
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import org.python.antlr.ast.Str;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 任务信息 返回DTO
|
* 任务信息 返回DTO
|
@ -6,7 +6,7 @@ import com.alibaba.fastjson.JSONObject;
|
|||||||
import io.metersphere.api.dto.APIReportResult;
|
import io.metersphere.api.dto.APIReportResult;
|
||||||
import io.metersphere.api.dto.DeleteAPIReportRequest;
|
import io.metersphere.api.dto.DeleteAPIReportRequest;
|
||||||
import io.metersphere.api.dto.QueryAPIReportRequest;
|
import io.metersphere.api.dto.QueryAPIReportRequest;
|
||||||
import io.metersphere.api.dto.dataCount.ApiDataCountResult;
|
import io.metersphere.api.dto.datacount.ApiDataCountResult;
|
||||||
import io.metersphere.api.jmeter.TestResult;
|
import io.metersphere.api.jmeter.TestResult;
|
||||||
import io.metersphere.base.domain.*;
|
import io.metersphere.base.domain.*;
|
||||||
import io.metersphere.base.mapper.ApiDataViewMapper;
|
import io.metersphere.base.mapper.ApiDataViewMapper;
|
||||||
|
@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSONObject;
|
|||||||
import com.alibaba.nacos.client.utils.StringUtils;
|
import com.alibaba.nacos.client.utils.StringUtils;
|
||||||
import io.github.ningyu.jmeter.plugin.dubbo.sample.ProviderService;
|
import io.github.ningyu.jmeter.plugin.dubbo.sample.ProviderService;
|
||||||
import io.metersphere.api.dto.*;
|
import io.metersphere.api.dto.*;
|
||||||
import io.metersphere.api.dto.dataCount.ApiDataCountResult;
|
|
||||||
import io.metersphere.api.dto.parse.ApiImport;
|
import io.metersphere.api.dto.parse.ApiImport;
|
||||||
import io.metersphere.api.dto.scenario.request.dubbo.RegistryCenter;
|
import io.metersphere.api.dto.scenario.request.dubbo.RegistryCenter;
|
||||||
import io.metersphere.api.jmeter.JMeterService;
|
import io.metersphere.api.jmeter.JMeterService;
|
||||||
|
@ -5,9 +5,8 @@ import com.alibaba.fastjson.JSONObject;
|
|||||||
import com.fasterxml.jackson.core.type.TypeReference;
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
import com.fasterxml.jackson.databind.DeserializationFeature;
|
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.google.gson.Gson;
|
|
||||||
import io.metersphere.api.dto.automation.*;
|
import io.metersphere.api.dto.automation.*;
|
||||||
import io.metersphere.api.dto.dataCount.ApiDataCountResult;
|
import io.metersphere.api.dto.datacount.ApiDataCountResult;
|
||||||
import io.metersphere.api.dto.definition.RunDefinitionRequest;
|
import io.metersphere.api.dto.definition.RunDefinitionRequest;
|
||||||
import io.metersphere.api.dto.definition.request.*;
|
import io.metersphere.api.dto.definition.request.*;
|
||||||
import io.metersphere.api.dto.scenario.KeyValue;
|
import io.metersphere.api.dto.scenario.KeyValue;
|
||||||
@ -15,7 +14,6 @@ import io.metersphere.api.dto.scenario.environment.EnvironmentConfig;
|
|||||||
import io.metersphere.api.jmeter.JMeterService;
|
import io.metersphere.api.jmeter.JMeterService;
|
||||||
import io.metersphere.base.domain.*;
|
import io.metersphere.base.domain.*;
|
||||||
import io.metersphere.base.mapper.ApiScenarioMapper;
|
import io.metersphere.base.mapper.ApiScenarioMapper;
|
||||||
import io.metersphere.base.mapper.ApiTagMapper;
|
|
||||||
import io.metersphere.base.mapper.ext.ExtApiScenarioMapper;
|
import io.metersphere.base.mapper.ext.ExtApiScenarioMapper;
|
||||||
import io.metersphere.base.mapper.ext.ExtTestPlanMapper;
|
import io.metersphere.base.mapper.ext.ExtTestPlanMapper;
|
||||||
import io.metersphere.base.mapper.ext.ExtTestPlanScenarioCaseMapper;
|
import io.metersphere.base.mapper.ext.ExtTestPlanScenarioCaseMapper;
|
||||||
@ -56,8 +54,6 @@ public class ApiAutomationService {
|
|||||||
@Resource
|
@Resource
|
||||||
private ExtApiScenarioMapper extApiScenarioMapper;
|
private ExtApiScenarioMapper extApiScenarioMapper;
|
||||||
@Resource
|
@Resource
|
||||||
private ApiTagMapper apiTagMapper;
|
|
||||||
@Resource
|
|
||||||
private JMeterService jMeterService;
|
private JMeterService jMeterService;
|
||||||
@Resource
|
@Resource
|
||||||
private ApiTestEnvironmentService environmentService;
|
private ApiTestEnvironmentService environmentService;
|
||||||
@ -71,33 +67,9 @@ public class ApiAutomationService {
|
|||||||
public List<ApiScenarioDTO> list(ApiScenarioRequest request) {
|
public List<ApiScenarioDTO> list(ApiScenarioRequest request) {
|
||||||
request.setOrders(ServiceUtils.getDefaultOrder(request.getOrders()));
|
request.setOrders(ServiceUtils.getDefaultOrder(request.getOrders()));
|
||||||
List<ApiScenarioDTO> list = extApiScenarioMapper.list(request);
|
List<ApiScenarioDTO> list = extApiScenarioMapper.list(request);
|
||||||
// buildScenarioInfo(request.getProjectId(), list); todo tag?
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void buildScenarioInfo(String projectId, List<ApiScenarioDTO> list) {
|
|
||||||
ApiTagExample example = new ApiTagExample();
|
|
||||||
example.createCriteria().andProjectIdEqualTo(projectId);
|
|
||||||
List<ApiTag> tags = apiTagMapper.selectByExample(example);
|
|
||||||
Map<String, String> tagMap = tags.stream().collect(Collectors.toMap(ApiTag::getId, ApiTag::getName));
|
|
||||||
Gson gs = new Gson();
|
|
||||||
list.forEach(item -> {
|
|
||||||
if (item.getTagId() != null) {
|
|
||||||
StringBuilder buf = new StringBuilder();
|
|
||||||
gs.fromJson(item.getTagId(), List.class).forEach(t -> {
|
|
||||||
buf.append(tagMap.get(t));
|
|
||||||
buf.append(",");
|
|
||||||
});
|
|
||||||
if (buf != null && buf.length() > 0) {
|
|
||||||
String tagNames = buf.toString().substring(0, buf.toString().length() - 1);
|
|
||||||
List<String> tagList = Arrays.asList(tagNames.split(","));
|
|
||||||
item.setTagNames(tagList);
|
|
||||||
} else {
|
|
||||||
item.setTagNames(new ArrayList<>());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<String> selectIdsNotExistsInPlan(String projectId, String planId) {
|
public List<String> selectIdsNotExistsInPlan(String projectId, String planId) {
|
||||||
return extApiScenarioMapper.selectIdsNotExistsInPlan(projectId, planId);
|
return extApiScenarioMapper.selectIdsNotExistsInPlan(projectId, planId);
|
||||||
@ -117,7 +89,7 @@ public class ApiAutomationService {
|
|||||||
scenario.setId(request.getId());
|
scenario.setId(request.getId());
|
||||||
scenario.setName(request.getName());
|
scenario.setName(request.getName());
|
||||||
scenario.setProjectId(request.getProjectId());
|
scenario.setProjectId(request.getProjectId());
|
||||||
scenario.setTagId(request.getTagId());
|
scenario.setTags(request.getTags());
|
||||||
scenario.setApiScenarioModuleId(request.getApiScenarioModuleId());
|
scenario.setApiScenarioModuleId(request.getApiScenarioModuleId());
|
||||||
scenario.setModulePath(request.getModulePath());
|
scenario.setModulePath(request.getModulePath());
|
||||||
scenario.setLevel(request.getLevel());
|
scenario.setLevel(request.getLevel());
|
||||||
@ -154,7 +126,7 @@ public class ApiAutomationService {
|
|||||||
scenario.setId(request.getId());
|
scenario.setId(request.getId());
|
||||||
scenario.setName(request.getName());
|
scenario.setName(request.getName());
|
||||||
scenario.setProjectId(request.getProjectId());
|
scenario.setProjectId(request.getProjectId());
|
||||||
scenario.setTagId(request.getTagId());
|
scenario.setTags(request.getTags());
|
||||||
scenario.setApiScenarioModuleId(request.getApiScenarioModuleId());
|
scenario.setApiScenarioModuleId(request.getApiScenarioModuleId());
|
||||||
scenario.setModulePath(request.getModulePath());
|
scenario.setModulePath(request.getModulePath());
|
||||||
scenario.setLevel(request.getLevel());
|
scenario.setLevel(request.getLevel());
|
||||||
@ -215,19 +187,6 @@ public class ApiAutomationService {
|
|||||||
return new ArrayList<>();
|
return new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void deleteTag(String id) {
|
|
||||||
List<ApiScenarioWithBLOBs> list = extApiScenarioMapper.selectByTagId(id);
|
|
||||||
if (!list.isEmpty()) {
|
|
||||||
Gson gs = new Gson();
|
|
||||||
list.forEach(item -> {
|
|
||||||
List<String> tagIds = gs.fromJson(item.getTagId(), List.class);
|
|
||||||
tagIds.remove(id);
|
|
||||||
item.setTagId(JSON.toJSONString(tagIds));
|
|
||||||
apiScenarioMapper.updateByPrimaryKeySelective(item);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void createAPIScenarioReportResult(String id, String triggerMode, String execType, String projectId) {
|
private void createAPIScenarioReportResult(String id, String triggerMode, String execType, String projectId) {
|
||||||
APIScenarioReportResult report = new APIScenarioReportResult();
|
APIScenarioReportResult report = new APIScenarioReportResult();
|
||||||
report.setId(id);
|
report.setId(id);
|
||||||
@ -317,6 +276,7 @@ public class ApiAutomationService {
|
|||||||
ParameterConfig config = new ParameterConfig();
|
ParameterConfig config = new ParameterConfig();
|
||||||
config.setConfig(envConfig);
|
config.setConfig(envConfig);
|
||||||
HashTree hashTree = request.getTestElement().generateHashTree(config);
|
HashTree hashTree = request.getTestElement().generateHashTree(config);
|
||||||
|
request.getTestElement().getJmx(hashTree);
|
||||||
// 调用执行方法
|
// 调用执行方法
|
||||||
jMeterService.runDefinition(request.getId(), hashTree, request.getReportId(), ApiRunMode.SCENARIO.name());
|
jMeterService.runDefinition(request.getId(), hashTree, request.getReportId(), ApiRunMode.SCENARIO.name());
|
||||||
createAPIScenarioReportResult(request.getId(), ReportTriggerMode.MANUAL.name(), request.getExecuteType(), request.getProjectId());
|
createAPIScenarioReportResult(request.getId(), ReportTriggerMode.MANUAL.name(), request.getExecuteType(), request.getProjectId());
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package io.metersphere.api.service;
|
package io.metersphere.api.service;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import io.metersphere.api.dto.dataCount.ExecutedCaseInfoResult;
|
import io.metersphere.api.dto.datacount.ExecutedCaseInfoResult;
|
||||||
import io.metersphere.api.jmeter.TestResult;
|
import io.metersphere.api.jmeter.TestResult;
|
||||||
import io.metersphere.base.domain.ApiDefinitionExecResult;
|
import io.metersphere.base.domain.ApiDefinitionExecResult;
|
||||||
import io.metersphere.base.domain.ApiDefinitionExecResultExample;
|
import io.metersphere.base.domain.ApiDefinitionExecResultExample;
|
||||||
|
@ -6,7 +6,7 @@ import io.metersphere.api.dto.APIReportResult;
|
|||||||
import io.metersphere.api.dto.ApiTestImportRequest;
|
import io.metersphere.api.dto.ApiTestImportRequest;
|
||||||
import io.metersphere.api.dto.automation.ApiScenarioRequest;
|
import io.metersphere.api.dto.automation.ApiScenarioRequest;
|
||||||
import io.metersphere.api.dto.automation.ReferenceDTO;
|
import io.metersphere.api.dto.automation.ReferenceDTO;
|
||||||
import io.metersphere.api.dto.dataCount.ApiDataCountResult;
|
import io.metersphere.api.dto.datacount.ApiDataCountResult;
|
||||||
import io.metersphere.api.dto.definition.*;
|
import io.metersphere.api.dto.definition.*;
|
||||||
import io.metersphere.api.dto.definition.parse.ApiDefinitionImport;
|
import io.metersphere.api.dto.definition.parse.ApiDefinitionImport;
|
||||||
import io.metersphere.api.dto.scenario.request.RequestType;
|
import io.metersphere.api.dto.scenario.request.RequestType;
|
||||||
|
@ -1,77 +0,0 @@
|
|||||||
package io.metersphere.api.service;
|
|
||||||
|
|
||||||
import io.metersphere.api.dto.automation.ApiTagRequest;
|
|
||||||
import io.metersphere.api.dto.automation.SaveApiTagRequest;
|
|
||||||
import io.metersphere.base.domain.ApiTag;
|
|
||||||
import io.metersphere.base.domain.ApiTagExample;
|
|
||||||
import io.metersphere.base.mapper.ApiTagMapper;
|
|
||||||
import io.metersphere.base.mapper.ext.ExtApiTagMapper;
|
|
||||||
import io.metersphere.commons.exception.MSException;
|
|
||||||
import io.metersphere.commons.utils.SessionUtils;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Service
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
|
||||||
public class ApiTagService {
|
|
||||||
@Resource
|
|
||||||
private ApiTagMapper apiTagMapper;
|
|
||||||
@Resource
|
|
||||||
private ExtApiTagMapper extApiTagMapper;
|
|
||||||
@Resource
|
|
||||||
private ApiAutomationService apiAutomationService;
|
|
||||||
|
|
||||||
public List<ApiTag> list(ApiTagRequest request) {
|
|
||||||
ApiTagExample example = new ApiTagExample();
|
|
||||||
example.createCriteria().andProjectIdEqualTo(request.getProjectId());
|
|
||||||
return apiTagMapper.selectByExample(example);
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<ApiTag> getTgas(ApiTagRequest request) {
|
|
||||||
return extApiTagMapper.list(request);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void create(SaveApiTagRequest request) {
|
|
||||||
checkNameExist(request);
|
|
||||||
final ApiTag apiTag = new ApiTag();
|
|
||||||
apiTag.setId(request.getId());
|
|
||||||
apiTag.setName(request.getName());
|
|
||||||
apiTag.setProjectId(request.getProjectId());
|
|
||||||
apiTag.setCreateTime(System.currentTimeMillis());
|
|
||||||
apiTag.setUpdateTime(System.currentTimeMillis());
|
|
||||||
if (request.getUserId() == null) {
|
|
||||||
apiTag.setUserId(SessionUtils.getUserId());
|
|
||||||
} else {
|
|
||||||
apiTag.setUserId(request.getUserId());
|
|
||||||
}
|
|
||||||
apiTagMapper.insert(apiTag);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void update(SaveApiTagRequest request) {
|
|
||||||
checkNameExist(request);
|
|
||||||
final ApiTag apiTag = new ApiTag();
|
|
||||||
apiTag.setId(request.getId());
|
|
||||||
apiTag.setName(request.getName());
|
|
||||||
apiTag.setProjectId(request.getProjectId());
|
|
||||||
apiTag.setUpdateTime(System.currentTimeMillis());
|
|
||||||
apiTag.setUserId(request.getUserId());
|
|
||||||
apiTagMapper.updateByPrimaryKeySelective(apiTag);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void delete(String id) {
|
|
||||||
apiTagMapper.deleteByPrimaryKey(id);
|
|
||||||
apiAutomationService.deleteTag(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void checkNameExist(SaveApiTagRequest request) {
|
|
||||||
ApiTagExample example = new ApiTagExample();
|
|
||||||
example.createCriteria().andNameEqualTo(request.getName()).andProjectIdEqualTo(request.getProjectId())
|
|
||||||
.andIdNotEqualTo(request.getId());
|
|
||||||
if (apiTagMapper.countByExample(example) > 0) {
|
|
||||||
MSException.throwException("名称不能重复");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,15 +1,12 @@
|
|||||||
package io.metersphere.api.service;
|
package io.metersphere.api.service;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import io.metersphere.api.dto.dataCount.ApiDataCountResult;
|
import io.metersphere.api.dto.datacount.ApiDataCountResult;
|
||||||
import io.metersphere.api.dto.definition.ApiTestCaseRequest;
|
import io.metersphere.api.dto.definition.ApiTestCaseRequest;
|
||||||
import io.metersphere.api.dto.definition.ApiTestCaseResult;
|
import io.metersphere.api.dto.definition.ApiTestCaseResult;
|
||||||
import io.metersphere.api.dto.definition.SaveApiTestCaseRequest;
|
import io.metersphere.api.dto.definition.SaveApiTestCaseRequest;
|
||||||
import io.metersphere.api.dto.ApiCaseBatchRequest;
|
import io.metersphere.api.dto.ApiCaseBatchRequest;
|
||||||
import io.metersphere.api.dto.definition.ApiTestCaseDTO;
|
import io.metersphere.api.dto.definition.ApiTestCaseDTO;
|
||||||
import io.metersphere.api.dto.definition.ApiTestCaseRequest;
|
|
||||||
import io.metersphere.api.dto.definition.ApiTestCaseResult;
|
|
||||||
import io.metersphere.api.dto.definition.SaveApiTestCaseRequest;
|
|
||||||
import io.metersphere.base.domain.*;
|
import io.metersphere.base.domain.*;
|
||||||
import io.metersphere.base.mapper.ApiTestCaseMapper;
|
import io.metersphere.base.mapper.ApiTestCaseMapper;
|
||||||
import io.metersphere.base.mapper.ApiTestFileMapper;
|
import io.metersphere.base.mapper.ApiTestFileMapper;
|
||||||
|
@ -9,7 +9,7 @@ public class ApiScenario implements Serializable {
|
|||||||
|
|
||||||
private String projectId;
|
private String projectId;
|
||||||
|
|
||||||
private String tagId;
|
private String tags;
|
||||||
|
|
||||||
private String userId;
|
private String userId;
|
||||||
|
|
||||||
|
@ -244,73 +244,73 @@ public class ApiScenarioExample {
|
|||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andTagIdIsNull() {
|
public Criteria andTagsIsNull() {
|
||||||
addCriterion("tag_id is null");
|
addCriterion("tags is null");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andTagIdIsNotNull() {
|
public Criteria andTagsIsNotNull() {
|
||||||
addCriterion("tag_id is not null");
|
addCriterion("tags is not null");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andTagIdEqualTo(String value) {
|
public Criteria andTagsEqualTo(String value) {
|
||||||
addCriterion("tag_id =", value, "tagId");
|
addCriterion("tags =", value, "tags");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andTagIdNotEqualTo(String value) {
|
public Criteria andTagsNotEqualTo(String value) {
|
||||||
addCriterion("tag_id <>", value, "tagId");
|
addCriterion("tags <>", value, "tags");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andTagIdGreaterThan(String value) {
|
public Criteria andTagsGreaterThan(String value) {
|
||||||
addCriterion("tag_id >", value, "tagId");
|
addCriterion("tags >", value, "tags");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andTagIdGreaterThanOrEqualTo(String value) {
|
public Criteria andTagsGreaterThanOrEqualTo(String value) {
|
||||||
addCriterion("tag_id >=", value, "tagId");
|
addCriterion("tags >=", value, "tags");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andTagIdLessThan(String value) {
|
public Criteria andTagsLessThan(String value) {
|
||||||
addCriterion("tag_id <", value, "tagId");
|
addCriterion("tags <", value, "tags");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andTagIdLessThanOrEqualTo(String value) {
|
public Criteria andTagsLessThanOrEqualTo(String value) {
|
||||||
addCriterion("tag_id <=", value, "tagId");
|
addCriterion("tags <=", value, "tags");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andTagIdLike(String value) {
|
public Criteria andTagsLike(String value) {
|
||||||
addCriterion("tag_id like", value, "tagId");
|
addCriterion("tags like", value, "tags");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andTagIdNotLike(String value) {
|
public Criteria andTagsNotLike(String value) {
|
||||||
addCriterion("tag_id not like", value, "tagId");
|
addCriterion("tags not like", value, "tags");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andTagIdIn(List<String> values) {
|
public Criteria andTagsIn(List<String> values) {
|
||||||
addCriterion("tag_id in", values, "tagId");
|
addCriterion("tags in", values, "tags");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andTagIdNotIn(List<String> values) {
|
public Criteria andTagsNotIn(List<String> values) {
|
||||||
addCriterion("tag_id not in", values, "tagId");
|
addCriterion("tags not in", values, "tags");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andTagIdBetween(String value1, String value2) {
|
public Criteria andTagsBetween(String value1, String value2) {
|
||||||
addCriterion("tag_id between", value1, value2, "tagId");
|
addCriterion("tags between", value1, value2, "tags");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andTagIdNotBetween(String value1, String value2) {
|
public Criteria andTagsNotBetween(String value1, String value2) {
|
||||||
addCriterion("tag_id not between", value1, value2, "tagId");
|
addCriterion("tags not between", value1, value2, "tags");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,21 +0,0 @@
|
|||||||
package io.metersphere.base.domain;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class ApiTag implements Serializable {
|
|
||||||
private String id;
|
|
||||||
|
|
||||||
private String projectId;
|
|
||||||
|
|
||||||
private String name;
|
|
||||||
|
|
||||||
private String userId;
|
|
||||||
|
|
||||||
private Long createTime;
|
|
||||||
|
|
||||||
private Long updateTime;
|
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
}
|
|
@ -1,600 +0,0 @@
|
|||||||
package io.metersphere.base.domain;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class ApiTagExample {
|
|
||||||
protected String orderByClause;
|
|
||||||
|
|
||||||
protected boolean distinct;
|
|
||||||
|
|
||||||
protected List<Criteria> oredCriteria;
|
|
||||||
|
|
||||||
public ApiTagExample() {
|
|
||||||
oredCriteria = new ArrayList<Criteria>();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOrderByClause(String orderByClause) {
|
|
||||||
this.orderByClause = orderByClause;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getOrderByClause() {
|
|
||||||
return orderByClause;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDistinct(boolean distinct) {
|
|
||||||
this.distinct = distinct;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isDistinct() {
|
|
||||||
return distinct;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<Criteria> getOredCriteria() {
|
|
||||||
return oredCriteria;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void or(Criteria criteria) {
|
|
||||||
oredCriteria.add(criteria);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria or() {
|
|
||||||
Criteria criteria = createCriteriaInternal();
|
|
||||||
oredCriteria.add(criteria);
|
|
||||||
return criteria;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria createCriteria() {
|
|
||||||
Criteria criteria = createCriteriaInternal();
|
|
||||||
if (oredCriteria.size() == 0) {
|
|
||||||
oredCriteria.add(criteria);
|
|
||||||
}
|
|
||||||
return criteria;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected Criteria createCriteriaInternal() {
|
|
||||||
Criteria criteria = new Criteria();
|
|
||||||
return criteria;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void clear() {
|
|
||||||
oredCriteria.clear();
|
|
||||||
orderByClause = null;
|
|
||||||
distinct = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected abstract static class GeneratedCriteria {
|
|
||||||
protected List<Criterion> criteria;
|
|
||||||
|
|
||||||
protected GeneratedCriteria() {
|
|
||||||
super();
|
|
||||||
criteria = new ArrayList<Criterion>();
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isValid() {
|
|
||||||
return criteria.size() > 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<Criterion> getAllCriteria() {
|
|
||||||
return criteria;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<Criterion> getCriteria() {
|
|
||||||
return criteria;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void addCriterion(String condition) {
|
|
||||||
if (condition == null) {
|
|
||||||
throw new RuntimeException("Value for condition cannot be null");
|
|
||||||
}
|
|
||||||
criteria.add(new Criterion(condition));
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void addCriterion(String condition, Object value, String property) {
|
|
||||||
if (value == null) {
|
|
||||||
throw new RuntimeException("Value for " + property + " cannot be null");
|
|
||||||
}
|
|
||||||
criteria.add(new Criterion(condition, value));
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void addCriterion(String condition, Object value1, Object value2, String property) {
|
|
||||||
if (value1 == null || value2 == null) {
|
|
||||||
throw new RuntimeException("Between values for " + property + " cannot be null");
|
|
||||||
}
|
|
||||||
criteria.add(new Criterion(condition, value1, value2));
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andIdIsNull() {
|
|
||||||
addCriterion("id is null");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andIdIsNotNull() {
|
|
||||||
addCriterion("id is not null");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andIdEqualTo(String value) {
|
|
||||||
addCriterion("id =", value, "id");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andIdNotEqualTo(String value) {
|
|
||||||
addCriterion("id <>", value, "id");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andIdGreaterThan(String value) {
|
|
||||||
addCriterion("id >", value, "id");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andIdGreaterThanOrEqualTo(String value) {
|
|
||||||
addCriterion("id >=", value, "id");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andIdLessThan(String value) {
|
|
||||||
addCriterion("id <", value, "id");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andIdLessThanOrEqualTo(String value) {
|
|
||||||
addCriterion("id <=", value, "id");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andIdLike(String value) {
|
|
||||||
addCriterion("id like", value, "id");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andIdNotLike(String value) {
|
|
||||||
addCriterion("id not like", value, "id");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andIdIn(List<String> values) {
|
|
||||||
addCriterion("id in", values, "id");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andIdNotIn(List<String> values) {
|
|
||||||
addCriterion("id not in", values, "id");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andIdBetween(String value1, String value2) {
|
|
||||||
addCriterion("id between", value1, value2, "id");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andIdNotBetween(String value1, String value2) {
|
|
||||||
addCriterion("id not between", value1, value2, "id");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andProjectIdIsNull() {
|
|
||||||
addCriterion("project_id is null");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andProjectIdIsNotNull() {
|
|
||||||
addCriterion("project_id is not null");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andProjectIdEqualTo(String value) {
|
|
||||||
addCriterion("project_id =", value, "projectId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andProjectIdNotEqualTo(String value) {
|
|
||||||
addCriterion("project_id <>", value, "projectId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andProjectIdGreaterThan(String value) {
|
|
||||||
addCriterion("project_id >", value, "projectId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andProjectIdGreaterThanOrEqualTo(String value) {
|
|
||||||
addCriterion("project_id >=", value, "projectId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andProjectIdLessThan(String value) {
|
|
||||||
addCriterion("project_id <", value, "projectId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andProjectIdLessThanOrEqualTo(String value) {
|
|
||||||
addCriterion("project_id <=", value, "projectId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andProjectIdLike(String value) {
|
|
||||||
addCriterion("project_id like", value, "projectId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andProjectIdNotLike(String value) {
|
|
||||||
addCriterion("project_id not like", value, "projectId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andProjectIdIn(List<String> values) {
|
|
||||||
addCriterion("project_id in", values, "projectId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andProjectIdNotIn(List<String> values) {
|
|
||||||
addCriterion("project_id not in", values, "projectId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andProjectIdBetween(String value1, String value2) {
|
|
||||||
addCriterion("project_id between", value1, value2, "projectId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andProjectIdNotBetween(String value1, String value2) {
|
|
||||||
addCriterion("project_id not between", value1, value2, "projectId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andNameIsNull() {
|
|
||||||
addCriterion("`name` is null");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andNameIsNotNull() {
|
|
||||||
addCriterion("`name` is not null");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andNameEqualTo(String value) {
|
|
||||||
addCriterion("`name` =", value, "name");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andNameNotEqualTo(String value) {
|
|
||||||
addCriterion("`name` <>", value, "name");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andNameGreaterThan(String value) {
|
|
||||||
addCriterion("`name` >", value, "name");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andNameGreaterThanOrEqualTo(String value) {
|
|
||||||
addCriterion("`name` >=", value, "name");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andNameLessThan(String value) {
|
|
||||||
addCriterion("`name` <", value, "name");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andNameLessThanOrEqualTo(String value) {
|
|
||||||
addCriterion("`name` <=", value, "name");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andNameLike(String value) {
|
|
||||||
addCriterion("`name` like", value, "name");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andNameNotLike(String value) {
|
|
||||||
addCriterion("`name` not like", value, "name");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andNameIn(List<String> values) {
|
|
||||||
addCriterion("`name` in", values, "name");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andNameNotIn(List<String> values) {
|
|
||||||
addCriterion("`name` not in", values, "name");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andNameBetween(String value1, String value2) {
|
|
||||||
addCriterion("`name` between", value1, value2, "name");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andNameNotBetween(String value1, String value2) {
|
|
||||||
addCriterion("`name` not between", value1, value2, "name");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andUserIdIsNull() {
|
|
||||||
addCriterion("user_id is null");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andUserIdIsNotNull() {
|
|
||||||
addCriterion("user_id is not null");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andUserIdEqualTo(String value) {
|
|
||||||
addCriterion("user_id =", value, "userId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andUserIdNotEqualTo(String value) {
|
|
||||||
addCriterion("user_id <>", value, "userId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andUserIdGreaterThan(String value) {
|
|
||||||
addCriterion("user_id >", value, "userId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andUserIdGreaterThanOrEqualTo(String value) {
|
|
||||||
addCriterion("user_id >=", value, "userId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andUserIdLessThan(String value) {
|
|
||||||
addCriterion("user_id <", value, "userId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andUserIdLessThanOrEqualTo(String value) {
|
|
||||||
addCriterion("user_id <=", value, "userId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andUserIdLike(String value) {
|
|
||||||
addCriterion("user_id like", value, "userId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andUserIdNotLike(String value) {
|
|
||||||
addCriterion("user_id not like", value, "userId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andUserIdIn(List<String> values) {
|
|
||||||
addCriterion("user_id in", values, "userId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andUserIdNotIn(List<String> values) {
|
|
||||||
addCriterion("user_id not in", values, "userId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andUserIdBetween(String value1, String value2) {
|
|
||||||
addCriterion("user_id between", value1, value2, "userId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andUserIdNotBetween(String value1, String value2) {
|
|
||||||
addCriterion("user_id not between", value1, value2, "userId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andCreateTimeIsNull() {
|
|
||||||
addCriterion("create_time is null");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andCreateTimeIsNotNull() {
|
|
||||||
addCriterion("create_time is not null");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andCreateTimeEqualTo(Long value) {
|
|
||||||
addCriterion("create_time =", value, "createTime");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andCreateTimeNotEqualTo(Long value) {
|
|
||||||
addCriterion("create_time <>", value, "createTime");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andCreateTimeGreaterThan(Long value) {
|
|
||||||
addCriterion("create_time >", value, "createTime");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) {
|
|
||||||
addCriterion("create_time >=", value, "createTime");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andCreateTimeLessThan(Long value) {
|
|
||||||
addCriterion("create_time <", value, "createTime");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andCreateTimeLessThanOrEqualTo(Long value) {
|
|
||||||
addCriterion("create_time <=", value, "createTime");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andCreateTimeIn(List<Long> values) {
|
|
||||||
addCriterion("create_time in", values, "createTime");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andCreateTimeNotIn(List<Long> values) {
|
|
||||||
addCriterion("create_time not in", values, "createTime");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andCreateTimeBetween(Long value1, Long value2) {
|
|
||||||
addCriterion("create_time between", value1, value2, "createTime");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andCreateTimeNotBetween(Long value1, Long value2) {
|
|
||||||
addCriterion("create_time not between", value1, value2, "createTime");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andUpdateTimeIsNull() {
|
|
||||||
addCriterion("update_time is null");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andUpdateTimeIsNotNull() {
|
|
||||||
addCriterion("update_time is not null");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andUpdateTimeEqualTo(Long value) {
|
|
||||||
addCriterion("update_time =", value, "updateTime");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andUpdateTimeNotEqualTo(Long value) {
|
|
||||||
addCriterion("update_time <>", value, "updateTime");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andUpdateTimeGreaterThan(Long value) {
|
|
||||||
addCriterion("update_time >", value, "updateTime");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andUpdateTimeGreaterThanOrEqualTo(Long value) {
|
|
||||||
addCriterion("update_time >=", value, "updateTime");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andUpdateTimeLessThan(Long value) {
|
|
||||||
addCriterion("update_time <", value, "updateTime");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andUpdateTimeLessThanOrEqualTo(Long value) {
|
|
||||||
addCriterion("update_time <=", value, "updateTime");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andUpdateTimeIn(List<Long> values) {
|
|
||||||
addCriterion("update_time in", values, "updateTime");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andUpdateTimeNotIn(List<Long> values) {
|
|
||||||
addCriterion("update_time not in", values, "updateTime");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andUpdateTimeBetween(Long value1, Long value2) {
|
|
||||||
addCriterion("update_time between", value1, value2, "updateTime");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andUpdateTimeNotBetween(Long value1, Long value2) {
|
|
||||||
addCriterion("update_time not between", value1, value2, "updateTime");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class Criteria extends GeneratedCriteria {
|
|
||||||
|
|
||||||
protected Criteria() {
|
|
||||||
super();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class Criterion {
|
|
||||||
private String condition;
|
|
||||||
|
|
||||||
private Object value;
|
|
||||||
|
|
||||||
private Object secondValue;
|
|
||||||
|
|
||||||
private boolean noValue;
|
|
||||||
|
|
||||||
private boolean singleValue;
|
|
||||||
|
|
||||||
private boolean betweenValue;
|
|
||||||
|
|
||||||
private boolean listValue;
|
|
||||||
|
|
||||||
private String typeHandler;
|
|
||||||
|
|
||||||
public String getCondition() {
|
|
||||||
return condition;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Object getValue() {
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Object getSecondValue() {
|
|
||||||
return secondValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isNoValue() {
|
|
||||||
return noValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isSingleValue() {
|
|
||||||
return singleValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isBetweenValue() {
|
|
||||||
return betweenValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isListValue() {
|
|
||||||
return listValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTypeHandler() {
|
|
||||||
return typeHandler;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected Criterion(String condition) {
|
|
||||||
super();
|
|
||||||
this.condition = condition;
|
|
||||||
this.typeHandler = null;
|
|
||||||
this.noValue = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected Criterion(String condition, Object value, String typeHandler) {
|
|
||||||
super();
|
|
||||||
this.condition = condition;
|
|
||||||
this.value = value;
|
|
||||||
this.typeHandler = typeHandler;
|
|
||||||
if (value instanceof List<?>) {
|
|
||||||
this.listValue = true;
|
|
||||||
} else {
|
|
||||||
this.singleValue = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected Criterion(String condition, Object value) {
|
|
||||||
this(condition, value, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
|
|
||||||
super();
|
|
||||||
this.condition = condition;
|
|
||||||
this.value = value;
|
|
||||||
this.secondValue = secondValue;
|
|
||||||
this.typeHandler = typeHandler;
|
|
||||||
this.betweenValue = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected Criterion(String condition, Object value, Object secondValue) {
|
|
||||||
this(condition, value, secondValue, null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -20,5 +20,7 @@ public class TestResourcePool implements Serializable {
|
|||||||
|
|
||||||
private Long updateTime;
|
private Long updateTime;
|
||||||
|
|
||||||
|
private String image;
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
}
|
}
|
@ -175,142 +175,142 @@ public class TestResourcePoolExample {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andNameIsNull() {
|
public Criteria andNameIsNull() {
|
||||||
addCriterion("name is null");
|
addCriterion("`name` is null");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andNameIsNotNull() {
|
public Criteria andNameIsNotNull() {
|
||||||
addCriterion("name is not null");
|
addCriterion("`name` is not null");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andNameEqualTo(String value) {
|
public Criteria andNameEqualTo(String value) {
|
||||||
addCriterion("name =", value, "name");
|
addCriterion("`name` =", value, "name");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andNameNotEqualTo(String value) {
|
public Criteria andNameNotEqualTo(String value) {
|
||||||
addCriterion("name <>", value, "name");
|
addCriterion("`name` <>", value, "name");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andNameGreaterThan(String value) {
|
public Criteria andNameGreaterThan(String value) {
|
||||||
addCriterion("name >", value, "name");
|
addCriterion("`name` >", value, "name");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andNameGreaterThanOrEqualTo(String value) {
|
public Criteria andNameGreaterThanOrEqualTo(String value) {
|
||||||
addCriterion("name >=", value, "name");
|
addCriterion("`name` >=", value, "name");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andNameLessThan(String value) {
|
public Criteria andNameLessThan(String value) {
|
||||||
addCriterion("name <", value, "name");
|
addCriterion("`name` <", value, "name");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andNameLessThanOrEqualTo(String value) {
|
public Criteria andNameLessThanOrEqualTo(String value) {
|
||||||
addCriterion("name <=", value, "name");
|
addCriterion("`name` <=", value, "name");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andNameLike(String value) {
|
public Criteria andNameLike(String value) {
|
||||||
addCriterion("name like", value, "name");
|
addCriterion("`name` like", value, "name");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andNameNotLike(String value) {
|
public Criteria andNameNotLike(String value) {
|
||||||
addCriterion("name not like", value, "name");
|
addCriterion("`name` not like", value, "name");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andNameIn(List<String> values) {
|
public Criteria andNameIn(List<String> values) {
|
||||||
addCriterion("name in", values, "name");
|
addCriterion("`name` in", values, "name");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andNameNotIn(List<String> values) {
|
public Criteria andNameNotIn(List<String> values) {
|
||||||
addCriterion("name not in", values, "name");
|
addCriterion("`name` not in", values, "name");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andNameBetween(String value1, String value2) {
|
public Criteria andNameBetween(String value1, String value2) {
|
||||||
addCriterion("name between", value1, value2, "name");
|
addCriterion("`name` between", value1, value2, "name");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andNameNotBetween(String value1, String value2) {
|
public Criteria andNameNotBetween(String value1, String value2) {
|
||||||
addCriterion("name not between", value1, value2, "name");
|
addCriterion("`name` not between", value1, value2, "name");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andTypeIsNull() {
|
public Criteria andTypeIsNull() {
|
||||||
addCriterion("type is null");
|
addCriterion("`type` is null");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andTypeIsNotNull() {
|
public Criteria andTypeIsNotNull() {
|
||||||
addCriterion("type is not null");
|
addCriterion("`type` is not null");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andTypeEqualTo(String value) {
|
public Criteria andTypeEqualTo(String value) {
|
||||||
addCriterion("type =", value, "type");
|
addCriterion("`type` =", value, "type");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andTypeNotEqualTo(String value) {
|
public Criteria andTypeNotEqualTo(String value) {
|
||||||
addCriterion("type <>", value, "type");
|
addCriterion("`type` <>", value, "type");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andTypeGreaterThan(String value) {
|
public Criteria andTypeGreaterThan(String value) {
|
||||||
addCriterion("type >", value, "type");
|
addCriterion("`type` >", value, "type");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andTypeGreaterThanOrEqualTo(String value) {
|
public Criteria andTypeGreaterThanOrEqualTo(String value) {
|
||||||
addCriterion("type >=", value, "type");
|
addCriterion("`type` >=", value, "type");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andTypeLessThan(String value) {
|
public Criteria andTypeLessThan(String value) {
|
||||||
addCriterion("type <", value, "type");
|
addCriterion("`type` <", value, "type");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andTypeLessThanOrEqualTo(String value) {
|
public Criteria andTypeLessThanOrEqualTo(String value) {
|
||||||
addCriterion("type <=", value, "type");
|
addCriterion("`type` <=", value, "type");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andTypeLike(String value) {
|
public Criteria andTypeLike(String value) {
|
||||||
addCriterion("type like", value, "type");
|
addCriterion("`type` like", value, "type");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andTypeNotLike(String value) {
|
public Criteria andTypeNotLike(String value) {
|
||||||
addCriterion("type not like", value, "type");
|
addCriterion("`type` not like", value, "type");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andTypeIn(List<String> values) {
|
public Criteria andTypeIn(List<String> values) {
|
||||||
addCriterion("type in", values, "type");
|
addCriterion("`type` in", values, "type");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andTypeNotIn(List<String> values) {
|
public Criteria andTypeNotIn(List<String> values) {
|
||||||
addCriterion("type not in", values, "type");
|
addCriterion("`type` not in", values, "type");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andTypeBetween(String value1, String value2) {
|
public Criteria andTypeBetween(String value1, String value2) {
|
||||||
addCriterion("type between", value1, value2, "type");
|
addCriterion("`type` between", value1, value2, "type");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andTypeNotBetween(String value1, String value2) {
|
public Criteria andTypeNotBetween(String value1, String value2) {
|
||||||
addCriterion("type not between", value1, value2, "type");
|
addCriterion("`type` not between", value1, value2, "type");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -385,72 +385,72 @@ public class TestResourcePoolExample {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andStatusIsNull() {
|
public Criteria andStatusIsNull() {
|
||||||
addCriterion("status is null");
|
addCriterion("`status` is null");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andStatusIsNotNull() {
|
public Criteria andStatusIsNotNull() {
|
||||||
addCriterion("status is not null");
|
addCriterion("`status` is not null");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andStatusEqualTo(String value) {
|
public Criteria andStatusEqualTo(String value) {
|
||||||
addCriterion("status =", value, "status");
|
addCriterion("`status` =", value, "status");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andStatusNotEqualTo(String value) {
|
public Criteria andStatusNotEqualTo(String value) {
|
||||||
addCriterion("status <>", value, "status");
|
addCriterion("`status` <>", value, "status");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andStatusGreaterThan(String value) {
|
public Criteria andStatusGreaterThan(String value) {
|
||||||
addCriterion("status >", value, "status");
|
addCriterion("`status` >", value, "status");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andStatusGreaterThanOrEqualTo(String value) {
|
public Criteria andStatusGreaterThanOrEqualTo(String value) {
|
||||||
addCriterion("status >=", value, "status");
|
addCriterion("`status` >=", value, "status");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andStatusLessThan(String value) {
|
public Criteria andStatusLessThan(String value) {
|
||||||
addCriterion("status <", value, "status");
|
addCriterion("`status` <", value, "status");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andStatusLessThanOrEqualTo(String value) {
|
public Criteria andStatusLessThanOrEqualTo(String value) {
|
||||||
addCriterion("status <=", value, "status");
|
addCriterion("`status` <=", value, "status");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andStatusLike(String value) {
|
public Criteria andStatusLike(String value) {
|
||||||
addCriterion("status like", value, "status");
|
addCriterion("`status` like", value, "status");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andStatusNotLike(String value) {
|
public Criteria andStatusNotLike(String value) {
|
||||||
addCriterion("status not like", value, "status");
|
addCriterion("`status` not like", value, "status");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andStatusIn(List<String> values) {
|
public Criteria andStatusIn(List<String> values) {
|
||||||
addCriterion("status in", values, "status");
|
addCriterion("`status` in", values, "status");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andStatusNotIn(List<String> values) {
|
public Criteria andStatusNotIn(List<String> values) {
|
||||||
addCriterion("status not in", values, "status");
|
addCriterion("`status` not in", values, "status");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andStatusBetween(String value1, String value2) {
|
public Criteria andStatusBetween(String value1, String value2) {
|
||||||
addCriterion("status between", value1, value2, "status");
|
addCriterion("`status` between", value1, value2, "status");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andStatusNotBetween(String value1, String value2) {
|
public Criteria andStatusNotBetween(String value1, String value2) {
|
||||||
addCriterion("status not between", value1, value2, "status");
|
addCriterion("`status` not between", value1, value2, "status");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -573,6 +573,76 @@ public class TestResourcePoolExample {
|
|||||||
addCriterion("update_time not between", value1, value2, "updateTime");
|
addCriterion("update_time not between", value1, value2, "updateTime");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Criteria andImageIsNull() {
|
||||||
|
addCriterion("image is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andImageIsNotNull() {
|
||||||
|
addCriterion("image is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andImageEqualTo(String value) {
|
||||||
|
addCriterion("image =", value, "image");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andImageNotEqualTo(String value) {
|
||||||
|
addCriterion("image <>", value, "image");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andImageGreaterThan(String value) {
|
||||||
|
addCriterion("image >", value, "image");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andImageGreaterThanOrEqualTo(String value) {
|
||||||
|
addCriterion("image >=", value, "image");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andImageLessThan(String value) {
|
||||||
|
addCriterion("image <", value, "image");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andImageLessThanOrEqualTo(String value) {
|
||||||
|
addCriterion("image <=", value, "image");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andImageLike(String value) {
|
||||||
|
addCriterion("image like", value, "image");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andImageNotLike(String value) {
|
||||||
|
addCriterion("image not like", value, "image");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andImageIn(List<String> values) {
|
||||||
|
addCriterion("image in", values, "image");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andImageNotIn(List<String> values) {
|
||||||
|
addCriterion("image not in", values, "image");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andImageBetween(String value1, String value2) {
|
||||||
|
addCriterion("image between", value1, value2, "image");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andImageNotBetween(String value1, String value2) {
|
||||||
|
addCriterion("image not between", value1, value2, "image");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Criteria extends GeneratedCriteria {
|
public static class Criteria extends GeneratedCriteria {
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<resultMap id="BaseResultMap" type="io.metersphere.base.domain.ApiScenario">
|
<resultMap id="BaseResultMap" type="io.metersphere.base.domain.ApiScenario">
|
||||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||||
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
|
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
|
||||||
<result column="tag_id" jdbcType="VARCHAR" property="tagId" />
|
<result column="tags" jdbcType="VARCHAR" property="tags" />
|
||||||
<result column="user_id" jdbcType="VARCHAR" property="userId" />
|
<result column="user_id" jdbcType="VARCHAR" property="userId" />
|
||||||
<result column="api_scenario_module_id" jdbcType="VARCHAR" property="apiScenarioModuleId" />
|
<result column="api_scenario_module_id" jdbcType="VARCHAR" property="apiScenarioModuleId" />
|
||||||
<result column="module_path" jdbcType="VARCHAR" property="modulePath" />
|
<result column="module_path" jdbcType="VARCHAR" property="modulePath" />
|
||||||
@ -84,7 +84,7 @@
|
|||||||
</where>
|
</where>
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id, project_id, tag_id, user_id, api_scenario_module_id, module_path, `name`, `level`,
|
id, project_id, tags, user_id, api_scenario_module_id, module_path, `name`, `level`,
|
||||||
`status`, principal, step_total, follow_people, schedule, create_time, update_time,
|
`status`, principal, step_total, follow_people, schedule, create_time, update_time,
|
||||||
pass_rate, last_result, report_id
|
pass_rate, last_result, report_id
|
||||||
</sql>
|
</sql>
|
||||||
@ -140,7 +140,7 @@
|
|||||||
</if>
|
</if>
|
||||||
</delete>
|
</delete>
|
||||||
<insert id="insert" parameterType="io.metersphere.base.domain.ApiScenarioWithBLOBs">
|
<insert id="insert" parameterType="io.metersphere.base.domain.ApiScenarioWithBLOBs">
|
||||||
insert into api_scenario (id, project_id, tag_id,
|
insert into api_scenario (id, project_id, tags,
|
||||||
user_id, api_scenario_module_id, module_path,
|
user_id, api_scenario_module_id, module_path,
|
||||||
`name`, `level`, `status`,
|
`name`, `level`, `status`,
|
||||||
principal, step_total, follow_people,
|
principal, step_total, follow_people,
|
||||||
@ -148,7 +148,7 @@
|
|||||||
pass_rate, last_result, report_id,
|
pass_rate, last_result, report_id,
|
||||||
scenario_definition, description
|
scenario_definition, description
|
||||||
)
|
)
|
||||||
values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{tagId,jdbcType=VARCHAR},
|
values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{tags,jdbcType=VARCHAR},
|
||||||
#{userId,jdbcType=VARCHAR}, #{apiScenarioModuleId,jdbcType=VARCHAR}, #{modulePath,jdbcType=VARCHAR},
|
#{userId,jdbcType=VARCHAR}, #{apiScenarioModuleId,jdbcType=VARCHAR}, #{modulePath,jdbcType=VARCHAR},
|
||||||
#{name,jdbcType=VARCHAR}, #{level,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR},
|
#{name,jdbcType=VARCHAR}, #{level,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR},
|
||||||
#{principal,jdbcType=VARCHAR}, #{stepTotal,jdbcType=INTEGER}, #{followPeople,jdbcType=VARCHAR},
|
#{principal,jdbcType=VARCHAR}, #{stepTotal,jdbcType=INTEGER}, #{followPeople,jdbcType=VARCHAR},
|
||||||
@ -166,8 +166,8 @@
|
|||||||
<if test="projectId != null">
|
<if test="projectId != null">
|
||||||
project_id,
|
project_id,
|
||||||
</if>
|
</if>
|
||||||
<if test="tagId != null">
|
<if test="tags != null">
|
||||||
tag_id,
|
tags,
|
||||||
</if>
|
</if>
|
||||||
<if test="userId != null">
|
<if test="userId != null">
|
||||||
user_id,
|
user_id,
|
||||||
@ -228,8 +228,8 @@
|
|||||||
<if test="projectId != null">
|
<if test="projectId != null">
|
||||||
#{projectId,jdbcType=VARCHAR},
|
#{projectId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="tagId != null">
|
<if test="tags != null">
|
||||||
#{tagId,jdbcType=VARCHAR},
|
#{tags,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="userId != null">
|
<if test="userId != null">
|
||||||
#{userId,jdbcType=VARCHAR},
|
#{userId,jdbcType=VARCHAR},
|
||||||
@ -299,8 +299,8 @@
|
|||||||
<if test="record.projectId != null">
|
<if test="record.projectId != null">
|
||||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="record.tagId != null">
|
<if test="record.tags != null">
|
||||||
tag_id = #{record.tagId,jdbcType=VARCHAR},
|
tags = #{record.tags,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="record.userId != null">
|
<if test="record.userId != null">
|
||||||
user_id = #{record.userId,jdbcType=VARCHAR},
|
user_id = #{record.userId,jdbcType=VARCHAR},
|
||||||
@ -362,7 +362,7 @@
|
|||||||
update api_scenario
|
update api_scenario
|
||||||
set id = #{record.id,jdbcType=VARCHAR},
|
set id = #{record.id,jdbcType=VARCHAR},
|
||||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||||
tag_id = #{record.tagId,jdbcType=VARCHAR},
|
tags = #{record.tags,jdbcType=VARCHAR},
|
||||||
user_id = #{record.userId,jdbcType=VARCHAR},
|
user_id = #{record.userId,jdbcType=VARCHAR},
|
||||||
api_scenario_module_id = #{record.apiScenarioModuleId,jdbcType=VARCHAR},
|
api_scenario_module_id = #{record.apiScenarioModuleId,jdbcType=VARCHAR},
|
||||||
module_path = #{record.modulePath,jdbcType=VARCHAR},
|
module_path = #{record.modulePath,jdbcType=VARCHAR},
|
||||||
@ -388,7 +388,7 @@
|
|||||||
update api_scenario
|
update api_scenario
|
||||||
set id = #{record.id,jdbcType=VARCHAR},
|
set id = #{record.id,jdbcType=VARCHAR},
|
||||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||||
tag_id = #{record.tagId,jdbcType=VARCHAR},
|
tags = #{record.tags,jdbcType=VARCHAR},
|
||||||
user_id = #{record.userId,jdbcType=VARCHAR},
|
user_id = #{record.userId,jdbcType=VARCHAR},
|
||||||
api_scenario_module_id = #{record.apiScenarioModuleId,jdbcType=VARCHAR},
|
api_scenario_module_id = #{record.apiScenarioModuleId,jdbcType=VARCHAR},
|
||||||
module_path = #{record.modulePath,jdbcType=VARCHAR},
|
module_path = #{record.modulePath,jdbcType=VARCHAR},
|
||||||
@ -414,8 +414,8 @@
|
|||||||
<if test="projectId != null">
|
<if test="projectId != null">
|
||||||
project_id = #{projectId,jdbcType=VARCHAR},
|
project_id = #{projectId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="tagId != null">
|
<if test="tags != null">
|
||||||
tag_id = #{tagId,jdbcType=VARCHAR},
|
tags = #{tags,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="userId != null">
|
<if test="userId != null">
|
||||||
user_id = #{userId,jdbcType=VARCHAR},
|
user_id = #{userId,jdbcType=VARCHAR},
|
||||||
@ -474,7 +474,7 @@
|
|||||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.base.domain.ApiScenarioWithBLOBs">
|
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.base.domain.ApiScenarioWithBLOBs">
|
||||||
update api_scenario
|
update api_scenario
|
||||||
set project_id = #{projectId,jdbcType=VARCHAR},
|
set project_id = #{projectId,jdbcType=VARCHAR},
|
||||||
tag_id = #{tagId,jdbcType=VARCHAR},
|
tags = #{tags,jdbcType=VARCHAR},
|
||||||
user_id = #{userId,jdbcType=VARCHAR},
|
user_id = #{userId,jdbcType=VARCHAR},
|
||||||
api_scenario_module_id = #{apiScenarioModuleId,jdbcType=VARCHAR},
|
api_scenario_module_id = #{apiScenarioModuleId,jdbcType=VARCHAR},
|
||||||
module_path = #{modulePath,jdbcType=VARCHAR},
|
module_path = #{modulePath,jdbcType=VARCHAR},
|
||||||
@ -497,7 +497,7 @@
|
|||||||
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.ApiScenario">
|
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.ApiScenario">
|
||||||
update api_scenario
|
update api_scenario
|
||||||
set project_id = #{projectId,jdbcType=VARCHAR},
|
set project_id = #{projectId,jdbcType=VARCHAR},
|
||||||
tag_id = #{tagId,jdbcType=VARCHAR},
|
tags = #{tags,jdbcType=VARCHAR},
|
||||||
user_id = #{userId,jdbcType=VARCHAR},
|
user_id = #{userId,jdbcType=VARCHAR},
|
||||||
api_scenario_module_id = #{apiScenarioModuleId,jdbcType=VARCHAR},
|
api_scenario_module_id = #{apiScenarioModuleId,jdbcType=VARCHAR},
|
||||||
module_path = #{modulePath,jdbcType=VARCHAR},
|
module_path = #{modulePath,jdbcType=VARCHAR},
|
||||||
|
@ -1,31 +0,0 @@
|
|||||||
package io.metersphere.base.mapper;
|
|
||||||
|
|
||||||
import io.metersphere.base.domain.ApiTag;
|
|
||||||
import io.metersphere.base.domain.ApiTagExample;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public interface ApiTagMapper {
|
|
||||||
long countByExample(ApiTagExample example);
|
|
||||||
|
|
||||||
int deleteByExample(ApiTagExample example);
|
|
||||||
|
|
||||||
int deleteByPrimaryKey(String id);
|
|
||||||
|
|
||||||
int insert(ApiTag record);
|
|
||||||
|
|
||||||
int insertSelective(ApiTag record);
|
|
||||||
|
|
||||||
List<ApiTag> selectByExample(ApiTagExample example);
|
|
||||||
|
|
||||||
ApiTag selectByPrimaryKey(String id);
|
|
||||||
|
|
||||||
int updateByExampleSelective(@Param("record") ApiTag record, @Param("example") ApiTagExample example);
|
|
||||||
|
|
||||||
int updateByExample(@Param("record") ApiTag record, @Param("example") ApiTagExample example);
|
|
||||||
|
|
||||||
int updateByPrimaryKeySelective(ApiTag record);
|
|
||||||
|
|
||||||
int updateByPrimaryKey(ApiTag record);
|
|
||||||
}
|
|
@ -1,228 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="io.metersphere.base.mapper.ApiTagMapper">
|
|
||||||
<resultMap id="BaseResultMap" type="io.metersphere.base.domain.ApiTag">
|
|
||||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
|
||||||
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
|
|
||||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
|
||||||
<result column="user_id" jdbcType="VARCHAR" property="userId" />
|
|
||||||
<result column="create_time" jdbcType="BIGINT" property="createTime" />
|
|
||||||
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
|
|
||||||
</resultMap>
|
|
||||||
<sql id="Example_Where_Clause">
|
|
||||||
<where>
|
|
||||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
|
||||||
<if test="criteria.valid">
|
|
||||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
|
||||||
<foreach collection="criteria.criteria" item="criterion">
|
|
||||||
<choose>
|
|
||||||
<when test="criterion.noValue">
|
|
||||||
and ${criterion.condition}
|
|
||||||
</when>
|
|
||||||
<when test="criterion.singleValue">
|
|
||||||
and ${criterion.condition} #{criterion.value}
|
|
||||||
</when>
|
|
||||||
<when test="criterion.betweenValue">
|
|
||||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
||||||
</when>
|
|
||||||
<when test="criterion.listValue">
|
|
||||||
and ${criterion.condition}
|
|
||||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
||||||
#{listItem}
|
|
||||||
</foreach>
|
|
||||||
</when>
|
|
||||||
</choose>
|
|
||||||
</foreach>
|
|
||||||
</trim>
|
|
||||||
</if>
|
|
||||||
</foreach>
|
|
||||||
</where>
|
|
||||||
</sql>
|
|
||||||
<sql id="Update_By_Example_Where_Clause">
|
|
||||||
<where>
|
|
||||||
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
|
||||||
<if test="criteria.valid">
|
|
||||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
|
||||||
<foreach collection="criteria.criteria" item="criterion">
|
|
||||||
<choose>
|
|
||||||
<when test="criterion.noValue">
|
|
||||||
and ${criterion.condition}
|
|
||||||
</when>
|
|
||||||
<when test="criterion.singleValue">
|
|
||||||
and ${criterion.condition} #{criterion.value}
|
|
||||||
</when>
|
|
||||||
<when test="criterion.betweenValue">
|
|
||||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
||||||
</when>
|
|
||||||
<when test="criterion.listValue">
|
|
||||||
and ${criterion.condition}
|
|
||||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
||||||
#{listItem}
|
|
||||||
</foreach>
|
|
||||||
</when>
|
|
||||||
</choose>
|
|
||||||
</foreach>
|
|
||||||
</trim>
|
|
||||||
</if>
|
|
||||||
</foreach>
|
|
||||||
</where>
|
|
||||||
</sql>
|
|
||||||
<sql id="Base_Column_List">
|
|
||||||
id, project_id, `name`, user_id, create_time, update_time
|
|
||||||
</sql>
|
|
||||||
<select id="selectByExample" parameterType="io.metersphere.base.domain.ApiTagExample" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
<if test="distinct">
|
|
||||||
distinct
|
|
||||||
</if>
|
|
||||||
<include refid="Base_Column_List" />
|
|
||||||
from api_tag
|
|
||||||
<if test="_parameter != null">
|
|
||||||
<include refid="Example_Where_Clause" />
|
|
||||||
</if>
|
|
||||||
<if test="orderByClause != null">
|
|
||||||
order by ${orderByClause}
|
|
||||||
</if>
|
|
||||||
</select>
|
|
||||||
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List" />
|
|
||||||
from api_tag
|
|
||||||
where id = #{id,jdbcType=VARCHAR}
|
|
||||||
</select>
|
|
||||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
||||||
delete from api_tag
|
|
||||||
where id = #{id,jdbcType=VARCHAR}
|
|
||||||
</delete>
|
|
||||||
<delete id="deleteByExample" parameterType="io.metersphere.base.domain.ApiTagExample">
|
|
||||||
delete from api_tag
|
|
||||||
<if test="_parameter != null">
|
|
||||||
<include refid="Example_Where_Clause" />
|
|
||||||
</if>
|
|
||||||
</delete>
|
|
||||||
<insert id="insert" parameterType="io.metersphere.base.domain.ApiTag">
|
|
||||||
insert into api_tag (id, project_id, `name`,
|
|
||||||
user_id, create_time, update_time
|
|
||||||
)
|
|
||||||
values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
|
|
||||||
#{userId,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}
|
|
||||||
)
|
|
||||||
</insert>
|
|
||||||
<insert id="insertSelective" parameterType="io.metersphere.base.domain.ApiTag">
|
|
||||||
insert into api_tag
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="id != null">
|
|
||||||
id,
|
|
||||||
</if>
|
|
||||||
<if test="projectId != null">
|
|
||||||
project_id,
|
|
||||||
</if>
|
|
||||||
<if test="name != null">
|
|
||||||
`name`,
|
|
||||||
</if>
|
|
||||||
<if test="userId != null">
|
|
||||||
user_id,
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
|
||||||
create_time,
|
|
||||||
</if>
|
|
||||||
<if test="updateTime != null">
|
|
||||||
update_time,
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="id != null">
|
|
||||||
#{id,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="projectId != null">
|
|
||||||
#{projectId,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="name != null">
|
|
||||||
#{name,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="userId != null">
|
|
||||||
#{userId,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
|
||||||
#{createTime,jdbcType=BIGINT},
|
|
||||||
</if>
|
|
||||||
<if test="updateTime != null">
|
|
||||||
#{updateTime,jdbcType=BIGINT},
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
<select id="countByExample" parameterType="io.metersphere.base.domain.ApiTagExample" resultType="java.lang.Long">
|
|
||||||
select count(*) from api_tag
|
|
||||||
<if test="_parameter != null">
|
|
||||||
<include refid="Example_Where_Clause" />
|
|
||||||
</if>
|
|
||||||
</select>
|
|
||||||
<update id="updateByExampleSelective" parameterType="map">
|
|
||||||
update api_tag
|
|
||||||
<set>
|
|
||||||
<if test="record.id != null">
|
|
||||||
id = #{record.id,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="record.projectId != null">
|
|
||||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="record.name != null">
|
|
||||||
`name` = #{record.name,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="record.userId != null">
|
|
||||||
user_id = #{record.userId,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="record.createTime != null">
|
|
||||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
|
||||||
</if>
|
|
||||||
<if test="record.updateTime != null">
|
|
||||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
<if test="_parameter != null">
|
|
||||||
<include refid="Update_By_Example_Where_Clause" />
|
|
||||||
</if>
|
|
||||||
</update>
|
|
||||||
<update id="updateByExample" parameterType="map">
|
|
||||||
update api_tag
|
|
||||||
set id = #{record.id,jdbcType=VARCHAR},
|
|
||||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
|
||||||
`name` = #{record.name,jdbcType=VARCHAR},
|
|
||||||
user_id = #{record.userId,jdbcType=VARCHAR},
|
|
||||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
|
||||||
update_time = #{record.updateTime,jdbcType=BIGINT}
|
|
||||||
<if test="_parameter != null">
|
|
||||||
<include refid="Update_By_Example_Where_Clause" />
|
|
||||||
</if>
|
|
||||||
</update>
|
|
||||||
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.base.domain.ApiTag">
|
|
||||||
update api_tag
|
|
||||||
<set>
|
|
||||||
<if test="projectId != null">
|
|
||||||
project_id = #{projectId,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="name != null">
|
|
||||||
`name` = #{name,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="userId != null">
|
|
||||||
user_id = #{userId,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
|
||||||
create_time = #{createTime,jdbcType=BIGINT},
|
|
||||||
</if>
|
|
||||||
<if test="updateTime != null">
|
|
||||||
update_time = #{updateTime,jdbcType=BIGINT},
|
|
||||||
</if>
|
|
||||||
</set>
|
|
||||||
where id = #{id,jdbcType=VARCHAR}
|
|
||||||
</update>
|
|
||||||
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.ApiTag">
|
|
||||||
update api_tag
|
|
||||||
set project_id = #{projectId,jdbcType=VARCHAR},
|
|
||||||
`name` = #{name,jdbcType=VARCHAR},
|
|
||||||
user_id = #{userId,jdbcType=VARCHAR},
|
|
||||||
create_time = #{createTime,jdbcType=BIGINT},
|
|
||||||
update_time = #{updateTime,jdbcType=BIGINT}
|
|
||||||
where id = #{id,jdbcType=VARCHAR}
|
|
||||||
</update>
|
|
||||||
</mapper>
|
|
@ -1,13 +1,9 @@
|
|||||||
package io.metersphere.base.mapper;
|
package io.metersphere.base.mapper;
|
||||||
|
|
||||||
import io.metersphere.api.dto.dataCount.response.TaskInfoResult;
|
|
||||||
import io.metersphere.base.domain.Schedule;
|
import io.metersphere.base.domain.Schedule;
|
||||||
import io.metersphere.base.domain.ScheduleExample;
|
import io.metersphere.base.domain.ScheduleExample;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.apache.ibatis.annotations.Select;
|
|
||||||
import org.apache.ibatis.annotations.Update;
|
|
||||||
import org.python.antlr.ast.Str;
|
|
||||||
|
|
||||||
public interface ScheduleMapper {
|
public interface ScheduleMapper {
|
||||||
long countByExample(ScheduleExample example);
|
long countByExample(ScheduleExample example);
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||||
<result column="create_time" jdbcType="BIGINT" property="createTime" />
|
<result column="create_time" jdbcType="BIGINT" property="createTime" />
|
||||||
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
|
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
|
||||||
|
<result column="image" jdbcType="VARCHAR" property="image" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="Example_Where_Clause">
|
<sql id="Example_Where_Clause">
|
||||||
<where>
|
<where>
|
||||||
@ -69,7 +70,7 @@
|
|||||||
</where>
|
</where>
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id, name, type, description, status, create_time, update_time
|
id, `name`, `type`, description, `status`, create_time, update_time, image
|
||||||
</sql>
|
</sql>
|
||||||
<select id="selectByExample" parameterType="io.metersphere.base.domain.TestResourcePoolExample" resultMap="BaseResultMap">
|
<select id="selectByExample" parameterType="io.metersphere.base.domain.TestResourcePoolExample" resultMap="BaseResultMap">
|
||||||
select
|
select
|
||||||
@ -102,12 +103,12 @@
|
|||||||
</if>
|
</if>
|
||||||
</delete>
|
</delete>
|
||||||
<insert id="insert" parameterType="io.metersphere.base.domain.TestResourcePool">
|
<insert id="insert" parameterType="io.metersphere.base.domain.TestResourcePool">
|
||||||
insert into test_resource_pool (id, name, type,
|
insert into test_resource_pool (id, `name`, `type`,
|
||||||
description, status, create_time,
|
description, `status`, create_time,
|
||||||
update_time)
|
update_time, image)
|
||||||
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
|
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
|
||||||
#{description,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT},
|
#{description,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT},
|
||||||
#{updateTime,jdbcType=BIGINT})
|
#{updateTime,jdbcType=BIGINT}, #{image,jdbcType=VARCHAR})
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="insertSelective" parameterType="io.metersphere.base.domain.TestResourcePool">
|
<insert id="insertSelective" parameterType="io.metersphere.base.domain.TestResourcePool">
|
||||||
insert into test_resource_pool
|
insert into test_resource_pool
|
||||||
@ -116,16 +117,16 @@
|
|||||||
id,
|
id,
|
||||||
</if>
|
</if>
|
||||||
<if test="name != null">
|
<if test="name != null">
|
||||||
name,
|
`name`,
|
||||||
</if>
|
</if>
|
||||||
<if test="type != null">
|
<if test="type != null">
|
||||||
type,
|
`type`,
|
||||||
</if>
|
</if>
|
||||||
<if test="description != null">
|
<if test="description != null">
|
||||||
description,
|
description,
|
||||||
</if>
|
</if>
|
||||||
<if test="status != null">
|
<if test="status != null">
|
||||||
status,
|
`status`,
|
||||||
</if>
|
</if>
|
||||||
<if test="createTime != null">
|
<if test="createTime != null">
|
||||||
create_time,
|
create_time,
|
||||||
@ -133,6 +134,9 @@
|
|||||||
<if test="updateTime != null">
|
<if test="updateTime != null">
|
||||||
update_time,
|
update_time,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="image != null">
|
||||||
|
image,
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="id != null">
|
<if test="id != null">
|
||||||
@ -156,6 +160,9 @@
|
|||||||
<if test="updateTime != null">
|
<if test="updateTime != null">
|
||||||
#{updateTime,jdbcType=BIGINT},
|
#{updateTime,jdbcType=BIGINT},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="image != null">
|
||||||
|
#{image,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
<select id="countByExample" parameterType="io.metersphere.base.domain.TestResourcePoolExample" resultType="java.lang.Long">
|
<select id="countByExample" parameterType="io.metersphere.base.domain.TestResourcePoolExample" resultType="java.lang.Long">
|
||||||
@ -171,16 +178,16 @@
|
|||||||
id = #{record.id,jdbcType=VARCHAR},
|
id = #{record.id,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="record.name != null">
|
<if test="record.name != null">
|
||||||
name = #{record.name,jdbcType=VARCHAR},
|
`name` = #{record.name,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="record.type != null">
|
<if test="record.type != null">
|
||||||
type = #{record.type,jdbcType=VARCHAR},
|
`type` = #{record.type,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="record.description != null">
|
<if test="record.description != null">
|
||||||
description = #{record.description,jdbcType=VARCHAR},
|
description = #{record.description,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="record.status != null">
|
<if test="record.status != null">
|
||||||
status = #{record.status,jdbcType=VARCHAR},
|
`status` = #{record.status,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="record.createTime != null">
|
<if test="record.createTime != null">
|
||||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||||
@ -188,6 +195,9 @@
|
|||||||
<if test="record.updateTime != null">
|
<if test="record.updateTime != null">
|
||||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="record.image != null">
|
||||||
|
image = #{record.image,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
</set>
|
</set>
|
||||||
<if test="_parameter != null">
|
<if test="_parameter != null">
|
||||||
<include refid="Update_By_Example_Where_Clause" />
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
@ -196,12 +206,13 @@
|
|||||||
<update id="updateByExample" parameterType="map">
|
<update id="updateByExample" parameterType="map">
|
||||||
update test_resource_pool
|
update test_resource_pool
|
||||||
set id = #{record.id,jdbcType=VARCHAR},
|
set id = #{record.id,jdbcType=VARCHAR},
|
||||||
name = #{record.name,jdbcType=VARCHAR},
|
`name` = #{record.name,jdbcType=VARCHAR},
|
||||||
type = #{record.type,jdbcType=VARCHAR},
|
`type` = #{record.type,jdbcType=VARCHAR},
|
||||||
description = #{record.description,jdbcType=VARCHAR},
|
description = #{record.description,jdbcType=VARCHAR},
|
||||||
status = #{record.status,jdbcType=VARCHAR},
|
`status` = #{record.status,jdbcType=VARCHAR},
|
||||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||||
update_time = #{record.updateTime,jdbcType=BIGINT}
|
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||||
|
image = #{record.image,jdbcType=VARCHAR}
|
||||||
<if test="_parameter != null">
|
<if test="_parameter != null">
|
||||||
<include refid="Update_By_Example_Where_Clause" />
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
</if>
|
</if>
|
||||||
@ -210,16 +221,16 @@
|
|||||||
update test_resource_pool
|
update test_resource_pool
|
||||||
<set>
|
<set>
|
||||||
<if test="name != null">
|
<if test="name != null">
|
||||||
name = #{name,jdbcType=VARCHAR},
|
`name` = #{name,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="type != null">
|
<if test="type != null">
|
||||||
type = #{type,jdbcType=VARCHAR},
|
`type` = #{type,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="description != null">
|
<if test="description != null">
|
||||||
description = #{description,jdbcType=VARCHAR},
|
description = #{description,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="status != null">
|
<if test="status != null">
|
||||||
status = #{status,jdbcType=VARCHAR},
|
`status` = #{status,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="createTime != null">
|
<if test="createTime != null">
|
||||||
create_time = #{createTime,jdbcType=BIGINT},
|
create_time = #{createTime,jdbcType=BIGINT},
|
||||||
@ -227,17 +238,21 @@
|
|||||||
<if test="updateTime != null">
|
<if test="updateTime != null">
|
||||||
update_time = #{updateTime,jdbcType=BIGINT},
|
update_time = #{updateTime,jdbcType=BIGINT},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="image != null">
|
||||||
|
image = #{image,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
</set>
|
</set>
|
||||||
where id = #{id,jdbcType=VARCHAR}
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
</update>
|
</update>
|
||||||
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.TestResourcePool">
|
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.TestResourcePool">
|
||||||
update test_resource_pool
|
update test_resource_pool
|
||||||
set name = #{name,jdbcType=VARCHAR},
|
set `name` = #{name,jdbcType=VARCHAR},
|
||||||
type = #{type,jdbcType=VARCHAR},
|
`type` = #{type,jdbcType=VARCHAR},
|
||||||
description = #{description,jdbcType=VARCHAR},
|
description = #{description,jdbcType=VARCHAR},
|
||||||
status = #{status,jdbcType=VARCHAR},
|
`status` = #{status,jdbcType=VARCHAR},
|
||||||
create_time = #{createTime,jdbcType=BIGINT},
|
create_time = #{createTime,jdbcType=BIGINT},
|
||||||
update_time = #{updateTime,jdbcType=BIGINT}
|
update_time = #{updateTime,jdbcType=BIGINT},
|
||||||
|
image = #{image,jdbcType=VARCHAR}
|
||||||
where id = #{id,jdbcType=VARCHAR}
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
</update>
|
</update>
|
||||||
</mapper>
|
</mapper>
|
@ -1,9 +1,8 @@
|
|||||||
package io.metersphere.base.mapper.ext;
|
package io.metersphere.base.mapper.ext;
|
||||||
|
|
||||||
import io.metersphere.api.dto.dataCount.ExecutedCaseInfoResult;
|
import io.metersphere.api.dto.datacount.ExecutedCaseInfoResult;
|
||||||
import io.metersphere.base.domain.ApiDefinitionExecResult;
|
import io.metersphere.base.domain.ApiDefinitionExecResult;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.apache.ibatis.annotations.Select;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
WHERE testCase.project_id = #{projectId})
|
WHERE testCase.project_id = #{projectId})
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="findFaliureCaseInfoByProjectIDAndExecuteTimeAndLimitNumber" resultType="io.metersphere.api.dto.dataCount.ExecutedCaseInfoResult">
|
<select id="findFaliureCaseInfoByProjectIDAndExecuteTimeAndLimitNumber" resultType="io.metersphere.api.dto.datacount.ExecutedCaseInfoResult">
|
||||||
SELECT * FROM (
|
SELECT * FROM (
|
||||||
SELECT testCase.testCaseName AS caseName,testCase.testPlanName AS testPlan ,caseErrorCountData.dataCountNumber AS failureTimes,'apiCase' AS caseType
|
SELECT testCase.testCaseName AS caseName,testCase.testPlanName AS testPlan ,caseErrorCountData.dataCountNumber AS failureTimes,'apiCase' AS caseType
|
||||||
FROM (
|
FROM (
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
package io.metersphere.base.mapper.ext;
|
package io.metersphere.base.mapper.ext;
|
||||||
|
|
||||||
import io.metersphere.api.dto.dataCount.ApiDataCountResult;
|
import io.metersphere.api.dto.datacount.ApiDataCountResult;
|
||||||
import io.metersphere.api.dto.definition.ApiComputeResult;
|
import io.metersphere.api.dto.definition.ApiComputeResult;
|
||||||
import io.metersphere.api.dto.definition.ApiDefinitionRequest;
|
import io.metersphere.api.dto.definition.ApiDefinitionRequest;
|
||||||
import io.metersphere.api.dto.definition.ApiDefinitionResult;
|
import io.metersphere.api.dto.definition.ApiDefinitionResult;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.apache.ibatis.annotations.Select;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -274,10 +274,10 @@
|
|||||||
</foreach>
|
</foreach>
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<select id="countProtocolByProjectID" resultType="io.metersphere.api.dto.dataCount.ApiDataCountResult">
|
<select id="countProtocolByProjectID" resultType="io.metersphere.api.dto.datacount.ApiDataCountResult">
|
||||||
SELECT protocol AS groupField,count(id) AS countNumber FROM api_definition WHERE project_id = #{0} GROUP BY protocol
|
SELECT protocol AS groupField,count(id) AS countNumber FROM api_definition WHERE project_id = #{0} GROUP BY protocol
|
||||||
</select>
|
</select>
|
||||||
<select id="countStateByProjectID" resultType="io.metersphere.api.dto.dataCount.ApiDataCountResult">
|
<select id="countStateByProjectID" resultType="io.metersphere.api.dto.datacount.ApiDataCountResult">
|
||||||
SELECT status AS groupField,count(id) AS countNumber FROM api_definition WHERE project_id = #{0} GROUP BY status
|
SELECT status AS groupField,count(id) AS countNumber FROM api_definition WHERE project_id = #{0} GROUP BY status
|
||||||
</select>
|
</select>
|
||||||
<select id="countByProjectIDAndCreateInThisWeek" resultType="java.lang.Long">
|
<select id="countByProjectIDAndCreateInThisWeek" resultType="java.lang.Long">
|
||||||
@ -285,7 +285,7 @@
|
|||||||
WHERE project_id = #{projectId}
|
WHERE project_id = #{projectId}
|
||||||
AND create_time BETWEEN #{firstDayTimestamp} AND #{lastDayTimestamp}
|
AND create_time BETWEEN #{firstDayTimestamp} AND #{lastDayTimestamp}
|
||||||
</select>
|
</select>
|
||||||
<select id="countApiCoverageByProjectID" resultType="io.metersphere.api.dto.dataCount.ApiDataCountResult">
|
<select id="countApiCoverageByProjectID" resultType="io.metersphere.api.dto.datacount.ApiDataCountResult">
|
||||||
SELECT count(api.id) AS countNumber, if(test_case_api.api_definition_id is null,"uncoverage","coverage") AS groupField FROM api_definition api left Join (
|
SELECT count(api.id) AS countNumber, if(test_case_api.api_definition_id is null,"uncoverage","coverage") AS groupField FROM api_definition api left Join (
|
||||||
SELECT DISTINCT api_definition_id FROM api_test_case
|
SELECT DISTINCT api_definition_id FROM api_test_case
|
||||||
) test_case_api ON api.id = test_case_api.api_definition_id
|
) test_case_api ON api.id = test_case_api.api_definition_id
|
||||||
|
@ -2,7 +2,7 @@ package io.metersphere.base.mapper.ext;
|
|||||||
|
|
||||||
import io.metersphere.api.dto.automation.ApiScenarioDTO;
|
import io.metersphere.api.dto.automation.ApiScenarioDTO;
|
||||||
import io.metersphere.api.dto.automation.ApiScenarioRequest;
|
import io.metersphere.api.dto.automation.ApiScenarioRequest;
|
||||||
import io.metersphere.api.dto.dataCount.ApiDataCountResult;
|
import io.metersphere.api.dto.datacount.ApiDataCountResult;
|
||||||
import io.metersphere.base.domain.ApiScenario;
|
import io.metersphere.base.domain.ApiScenario;
|
||||||
import io.metersphere.base.domain.ApiScenarioWithBLOBs;
|
import io.metersphere.base.domain.ApiScenarioWithBLOBs;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<select id="list" resultMap="BaseResultMap">
|
<select id="list" resultMap="BaseResultMap">
|
||||||
select api_scenario.id, api_scenario.project_id, api_scenario.tag_id, api_scenario.user_id,
|
select api_scenario.id, api_scenario.project_id, api_scenario.tags, api_scenario.user_id,
|
||||||
api_scenario.api_scenario_module_id,api_scenario.module_path, api_scenario.name, api_scenario.level,
|
api_scenario.api_scenario_module_id,api_scenario.module_path, api_scenario.name, api_scenario.level,
|
||||||
api_scenario.status, api_scenario.principal, api_scenario.step_total, api_scenario.follow_people,
|
api_scenario.status, api_scenario.principal, api_scenario.step_total, api_scenario.follow_people,
|
||||||
api_scenario.last_result,api_scenario.pass_rate,api_scenario.report_id,
|
api_scenario.last_result,api_scenario.pass_rate,api_scenario.report_id,
|
||||||
@ -68,7 +68,7 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectByTagId" resultType="io.metersphere.base.domain.ApiScenarioWithBLOBs">
|
<select id="selectByTagId" resultType="io.metersphere.base.domain.ApiScenarioWithBLOBs">
|
||||||
select * from api_scenario where tag_id like CONCAT('%', #{id},'%')
|
select * from api_scenario where tags like CONCAT('%', #{id},'%')
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectIds" resultType="io.metersphere.base.domain.ApiScenarioWithBLOBs">
|
<select id="selectIds" resultType="io.metersphere.base.domain.ApiScenarioWithBLOBs">
|
||||||
@ -123,7 +123,7 @@
|
|||||||
AND create_time BETWEEN #{firstDayTimestamp} AND #{lastDayTimestamp}
|
AND create_time BETWEEN #{firstDayTimestamp} AND #{lastDayTimestamp}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="countRunResultByProjectID" resultType="io.metersphere.api.dto.dataCount.ApiDataCountResult">
|
<select id="countRunResultByProjectID" resultType="io.metersphere.api.dto.datacount.ApiDataCountResult">
|
||||||
SELECT count(id) AS countNumber, if(last_result is null,"notRun",last_result) AS groupField FROM api_scenario
|
SELECT count(id) AS countNumber, if(last_result is null,"notRun",last_result) AS groupField FROM api_scenario
|
||||||
WHERE project_id = #{0}
|
WHERE project_id = #{0}
|
||||||
GROUP BY groupField
|
GROUP BY groupField
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
package io.metersphere.base.mapper.ext;
|
|
||||||
|
|
||||||
import io.metersphere.api.dto.automation.ApiTagRequest;
|
|
||||||
import io.metersphere.base.domain.ApiTag;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public interface ExtApiTagMapper {
|
|
||||||
List<ApiTag> list(@Param("request") ApiTagRequest request);
|
|
||||||
}
|
|
@ -1,21 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="io.metersphere.base.mapper.ext.ExtApiTagMapper">
|
|
||||||
<select id="list" resultType="io.metersphere.base.domain.ApiTag">
|
|
||||||
select * from api_tag
|
|
||||||
<where>
|
|
||||||
<if test="request.name != null">
|
|
||||||
and api_tag.name like CONCAT('%', #{request.name},'%')
|
|
||||||
</if>
|
|
||||||
<if test="request.projectId != null">
|
|
||||||
AND api_tag.project_id = #{request.projectId}
|
|
||||||
</if>
|
|
||||||
<if test="request.id != null">
|
|
||||||
AND api_tag.id = #{request.id}
|
|
||||||
</if>
|
|
||||||
<if test="request.userId != null">
|
|
||||||
AND api_tag.user_id = #{request.userId}
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
</select>
|
|
||||||
</mapper>
|
|
@ -1,6 +1,6 @@
|
|||||||
package io.metersphere.base.mapper.ext;
|
package io.metersphere.base.mapper.ext;
|
||||||
|
|
||||||
import io.metersphere.api.dto.dataCount.ApiDataCountResult;
|
import io.metersphere.api.dto.datacount.ApiDataCountResult;
|
||||||
import io.metersphere.api.dto.definition.ApiTestCaseDTO;
|
import io.metersphere.api.dto.definition.ApiTestCaseDTO;
|
||||||
import io.metersphere.api.dto.definition.ApiTestCaseRequest;
|
import io.metersphere.api.dto.definition.ApiTestCaseRequest;
|
||||||
import io.metersphere.api.dto.definition.ApiTestCaseResult;
|
import io.metersphere.api.dto.definition.ApiTestCaseResult;
|
||||||
|
@ -2,11 +2,9 @@ package io.metersphere.base.mapper.ext;
|
|||||||
|
|
||||||
import io.metersphere.api.dto.APIReportResult;
|
import io.metersphere.api.dto.APIReportResult;
|
||||||
import io.metersphere.api.dto.QueryAPIReportRequest;
|
import io.metersphere.api.dto.QueryAPIReportRequest;
|
||||||
import io.metersphere.api.dto.dataCount.ApiDataCountResult;
|
import io.metersphere.api.dto.datacount.ApiDataCountResult;
|
||||||
import io.metersphere.dto.ApiReportDTO;
|
|
||||||
import io.metersphere.dto.DashboardTestDTO;
|
import io.metersphere.dto.DashboardTestDTO;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.apache.ibatis.annotations.Select;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -152,7 +152,7 @@
|
|||||||
GROUP BY x
|
GROUP BY x
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="countByWorkspaceIdAndGroupGroupByExecuteResult" resultType="io.metersphere.api.dto.dataCount.ApiDataCountResult">
|
<select id="countByWorkspaceIdAndGroupGroupByExecuteResult" resultType="io.metersphere.api.dto.datacount.ApiDataCountResult">
|
||||||
SELECT testReport.`status` AS groupField,COUNT(testReportDetail.report_id) AS countNumber
|
SELECT testReport.`status` AS groupField,COUNT(testReportDetail.report_id) AS countNumber
|
||||||
FROM api_test_report_detail testReportDetail
|
FROM api_test_report_detail testReportDetail
|
||||||
INNER JOIN `schedule` sch ON sch.resource_id = testReportDetail.test_id
|
INNER JOIN `schedule` sch ON sch.resource_id = testReportDetail.test_id
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
package io.metersphere.base.mapper.ext;
|
package io.metersphere.base.mapper.ext;
|
||||||
|
|
||||||
import io.metersphere.api.dto.dataCount.response.TaskInfoResult;
|
import io.metersphere.api.dto.datacount.response.TaskInfoResult;
|
||||||
import io.metersphere.controller.request.QueryScheduleRequest;
|
import io.metersphere.controller.request.QueryScheduleRequest;
|
||||||
import io.metersphere.dto.ScheduleDao;
|
import io.metersphere.dto.ScheduleDao;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.apache.ibatis.annotations.Select;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
AND `group` = #{group}
|
AND `group` = #{group}
|
||||||
AND create_time BETWEEN #{startTime} and #{endTime}
|
AND create_time BETWEEN #{startTime} and #{endTime}
|
||||||
</select>
|
</select>
|
||||||
<select id="findRunningTaskInfoByWorkspaceID" resultType="io.metersphere.api.dto.dataCount.response.TaskInfoResult">
|
<select id="findRunningTaskInfoByWorkspaceID" resultType="io.metersphere.api.dto.datacount.response.TaskInfoResult">
|
||||||
SELECT apiTest.`name` AS scenario,sch.id AS taskID,sch.`value` AS rule,sch.`enable` AS `taskStatus`,u.`name` AS creator,sch.update_time AS updateTime
|
SELECT apiTest.`name` AS scenario,sch.id AS taskID,sch.`value` AS rule,sch.`enable` AS `taskStatus`,u.`name` AS creator,sch.update_time AS updateTime
|
||||||
FROM api_test apiTest
|
FROM api_test apiTest
|
||||||
INNER JOIN `schedule` sch ON apiTest.id = sch.resource_id
|
INNER JOIN `schedule` sch ON apiTest.id = sch.resource_id
|
||||||
|
@ -2,6 +2,7 @@ package io.metersphere.controller;
|
|||||||
|
|
||||||
import com.github.pagehelper.Page;
|
import com.github.pagehelper.Page;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import io.metersphere.base.domain.Schedule;
|
||||||
import io.metersphere.controller.request.QueryScheduleRequest;
|
import io.metersphere.controller.request.QueryScheduleRequest;
|
||||||
import io.metersphere.dto.ScheduleDao;
|
import io.metersphere.dto.ScheduleDao;
|
||||||
import io.metersphere.service.ScheduleService;
|
import io.metersphere.service.ScheduleService;
|
||||||
@ -22,4 +23,9 @@ public class ScheduleController {
|
|||||||
return scheduleService.list(request);
|
return scheduleService.list(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/findOne/{testId}/{group}")
|
||||||
|
public Schedule schedule(@PathVariable String testId,@PathVariable String group) {
|
||||||
|
Schedule schedule = scheduleService.getScheduleByResource(testId,group);
|
||||||
|
return schedule;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,5 +11,5 @@ public class TestOverview {
|
|||||||
private String avgResponseTime;
|
private String avgResponseTime;
|
||||||
private String responseTime90;
|
private String responseTime90;
|
||||||
private String avgBandwidth;
|
private String avgBandwidth;
|
||||||
|
private String avgTransactions;
|
||||||
}
|
}
|
||||||
|
@ -30,8 +30,8 @@ public abstract class AbstractEngine implements Engine {
|
|||||||
protected Integer threadNum;
|
protected Integer threadNum;
|
||||||
protected List<TestResource> resourceList;
|
protected List<TestResource> resourceList;
|
||||||
|
|
||||||
private TestResourcePoolService testResourcePoolService;
|
private final TestResourcePoolService testResourcePoolService;
|
||||||
private TestResourceService testResourceService;
|
private final TestResourceService testResourceService;
|
||||||
|
|
||||||
public AbstractEngine() {
|
public AbstractEngine() {
|
||||||
testResourcePoolService = CommonBeanFactory.getBean(TestResourcePoolService.class);
|
testResourcePoolService = CommonBeanFactory.getBean(TestResourcePoolService.class);
|
||||||
@ -62,6 +62,11 @@ public abstract class AbstractEngine implements Engine {
|
|||||||
&& !ResourcePoolTypeEnum.NODE.name().equals(resourcePool.getType())) {
|
&& !ResourcePoolTypeEnum.NODE.name().equals(resourcePool.getType())) {
|
||||||
MSException.throwException("Invalid Resource Pool type.");
|
MSException.throwException("Invalid Resource Pool type.");
|
||||||
}
|
}
|
||||||
|
// image
|
||||||
|
String image = resourcePool.getImage();
|
||||||
|
if (StringUtils.isNotEmpty(image)) {
|
||||||
|
JMETER_IMAGE = image;
|
||||||
|
}
|
||||||
this.resourceList = testResourceService.getResourcesByPoolId(resourcePool.getId());
|
this.resourceList = testResourceService.getResourcesByPoolId(resourcePool.getId());
|
||||||
if (CollectionUtils.isEmpty(this.resourceList)) {
|
if (CollectionUtils.isEmpty(this.resourceList)) {
|
||||||
MSException.throwException("Test Resource is empty");
|
MSException.throwException("Test Resource is empty");
|
||||||
|
@ -193,11 +193,13 @@ public class ReportService {
|
|||||||
|
|
||||||
public List<LogDetailDTO> getReportLogResource(String reportId) {
|
public List<LogDetailDTO> getReportLogResource(String reportId) {
|
||||||
List<LogDetailDTO> result = new ArrayList<>();
|
List<LogDetailDTO> result = new ArrayList<>();
|
||||||
List<String> resourceIds = extLoadTestReportMapper.selectResourceId(reportId);
|
List<String> resourceIdAndIndexes = extLoadTestReportMapper.selectResourceId(reportId);
|
||||||
resourceIds.forEach(resourceId -> {
|
resourceIdAndIndexes.forEach(resourceIdAndIndex -> {
|
||||||
LogDetailDTO detailDTO = new LogDetailDTO();
|
LogDetailDTO detailDTO = new LogDetailDTO();
|
||||||
|
String[] split = StringUtils.split(resourceIdAndIndex, "_");
|
||||||
|
String resourceId = split[0];
|
||||||
TestResource testResource = testResourceService.getTestResource(resourceId);
|
TestResource testResource = testResourceService.getTestResource(resourceId);
|
||||||
detailDTO.setResourceId(resourceId);
|
detailDTO.setResourceId(resourceIdAndIndex);
|
||||||
if (testResource == null) {
|
if (testResource == null) {
|
||||||
detailDTO.setResourceName(resourceId);
|
detailDTO.setResourceName(resourceId);
|
||||||
result.add(detailDTO);
|
result.add(detailDTO);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package io.metersphere.service;
|
package io.metersphere.service;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import io.metersphere.api.dto.dataCount.response.TaskInfoResult;
|
import io.metersphere.api.dto.datacount.response.TaskInfoResult;
|
||||||
import io.metersphere.base.domain.Schedule;
|
import io.metersphere.base.domain.Schedule;
|
||||||
import io.metersphere.base.domain.ScheduleExample;
|
import io.metersphere.base.domain.ScheduleExample;
|
||||||
import io.metersphere.base.domain.User;
|
import io.metersphere.base.domain.User;
|
||||||
|
@ -16,7 +16,7 @@ CREATE TABLE `api_scenario` (
|
|||||||
`follow_people` varchar(100) DEFAULT NULL COMMENT 'api scenario Follow people ',
|
`follow_people` varchar(100) DEFAULT NULL COMMENT 'api scenario Follow people ',
|
||||||
`schedule` varchar(255) DEFAULT NULL COMMENT 'Test schedule (cron list)',
|
`schedule` varchar(255) DEFAULT NULL COMMENT 'Test schedule (cron list)',
|
||||||
`scenario_definition` longtext COMMENT 'Test scenario_definition json',
|
`scenario_definition` longtext COMMENT 'Test scenario_definition json',
|
||||||
`description` varchar(255) DEFAULT NULL COMMENT 'api scenario description',
|
`description` longtext DEFAULT NULL COMMENT 'api scenario description',
|
||||||
`create_time` bigint(13) NOT NULL COMMENT 'Create timestamp',
|
`create_time` bigint(13) NOT NULL COMMENT 'Create timestamp',
|
||||||
`update_time` bigint(13) NOT NULL COMMENT 'Update timestamp',
|
`update_time` bigint(13) NOT NULL COMMENT 'Update timestamp',
|
||||||
`pass_rate` varchar(100) DEFAULT NULL,
|
`pass_rate` varchar(100) DEFAULT NULL,
|
||||||
@ -43,12 +43,13 @@ CREATE TABLE `api_scenario_report` (
|
|||||||
`id` varchar(50) NOT NULL COMMENT 'Test report ID',
|
`id` varchar(50) NOT NULL COMMENT 'Test report ID',
|
||||||
`project_id` varchar(50) NOT NULL COMMENT 'scenario ID this test report belongs to',
|
`project_id` varchar(50) NOT NULL COMMENT 'scenario ID this test report belongs to',
|
||||||
`name` varchar(64) NOT NULL COMMENT 'Test report name',
|
`name` varchar(64) NOT NULL COMMENT 'Test report name',
|
||||||
`description` varchar(255) DEFAULT NULL COMMENT 'Test report name',
|
`description` longtext DEFAULT NULL COMMENT 'Test report name',
|
||||||
`create_time` bigint(13) NOT NULL COMMENT 'Create timestamp',
|
`create_time` bigint(13) NOT NULL COMMENT 'Create timestamp',
|
||||||
`update_time` bigint(13) NOT NULL COMMENT 'Update timestamp',
|
`update_time` bigint(13) NOT NULL COMMENT 'Update timestamp',
|
||||||
`status` varchar(64) NOT NULL COMMENT 'Status of this test run',
|
`status` varchar(64) NOT NULL COMMENT 'Status of this test run',
|
||||||
`user_id` varchar(64) DEFAULT NULL,
|
`user_id` varchar(64) DEFAULT NULL,
|
||||||
`trigger_mode` varchar(64) DEFAULT NULL,
|
`trigger_mode` varchar(64) DEFAULT NULL,
|
||||||
|
`execute_type` varchar(200) NULL,
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||||
|
|
||||||
@ -57,14 +58,4 @@ CREATE TABLE `api_scenario_report_detail` (
|
|||||||
`project_id` varchar(64) NOT NULL COMMENT 'scenario ID',
|
`project_id` varchar(64) NOT NULL COMMENT 'scenario ID',
|
||||||
`content` longblob COMMENT 'Report Content',
|
`content` longblob COMMENT 'Report Content',
|
||||||
PRIMARY KEY (`report_id`)
|
PRIMARY KEY (`report_id`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
|
||||||
|
|
||||||
CREATE TABLE `api_tag` (
|
|
||||||
`id` varchar(50) NOT NULL COMMENT 'Test ID',
|
|
||||||
`project_id` varchar(50) NOT NULL COMMENT 'Project ID this test belongs to',
|
|
||||||
`name` varchar(200) NOT NULL COMMENT 'api tag',
|
|
||||||
`user_id` varchar(64) DEFAULT NULL COMMENT 'User ID',
|
|
||||||
`create_time` bigint(13) NOT NULL COMMENT 'Create timestamp',
|
|
||||||
`update_time` bigint(13) NOT NULL COMMENT 'Update timestamp',
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
@ -21,7 +21,7 @@ CREATE TABLE IF NOT EXISTS `api_definition` (
|
|||||||
`protocol` varchar(255) NOT NULL COMMENT 'request protocol',
|
`protocol` varchar(255) NOT NULL COMMENT 'request protocol',
|
||||||
`path` varchar(1000) DEFAULT NULL COMMENT 'request path',
|
`path` varchar(1000) DEFAULT NULL COMMENT 'request path',
|
||||||
`module_path` varchar(1000) COMMENT 'module path',
|
`module_path` varchar(1000) COMMENT 'module path',
|
||||||
`description` varchar(255) DEFAULT NULL COMMENT 'Test description',
|
`description` longtext DEFAULT NULL COMMENT 'Test description',
|
||||||
`environment_id` varchar(50) DEFAULT NULL COMMENT 'environment id',
|
`environment_id` varchar(50) DEFAULT NULL COMMENT 'environment id',
|
||||||
`request` longtext COMMENT 'request (JSON format)',
|
`request` longtext COMMENT 'request (JSON format)',
|
||||||
`response` longtext COMMENT 'request (JSON format)',
|
`response` longtext COMMENT 'request (JSON format)',
|
||||||
@ -40,7 +40,7 @@ CREATE TABLE IF NOT EXISTS `api_test_case` (
|
|||||||
`name` varchar(64) NOT NULL COMMENT 'Test name',
|
`name` varchar(64) NOT NULL COMMENT 'Test name',
|
||||||
`priority` varchar(64) NOT NULL COMMENT 'priority',
|
`priority` varchar(64) NOT NULL COMMENT 'priority',
|
||||||
`api_definition_id` varchar(50) NOT NULL COMMENT 'api definition id',
|
`api_definition_id` varchar(50) NOT NULL COMMENT 'api definition id',
|
||||||
`description` varchar(255) DEFAULT NULL COMMENT 'Test description',
|
`description` longtext DEFAULT NULL COMMENT 'Test description',
|
||||||
`request` longtext COMMENT 'request (JSON format)',
|
`request` longtext COMMENT 'request (JSON format)',
|
||||||
`response` longtext COMMENT 'response (JSON format)',
|
`response` longtext COMMENT 'response (JSON format)',
|
||||||
`create_user_id` varchar(64) DEFAULT NULL COMMENT 'User ID',
|
`create_user_id` varchar(64) DEFAULT NULL COMMENT 'User ID',
|
||||||
@ -59,6 +59,7 @@ CREATE TABLE IF NOT EXISTS `api_definition_exec_result` (
|
|||||||
`user_id` varchar(64) DEFAULT NULL COMMENT 'User ID',
|
`user_id` varchar(64) DEFAULT NULL COMMENT 'User ID',
|
||||||
`start_time` bigint(13) NOT NULL COMMENT 'Create timestamp',
|
`start_time` bigint(13) NOT NULL COMMENT 'Create timestamp',
|
||||||
`end_time` bigint(13) NOT NULL COMMENT 'Update timestamp',
|
`end_time` bigint(13) NOT NULL COMMENT 'Update timestamp',
|
||||||
|
`create_time` bigint(13) NULL COMMENT 'Create time',
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||||
|
|
@ -1 +0,0 @@
|
|||||||
ALTER TABLE api_definition_exec_result ADD create_time BIGINT(13) NULL;
|
|
@ -1,5 +1 @@
|
|||||||
ALTER TABLE api_scenario_report ADD execute_type varchar(200) NULL;
|
ALTER TABLE api_scenario CHANGE tag_id tags varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT 'tag list';
|
||||||
ALTER TABLE api_definition MODIFY COLUMN description LONGTEXT NULL COMMENT 'Test description';
|
|
||||||
ALTER TABLE api_test_case MODIFY COLUMN description LONGTEXT NULL COMMENT 'Test case description';
|
|
||||||
ALTER TABLE api_scenario MODIFY COLUMN description LONGTEXT NULL COMMENT 'Api scenario description';
|
|
||||||
ALTER TABLE api_scenario_report MODIFY COLUMN description LONGTEXT NULL COMMENT 'Api scenario report description';
|
|
@ -0,0 +1,2 @@
|
|||||||
|
ALTER TABLE test_resource_pool
|
||||||
|
ADD image VARCHAR(100) NULL;
|
@ -64,7 +64,7 @@
|
|||||||
|
|
||||||
<!--要生成的数据库表 -->
|
<!--要生成的数据库表 -->
|
||||||
|
|
||||||
<table tableName="test_plan_api_scenario"/>
|
<table tableName="api_scenario"/>
|
||||||
<!--<table tableName="test_plan_api_scenario"/>-->
|
<!--<table tableName="test_plan_api_scenario"/>-->
|
||||||
<!--<table tableName="test_plan"/>-->
|
<!--<table tableName="test_plan"/>-->
|
||||||
<!--<table tableName="api_scenario_report"/>-->
|
<!--<table tableName="api_scenario_report"/>-->
|
||||||
|
@ -17,29 +17,30 @@
|
|||||||
"@fortawesome/vue-fontawesome": "^0.1.9",
|
"@fortawesome/vue-fontawesome": "^0.1.9",
|
||||||
"axios": "^0.19.0",
|
"axios": "^0.19.0",
|
||||||
"core-js": "^3.4.3",
|
"core-js": "^3.4.3",
|
||||||
|
"diffable-html": "^4.0.0",
|
||||||
"echarts": "^4.6.0",
|
"echarts": "^4.6.0",
|
||||||
|
"el-table-infinite-scroll": "^1.0.10",
|
||||||
"element-ui": "^2.13.0",
|
"element-ui": "^2.13.0",
|
||||||
|
"html2canvas": "^1.0.0-rc.7",
|
||||||
|
"js-base64": "^3.4.4",
|
||||||
|
"json-bigint": "^1.0.0",
|
||||||
|
"jsoneditor": "^9.1.2",
|
||||||
|
"jspdf": "^2.1.1",
|
||||||
|
"md5": "^2.3.0",
|
||||||
|
"mockjs": "^1.1.0",
|
||||||
|
"nprogress": "^0.2.0",
|
||||||
|
"sha.js": "^2.4.11",
|
||||||
"vue": "^2.6.10",
|
"vue": "^2.6.10",
|
||||||
|
"vue-calendar-heatmap": "^0.8.4",
|
||||||
"vue-echarts": "^4.1.0",
|
"vue-echarts": "^4.1.0",
|
||||||
"vue-i18n": "^8.15.3",
|
"vue-i18n": "^8.15.3",
|
||||||
|
"vue-input-tag": "^2.0.7",
|
||||||
|
"vue-pdf": "^4.2.0",
|
||||||
"vue-router": "^3.1.3",
|
"vue-router": "^3.1.3",
|
||||||
"vuedraggable": "^2.23.2",
|
"vuedraggable": "^2.23.2",
|
||||||
"vuex": "^3.1.2",
|
"vuex": "^3.1.2",
|
||||||
"vue-calendar-heatmap": "^0.8.4",
|
|
||||||
"mockjs": "^1.1.0",
|
|
||||||
"md5": "^2.3.0",
|
|
||||||
"sha.js": "^2.4.11",
|
|
||||||
"js-base64": "^3.4.4",
|
|
||||||
"json-bigint": "^1.0.0",
|
|
||||||
"html2canvas": "^1.0.0-rc.7",
|
|
||||||
"jspdf": "^2.1.1",
|
|
||||||
"yan-progress": "^1.0.3",
|
|
||||||
"nprogress": "^0.2.0",
|
|
||||||
"el-table-infinite-scroll": "^1.0.10",
|
|
||||||
"vue-pdf": "^4.2.0",
|
|
||||||
"diffable-html": "^4.0.0",
|
|
||||||
"xml-js": "^1.6.11",
|
"xml-js": "^1.6.11",
|
||||||
"jsoneditor": "^9.1.2"
|
"yan-progress": "^1.0.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@vue/cli-plugin-babel": "^4.1.0",
|
"@vue/cli-plugin-babel": "^4.1.0",
|
||||||
|
@ -73,7 +73,6 @@
|
|||||||
methods: {
|
methods: {
|
||||||
active() {
|
active() {
|
||||||
this.isActive = !this.isActive;
|
this.isActive = !this.isActive;
|
||||||
console.log(this.request)
|
|
||||||
//this.$emit("requestResult", {request: this.request, scenarioName: this.scenarioName});
|
//this.$emit("requestResult", {request: this.request, scenarioName: this.scenarioName});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -59,7 +59,6 @@
|
|||||||
methods: {
|
methods: {
|
||||||
active() {
|
active() {
|
||||||
this.isActive = !this.isActive;
|
this.isActive = !this.isActive;
|
||||||
console.log(this.request)
|
|
||||||
//this.$emit("requestResult", {request: this.request, scenarioName: this.scenarioName});
|
//this.$emit("requestResult", {request: this.request, scenarioName: this.scenarioName});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -1,126 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-dialog :close-on-click-modal="false" :title="$t('api_test.automation.create_tag')" :visible.sync="visible"
|
|
||||||
width="45%"
|
|
||||||
:destroy-on-close="true">
|
|
||||||
<el-form :model="tagForm" label-position="right" label-width="80px" size="small" :rules="rule" ref="tagForm">
|
|
||||||
<el-form-item :label="$t('commons.name')" prop="name">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="20">
|
|
||||||
<el-input v-model="tagForm.name" autocomplete="off" :placeholder="$t('commons.name')"/>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="4">
|
|
||||||
<el-button style="margin-left: 20px" @click="saveTag">{{$t('commons.save')}}</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<el-table :data="tagData" row-key="id">
|
|
||||||
|
|
||||||
<el-table-column prop="name" :label="$t('commons.name')" show-overflow-tooltip/>
|
|
||||||
<el-table-column :label="$t('commons.operating')" min-width="130" align="center">
|
|
||||||
<template v-slot:default="scope">
|
|
||||||
<el-button type="text" @click="editApi(scope.row)">{{$t('commons.edit')}}</el-button>
|
|
||||||
<el-button type="text" @click="handleDelete(scope.row)" style="color: #F56C6C">{{$t('commons.delete')}}</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
<ms-table-pagination :change="initTable" :current-page.sync="currentPage" :page-size.sync="pageSize"
|
|
||||||
:total="total"/>
|
|
||||||
<template v-slot:footer>
|
|
||||||
<ms-dialog-footer
|
|
||||||
@cancel="confirm"
|
|
||||||
@confirm="confirm">
|
|
||||||
</ms-dialog-footer>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import {WORKSPACE_ID} from '@/common/js/constants';
|
|
||||||
import {getCurrentUser, getUUID, getCurrentProjectID} from "@/common/js/utils";
|
|
||||||
import MsDialogFooter from "@/business/components/common/components/MsDialogFooter";
|
|
||||||
import MsTablePagination from "../../../common/pagination/TablePagination";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "MsAddTag",
|
|
||||||
components: {MsDialogFooter, MsTablePagination},
|
|
||||||
props: {},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
tagForm: {},
|
|
||||||
visible: false,
|
|
||||||
currentModule: {},
|
|
||||||
projectId: "",
|
|
||||||
userOptions: [],
|
|
||||||
currentPage: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
total: 0,
|
|
||||||
tagData: [],
|
|
||||||
path: "/api/tag/create",
|
|
||||||
rule: {
|
|
||||||
name: [
|
|
||||||
{required: true, message: this.$t('test_track.case.input_name'), trigger: 'blur'},
|
|
||||||
{max: 50, message: this.$t('test_track.length_less_than') + '50', trigger: 'blur'}
|
|
||||||
],
|
|
||||||
principal: [{
|
|
||||||
required: true,
|
|
||||||
message: this.$t('api_test.automation.scenario.select_principal'),
|
|
||||||
trigger: 'change'
|
|
||||||
}],
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
saveTag() {
|
|
||||||
if (this.tagForm.id != undefined && this.tagForm.id != null) {
|
|
||||||
this.path = "/api/tag/update";
|
|
||||||
} else {
|
|
||||||
this.path = "/api/tag/create";
|
|
||||||
this.tagForm.id = getUUID();
|
|
||||||
}
|
|
||||||
this.$refs['tagForm'].validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
this.setParameter();
|
|
||||||
this.result = this.$post(this.path, this.tagForm, () => {
|
|
||||||
this.$success(this.$t('commons.save_success'));
|
|
||||||
this.initTable();
|
|
||||||
this.tagForm = {};
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
setParameter() {
|
|
||||||
this.tagForm.projectId = this.projectId;
|
|
||||||
},
|
|
||||||
open() {
|
|
||||||
this.projectId = getCurrentProjectID();
|
|
||||||
this.visible = true;
|
|
||||||
this.initTable();
|
|
||||||
},
|
|
||||||
initTable() {
|
|
||||||
let condition = {};
|
|
||||||
condition.projectId = this.projectId;
|
|
||||||
this.result = this.$post("/api/tag/getTgas/" + this.currentPage + "/" + this.pageSize, condition, response => {
|
|
||||||
this.total = response.data.itemCount;
|
|
||||||
this.tagData = response.data.listObject;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
editApi(row) {
|
|
||||||
this.tagForm = row;
|
|
||||||
},
|
|
||||||
handleDelete(row) {
|
|
||||||
this.result = this.$get("/api/tag/delete/" + row.id, response => {
|
|
||||||
this.$success(this.$t('commons.delete_success'));
|
|
||||||
this.initTable();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
confirm() {
|
|
||||||
this.visible = false
|
|
||||||
this.$emit('refreshTags');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
@ -2,18 +2,18 @@
|
|||||||
<div v-loading="loading">
|
<div v-loading="loading">
|
||||||
<el-card>
|
<el-card>
|
||||||
<el-row>
|
<el-row>
|
||||||
<div class="el-step__icon is-text ms-api-col" v-if="request.referenced!=undefined && request.referenced==='Deleted' || request.referenced=='REF'">
|
<div class="el-step__icon is-text ms-api-col" v-if="request.referenced!=undefined && request.referenced==='Deleted' || request.referenced=='REF' || request.referenced==='Copy'">
|
||||||
<div class="el-step__icon-inner">{{request.index}}</div>
|
<div class="el-step__icon-inner">{{request.index}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="el-step__icon is-text ms-api-col-create" v-else>
|
<div class="el-step__icon is-text ms-api-col-create" v-else>
|
||||||
<div class="el-step__icon-inner">{{request.index}}</div>
|
<div class="el-step__icon-inner">{{request.index}}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-button v-if="request.referenced!=undefined && request.referenced==='Deleted' || request.referenced=='REF'" class="ms-left-buttion" size="small">
|
<el-button v-if="request.referenced!=undefined && request.referenced==='Deleted' || request.referenced=='REF' || request.referenced==='Copy'" class="ms-left-buttion" size="small">
|
||||||
{{$t('api_test.automation.api_list_import')}}
|
{{$t('api_test.automation.api_list_import')}}
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<el-button v-if="request.referenced==undefined || request.referenced==='Created' || request.referenced==='Copy'" class="ms-create-buttion" size="small">
|
<el-button v-if="request.referenced==undefined || request.referenced==='Created' " class="ms-create-buttion" size="small">
|
||||||
{{$t('api_test.automation.customize_req')}}
|
{{$t('api_test.automation.customize_req')}}
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
@ -21,6 +21,7 @@
|
|||||||
<el-input size="small" v-model="request.name" style="width: 40%;" :placeholder="$t('commons.input_name')" v-else/>
|
<el-input size="small" v-model="request.name" style="width: 40%;" :placeholder="$t('commons.input_name')" v-else/>
|
||||||
|
|
||||||
<el-tag size="mini" style="margin-left: 20px" v-if="request.referenced==='Deleted'" type="danger">{{$t('api_test.automation.reference_deleted')}}</el-tag>
|
<el-tag size="mini" style="margin-left: 20px" v-if="request.referenced==='Deleted'" type="danger">{{$t('api_test.automation.reference_deleted')}}</el-tag>
|
||||||
|
<el-tag size="mini" style="margin-left: 20px" v-if="request.referenced==='Copy'">{{ $t('commons.copy') }}</el-tag>
|
||||||
<el-tag size="mini" style="margin-left: 20px" v-if="request.referenced ==='REF'">{{ $t('api_test.scenario.reference') }}</el-tag>
|
<el-tag size="mini" style="margin-left: 20px" v-if="request.referenced ==='REF'">{{ $t('api_test.scenario.reference') }}</el-tag>
|
||||||
<div style="margin-right: 20px; float: right">
|
<div style="margin-right: 20px; float: right">
|
||||||
<i class="icon el-icon-arrow-right" :class="{'is-active': request.active}"
|
<i class="icon el-icon-arrow-right" :class="{'is-active': request.active}"
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<el-card>
|
<el-card>
|
||||||
<el-form :model="request" :rules="rules" label-width="auto" ref="request">
|
<el-form :model="request" :rules="rules" label-width="auto" ref="request">
|
||||||
<el-form-item :label="$t('api_test.request.assertions.script_name')" prop="name">
|
<el-form-item :label="$t('api_test.request.name')" prop="name">
|
||||||
<el-input v-model="request.name" maxlength="200" show-word-limit size="small"/>
|
<el-input v-model="request.name" maxlength="200" show-word-limit size="small"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('api_test.definition.api_type')" prop="protocol">
|
<el-form-item :label="$t('api_test.definition.api_type')" prop="protocol">
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
<el-button class="ms-title-buttion" size="small">{{$t('api_test.automation.scenario_import')}}</el-button>
|
<el-button class="ms-title-buttion" size="small">{{$t('api_test.automation.scenario_import')}}</el-button>
|
||||||
{{scenario.name}}
|
{{scenario.name}}
|
||||||
<el-tag size="mini" style="margin-left: 20px" v-if="scenario.referenced==='Deleted'" type="danger">{{$t('api_test.automation.reference_deleted')}}</el-tag>
|
<el-tag size="mini" style="margin-left: 20px" v-if="scenario.referenced==='Deleted'" type="danger">{{$t('api_test.automation.reference_deleted')}}</el-tag>
|
||||||
|
<el-tag size="mini" style="margin-left: 20px" v-if="scenario.referenced==='Copy'">{{ $t('commons.copy') }}</el-tag>
|
||||||
<el-tag size="mini" style="margin-left: 20px" v-if="scenario.referenced==='REF'">{{ $t('api_test.scenario.reference') }}</el-tag>
|
<el-tag size="mini" style="margin-left: 20px" v-if="scenario.referenced==='REF'">{{ $t('api_test.scenario.reference') }}</el-tag>
|
||||||
<div style="margin-right: 20px; float: right">
|
<div style="margin-right: 20px; float: right">
|
||||||
<el-switch v-model="scenario.enable" style="margin-left: 10px"/>
|
<el-switch v-model="scenario.enable" style="margin-left: 10px"/>
|
||||||
|
@ -25,9 +25,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="tagNames" :label="$t('api_test.automation.tag')" width="200px">
|
<el-table-column prop="tags" :label="$t('api_test.automation.tag')" width="200px">
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<div v-for="itemName in scope.row.tagNames" :key="itemName">
|
<div v-for="(itemName,index) in scope.row.tags" :key="index">
|
||||||
<ms-tag type="success" effect="plain" :content="itemName"/>
|
<ms-tag type="success" effect="plain" :content="itemName"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -167,6 +167,11 @@
|
|||||||
let data = response.data;
|
let data = response.data;
|
||||||
this.total = data.itemCount;
|
this.total = data.itemCount;
|
||||||
this.tableData = data.listObject;
|
this.tableData = data.listObject;
|
||||||
|
this.tableData.forEach(item => {
|
||||||
|
if (item.tags && item.tags.length > 0) {
|
||||||
|
item.tags = JSON.parse(item.tags);
|
||||||
|
}
|
||||||
|
})
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -79,25 +79,8 @@
|
|||||||
|
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="Tag" prop="tagId">
|
<el-form-item label="Tag" prop="tags">
|
||||||
<el-select v-model="currentScenario.tagId" size="small" class="ms-scenario-input" placeholder="Tag" :multiple="true">
|
<ms-input-tag :currentScenario="currentScenario" ref="tag"/>
|
||||||
<el-option
|
|
||||||
v-for="item in tags"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id"/>
|
|
||||||
<el-button size="mini" type="primary" @click="openTagConfig" class="ms-scenario-button">
|
|
||||||
{{ $t('api_test.automation.create_tag') }}
|
|
||||||
</el-button>
|
|
||||||
<template v-slot:empty>
|
|
||||||
<div>
|
|
||||||
<el-button size="mini" type="primary" @click="openTagConfig" class="ms-scenario-button">
|
|
||||||
{{ $t('api_test.automation.create_tag') }}
|
|
||||||
</el-button>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-select>
|
|
||||||
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@ -123,21 +106,21 @@
|
|||||||
<!-- 调试部分 -->
|
<!-- 调试部分 -->
|
||||||
<div class="ms-debug-div" @click="showAll">
|
<div class="ms-debug-div" @click="showAll">
|
||||||
<el-row style="margin: 5px">
|
<el-row style="margin: 5px">
|
||||||
<el-col :span="6" class="ms-col-one">
|
<el-col :span="6" class="ms-col-one ms-font">
|
||||||
{{currentScenario.name ===undefined || ''? $t('api_test.scenario.name') : currentScenario.name}}
|
{{currentScenario.name ===undefined || ''? $t('api_test.scenario.name') : currentScenario.name}}
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="3" class="ms-col-one">
|
<el-col :span="3" class="ms-col-one ms-font">
|
||||||
{{$t('api_test.automation.step_total')}}:{{scenarioDefinition.length}}
|
{{$t('api_test.automation.step_total')}}:{{scenarioDefinition.length}}
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="3" class="ms-col-one">
|
<el-col :span="3" class="ms-col-one ms-font">
|
||||||
<el-link class="head" @click="showScenarioParameters">{{$t('api_test.automation.scenario_total')}}</el-link>
|
<el-link class="head" @click="showScenarioParameters">{{$t('api_test.automation.scenario_total')}}</el-link>
|
||||||
:{{this.currentScenario.variables!=undefined?this.currentScenario.variables.length-1: 0}}
|
:{{this.currentScenario.variables!=undefined?this.currentScenario.variables.length-1: 0}}
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="3">
|
<el-col :span="3" class="ms-col-one ms-font">
|
||||||
<el-checkbox v-model="enableCookieShare" style="margin-top: 5px">{{ '共享cookie' }}</el-checkbox>
|
<el-checkbox v-model="enableCookieShare">共享cookie</el-checkbox>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="7">
|
<el-col :span="7" class="ms-font">
|
||||||
{{$t('api_test.definition.request.run_env')}}:
|
{{$t('api_test.definition.request.run_env')}}:
|
||||||
<el-select v-model="currentEnvironmentId" size="small" class="ms-htt-width"
|
<el-select v-model="currentEnvironmentId" size="small" class="ms-htt-width"
|
||||||
:placeholder="$t('api_test.definition.request.run_env')"
|
:placeholder="$t('api_test.definition.request.run_env')"
|
||||||
clearable>
|
clearable>
|
||||||
@ -259,8 +242,6 @@
|
|||||||
<!-- 环境 -->
|
<!-- 环境 -->
|
||||||
<api-environment-config ref="environmentConfig" @close="environmentConfigClose"/>
|
<api-environment-config ref="environmentConfig" @close="environmentConfigClose"/>
|
||||||
|
|
||||||
<!--TAG-->
|
|
||||||
<ms-add-tag @refreshTags="refreshTags" ref="tag"/>
|
|
||||||
<!--执行组件-->
|
<!--执行组件-->
|
||||||
<ms-run :debug="true" :environment="currentEnvironmentId" :reportId="reportId" :run-data="debugData"
|
<ms-run :debug="true" :environment="currentEnvironmentId" :reportId="reportId" :run-data="debugData"
|
||||||
@runRefresh="runRefresh" ref="runTest"/>
|
@runRefresh="runRefresh" ref="runTest"/>
|
||||||
@ -293,13 +274,14 @@
|
|||||||
import MsApiCustomize from "./ApiCustomize";
|
import MsApiCustomize from "./ApiCustomize";
|
||||||
import {getUUID, getCurrentProjectID} from "@/common/js/utils";
|
import {getUUID, getCurrentProjectID} from "@/common/js/utils";
|
||||||
import ApiEnvironmentConfig from "../../definition/components/environment/ApiEnvironmentConfig";
|
import ApiEnvironmentConfig from "../../definition/components/environment/ApiEnvironmentConfig";
|
||||||
import MsAddTag from "./AddTag";
|
import MsInputTag from "./MsInputTag";
|
||||||
import MsRun from "./DebugRun";
|
import MsRun from "./DebugRun";
|
||||||
import MsImportApiScenario from "./ImportApiScenario";
|
import MsImportApiScenario from "./ImportApiScenario";
|
||||||
import MsApiScenarioComponent from "./ApiScenarioComponent";
|
import MsApiScenarioComponent from "./ApiScenarioComponent";
|
||||||
import MsApiReportDetail from "../report/ApiReportDetail";
|
import MsApiReportDetail from "../report/ApiReportDetail";
|
||||||
import MsScenarioParameters from "./ScenarioParameters";
|
import MsScenarioParameters from "./ScenarioParameters";
|
||||||
import ApiImport from "../../definition/components/import/ApiImport";
|
import ApiImport from "../../definition/components/import/ApiImport";
|
||||||
|
import InputTag from 'vue-input-tag'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "EditApiScenario",
|
name: "EditApiScenario",
|
||||||
@ -311,7 +293,7 @@
|
|||||||
ApiEnvironmentConfig,
|
ApiEnvironmentConfig,
|
||||||
MsScenarioParameters,
|
MsScenarioParameters,
|
||||||
MsApiReportDetail,
|
MsApiReportDetail,
|
||||||
MsAddTag, MsRun,
|
MsInputTag, MsRun,
|
||||||
MsApiScenarioComponent,
|
MsApiScenarioComponent,
|
||||||
MsImportApiScenario,
|
MsImportApiScenario,
|
||||||
MsJsr233Processor,
|
MsJsr233Processor,
|
||||||
@ -323,6 +305,7 @@
|
|||||||
MsApiComponent,
|
MsApiComponent,
|
||||||
MsApiCustomize,
|
MsApiCustomize,
|
||||||
ApiImport,
|
ApiImport,
|
||||||
|
InputTag,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -341,7 +324,6 @@
|
|||||||
principal: [{required: true, message: this.$t('api_test.definition.request.responsible'), trigger: 'change'}],
|
principal: [{required: true, message: this.$t('api_test.definition.request.responsible'), trigger: 'change'}],
|
||||||
},
|
},
|
||||||
environments: [],
|
environments: [],
|
||||||
tags: [],
|
|
||||||
currentEnvironmentId: "",
|
currentEnvironmentId: "",
|
||||||
maintainerOptions: [],
|
maintainerOptions: [],
|
||||||
value: API_STATUS[0].id,
|
value: API_STATUS[0].id,
|
||||||
@ -366,7 +348,8 @@
|
|||||||
visibleRef: "",
|
visibleRef: "",
|
||||||
enableCookieShare: false,
|
enableCookieShare: false,
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
|
,
|
||||||
created() {
|
created() {
|
||||||
if (!this.currentScenario.apiScenarioModuleId) {
|
if (!this.currentScenario.apiScenarioModuleId) {
|
||||||
this.currentScenario.apiScenarioModuleId = "";
|
this.currentScenario.apiScenarioModuleId = "";
|
||||||
@ -374,11 +357,12 @@
|
|||||||
this.projectId = getCurrentProjectID();
|
this.projectId = getCurrentProjectID();
|
||||||
this.operatingElements = ELEMENTS.get("ALL");
|
this.operatingElements = ELEMENTS.get("ALL");
|
||||||
this.getMaintainerOptions();
|
this.getMaintainerOptions();
|
||||||
this.refreshTags();
|
|
||||||
this.getApiScenario();
|
this.getApiScenario();
|
||||||
this.getEnvironments();
|
this.getEnvironments();
|
||||||
},
|
}
|
||||||
watch: {},
|
,
|
||||||
|
watch: {}
|
||||||
|
,
|
||||||
methods: {
|
methods: {
|
||||||
addComponent(type) {
|
addComponent(type) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
@ -423,7 +407,8 @@
|
|||||||
}
|
}
|
||||||
this.sort();
|
this.sort();
|
||||||
this.reload();
|
this.reload();
|
||||||
},
|
}
|
||||||
|
,
|
||||||
nodeClick(e) {
|
nodeClick(e) {
|
||||||
if (e.referenced != 'REF' && e.referenced != 'Deleted') {
|
if (e.referenced != 'REF' && e.referenced != 'Deleted') {
|
||||||
this.operatingElements = ELEMENTS.get(e.type);
|
this.operatingElements = ELEMENTS.get(e.type);
|
||||||
@ -431,16 +416,19 @@
|
|||||||
this.operatingElements = [];
|
this.operatingElements = [];
|
||||||
}
|
}
|
||||||
this.selectedTreeNode = e;
|
this.selectedTreeNode = e;
|
||||||
},
|
}
|
||||||
|
,
|
||||||
showAll() {
|
showAll() {
|
||||||
this.operatingElements = ELEMENTS.get("ALL");
|
this.operatingElements = ELEMENTS.get("ALL");
|
||||||
this.selectedTreeNode = undefined;
|
this.selectedTreeNode = undefined;
|
||||||
this.reload();
|
this.reload();
|
||||||
},
|
}
|
||||||
|
,
|
||||||
apiListImport() {
|
apiListImport() {
|
||||||
this.visibleRef = getUUID();
|
this.visibleRef = getUUID();
|
||||||
this.apiListVisible = true;
|
this.apiListVisible = true;
|
||||||
},
|
}
|
||||||
|
,
|
||||||
recursiveSorting(arr) {
|
recursiveSorting(arr) {
|
||||||
for (let i in arr) {
|
for (let i in arr) {
|
||||||
arr[i].index = Number(i) + 1;
|
arr[i].index = Number(i) + 1;
|
||||||
@ -448,7 +436,8 @@
|
|||||||
this.recursiveSorting(arr[i].hashTree);
|
this.recursiveSorting(arr[i].hashTree);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
|
,
|
||||||
sort() {
|
sort() {
|
||||||
for (let i in this.scenarioDefinition) {
|
for (let i in this.scenarioDefinition) {
|
||||||
this.scenarioDefinition[i].index = Number(i) + 1;
|
this.scenarioDefinition[i].index = Number(i) + 1;
|
||||||
@ -456,7 +445,8 @@
|
|||||||
this.recursiveSorting(this.scenarioDefinition[i].hashTree);
|
this.recursiveSorting(this.scenarioDefinition[i].hashTree);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
|
,
|
||||||
addCustomizeApi(request) {
|
addCustomizeApi(request) {
|
||||||
this.customizeVisible = false;
|
this.customizeVisible = false;
|
||||||
request.enable === undefined ? request.enable = true : request.enable;
|
request.enable === undefined ? request.enable = true : request.enable;
|
||||||
@ -468,7 +458,8 @@
|
|||||||
this.customizeRequest = {};
|
this.customizeRequest = {};
|
||||||
this.sort();
|
this.sort();
|
||||||
this.reload();
|
this.reload();
|
||||||
},
|
}
|
||||||
|
,
|
||||||
addScenario(arr) {
|
addScenario(arr) {
|
||||||
if (arr && arr.length > 0) {
|
if (arr && arr.length > 0) {
|
||||||
arr.forEach(item => {
|
arr.forEach(item => {
|
||||||
@ -483,7 +474,8 @@
|
|||||||
this.sort();
|
this.sort();
|
||||||
this.reload();
|
this.reload();
|
||||||
this.scenarioVisible = false;
|
this.scenarioVisible = false;
|
||||||
},
|
}
|
||||||
|
,
|
||||||
setApiParameter(item, refType, referenced) {
|
setApiParameter(item, refType, referenced) {
|
||||||
let request = {};
|
let request = {};
|
||||||
if (Object.prototype.toString.call(item.request).indexOf("String") > 0) {
|
if (Object.prototype.toString.call(item.request).indexOf("String") > 0) {
|
||||||
@ -512,7 +504,8 @@
|
|||||||
} else {
|
} else {
|
||||||
this.scenarioDefinition.push(request);
|
this.scenarioDefinition.push(request);
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
|
,
|
||||||
pushApiOrCase(referenced) {
|
pushApiOrCase(referenced) {
|
||||||
if (this.currentRow.cases.length === 0 && this.currentRow.apis.length === 0) {
|
if (this.currentRow.cases.length === 0 && this.currentRow.apis.length === 0) {
|
||||||
this.$warning(this.$t('api_test.automation.reference_info'));
|
this.$warning(this.$t('api_test.automation.reference_info'));
|
||||||
@ -529,13 +522,15 @@
|
|||||||
this.currentRow.apis = [];
|
this.currentRow.apis = [];
|
||||||
this.sort();
|
this.sort();
|
||||||
this.reload();
|
this.reload();
|
||||||
},
|
}
|
||||||
|
,
|
||||||
getMaintainerOptions() {
|
getMaintainerOptions() {
|
||||||
let workspaceId = localStorage.getItem(WORKSPACE_ID);
|
let workspaceId = localStorage.getItem(WORKSPACE_ID);
|
||||||
this.$post('/user/ws/member/tester/list', {workspaceId: workspaceId}, response => {
|
this.$post('/user/ws/member/tester/list', {workspaceId: workspaceId}, response => {
|
||||||
this.maintainerOptions = response.data;
|
this.maintainerOptions = response.data;
|
||||||
});
|
});
|
||||||
},
|
}
|
||||||
|
,
|
||||||
openTagConfig() {
|
openTagConfig() {
|
||||||
if (!this.projectId) {
|
if (!this.projectId) {
|
||||||
this.$error(this.$t('api_test.select_project'));
|
this.$error(this.$t('api_test.select_project'));
|
||||||
@ -543,20 +538,6 @@
|
|||||||
}
|
}
|
||||||
this.$refs.tag.open();
|
this.$refs.tag.open();
|
||||||
},
|
},
|
||||||
refreshTags() {
|
|
||||||
let obj = {projectId: this.projectId};
|
|
||||||
let tagIds = [];
|
|
||||||
this.$post('/api/tag/list', obj, response => {
|
|
||||||
this.tags = response.data;
|
|
||||||
this.tags.forEach(item => {
|
|
||||||
tagIds.push(item.id);
|
|
||||||
})
|
|
||||||
if (this.currentScenario.tagId != undefined && this.currentScenario.tagId.length > 0) {
|
|
||||||
this.currentScenario.tagId = this.currentScenario.tagId.filter(id => tagIds.indexOf(id) != -1);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
},
|
|
||||||
remove(row, node) {
|
remove(row, node) {
|
||||||
const parent = node.parent
|
const parent = node.parent
|
||||||
const hashTree = parent.data.hashTree || parent.data;
|
const hashTree = parent.data.hashTree || parent.data;
|
||||||
@ -564,7 +545,8 @@
|
|||||||
hashTree.splice(index, 1);
|
hashTree.splice(index, 1);
|
||||||
this.sort();
|
this.sort();
|
||||||
this.reload();
|
this.reload();
|
||||||
},
|
}
|
||||||
|
,
|
||||||
copyRow(row, node) {
|
copyRow(row, node) {
|
||||||
const parent = node.parent
|
const parent = node.parent
|
||||||
const hashTree = parent.data.hashTree || parent.data;
|
const hashTree = parent.data.hashTree || parent.data;
|
||||||
@ -574,13 +556,15 @@
|
|||||||
hashTree.push(obj);
|
hashTree.push(obj);
|
||||||
this.sort();
|
this.sort();
|
||||||
this.reload();
|
this.reload();
|
||||||
},
|
}
|
||||||
|
,
|
||||||
reload() {
|
reload() {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
})
|
})
|
||||||
},
|
}
|
||||||
|
,
|
||||||
runDebug() {
|
runDebug() {
|
||||||
/*触发执行操作*/
|
/*触发执行操作*/
|
||||||
if (!this.currentEnvironmentId) {
|
if (!this.currentEnvironmentId) {
|
||||||
@ -593,7 +577,8 @@
|
|||||||
environmentId: this.currentEnvironmentId, hashTree: this.scenarioDefinition
|
environmentId: this.currentEnvironmentId, hashTree: this.scenarioDefinition
|
||||||
};
|
};
|
||||||
this.reportId = getUUID().substring(0, 8);
|
this.reportId = getUUID().substring(0, 8);
|
||||||
},
|
}
|
||||||
|
,
|
||||||
getEnvironments() {
|
getEnvironments() {
|
||||||
if (this.projectId) {
|
if (this.projectId) {
|
||||||
this.$get('/api/environment/list/' + this.projectId, response => {
|
this.$get('/api/environment/list/' + this.projectId, response => {
|
||||||
@ -603,17 +588,20 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
|
,
|
||||||
openEnvironmentConfig() {
|
openEnvironmentConfig() {
|
||||||
if (!this.projectId) {
|
if (!this.projectId) {
|
||||||
this.$error(this.$t('api_test.select_project'));
|
this.$error(this.$t('api_test.select_project'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.$refs.environmentConfig.open(this.projectId);
|
this.$refs.environmentConfig.open(this.projectId);
|
||||||
},
|
}
|
||||||
|
,
|
||||||
environmentConfigClose() {
|
environmentConfigClose() {
|
||||||
this.getEnvironments();
|
this.getEnvironments();
|
||||||
},
|
}
|
||||||
|
,
|
||||||
allowDrop(draggingNode, dropNode, dropType) {
|
allowDrop(draggingNode, dropNode, dropType) {
|
||||||
if (dropType != "inner") {
|
if (dropType != "inner") {
|
||||||
return true;
|
return true;
|
||||||
@ -622,21 +610,25 @@
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
},
|
}
|
||||||
|
,
|
||||||
allowDrag(draggingNode, dropNode, dropType) {
|
allowDrag(draggingNode, dropNode, dropType) {
|
||||||
this.sort();
|
this.sort();
|
||||||
this.reload();
|
this.reload();
|
||||||
},
|
}
|
||||||
|
,
|
||||||
nodeExpand(data) {
|
nodeExpand(data) {
|
||||||
if (data.resourceId) {
|
if (data.resourceId) {
|
||||||
this.expandedNode.push(data.resourceId);
|
this.expandedNode.push(data.resourceId);
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
|
,
|
||||||
nodeCollapse(data) {
|
nodeCollapse(data) {
|
||||||
if (data.resourceId) {
|
if (data.resourceId) {
|
||||||
this.expandedNode.splice(this.expandedNode.indexOf(data.resourceId), 1);
|
this.expandedNode.splice(this.expandedNode.indexOf(data.resourceId), 1);
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
|
,
|
||||||
getPath(id) {
|
getPath(id) {
|
||||||
if (id === null) {
|
if (id === null) {
|
||||||
return null;
|
return null;
|
||||||
@ -645,7 +637,8 @@
|
|||||||
return item.id === id ? item.path : "";
|
return item.id === id ? item.path : "";
|
||||||
});
|
});
|
||||||
return path[0].path;
|
return path[0].path;
|
||||||
},
|
}
|
||||||
|
,
|
||||||
setFiles(item, bodyUploadFiles, obj) {
|
setFiles(item, bodyUploadFiles, obj) {
|
||||||
if (item.body) {
|
if (item.body) {
|
||||||
if (item.body.kvs) {
|
if (item.body.kvs) {
|
||||||
@ -683,7 +676,8 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
|
,
|
||||||
recursiveFile(arr, bodyUploadFiles, obj) {
|
recursiveFile(arr, bodyUploadFiles, obj) {
|
||||||
arr.forEach(item => {
|
arr.forEach(item => {
|
||||||
this.setFiles(item, bodyUploadFiles, obj);
|
this.setFiles(item, bodyUploadFiles, obj);
|
||||||
@ -691,7 +685,8 @@
|
|||||||
this.recursiveFile(item.hashTree, bodyUploadFiles, obj);
|
this.recursiveFile(item.hashTree, bodyUploadFiles, obj);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
}
|
||||||
|
,
|
||||||
getBodyUploadFiles(obj) {
|
getBodyUploadFiles(obj) {
|
||||||
let bodyUploadFiles = [];
|
let bodyUploadFiles = [];
|
||||||
obj.bodyUploadIds = [];
|
obj.bodyUploadIds = [];
|
||||||
@ -702,7 +697,8 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
return bodyUploadFiles;
|
return bodyUploadFiles;
|
||||||
},
|
}
|
||||||
|
,
|
||||||
editScenario() {
|
editScenario() {
|
||||||
this.$refs['currentScenario'].validate((valid) => {
|
this.$refs['currentScenario'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
@ -714,15 +710,18 @@
|
|||||||
if (response.data) {
|
if (response.data) {
|
||||||
this.currentScenario.id = response.data.id;
|
this.currentScenario.id = response.data.id;
|
||||||
}
|
}
|
||||||
this.currentScenario.tagId = JSON.parse(this.currentScenario.tagId);
|
if (this.currentScenario.tags instanceof String) {
|
||||||
|
this.currentScenario.tags = JSON.parse(this.currentScenario.tags);
|
||||||
|
}
|
||||||
this.$emit('refresh');
|
this.$emit('refresh');
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
}
|
||||||
|
,
|
||||||
getApiScenario() {
|
getApiScenario() {
|
||||||
if (this.currentScenario.tagId != undefined && !(this.currentScenario.tagId instanceof Array)) {
|
if (this.currentScenario.tags != undefined && !(this.currentScenario.tags instanceof Array)) {
|
||||||
this.currentScenario.tagId = JSON.parse(this.currentScenario.tagId);
|
this.currentScenario.tags = JSON.parse(this.currentScenario.tags);
|
||||||
}
|
}
|
||||||
if (this.currentScenario.id) {
|
if (this.currentScenario.id) {
|
||||||
this.result = this.$get("/api/automation/getApiScenario/" + this.currentScenario.id, response => {
|
this.result = this.$get("/api/automation/getApiScenario/" + this.currentScenario.id, response => {
|
||||||
@ -743,7 +742,8 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
|
,
|
||||||
setParameter() {
|
setParameter() {
|
||||||
this.currentScenario.stepTotal = this.scenarioDefinition.length;
|
this.currentScenario.stepTotal = this.scenarioDefinition.length;
|
||||||
this.currentScenario.projectId = getCurrentProjectID();
|
this.currentScenario.projectId = getCurrentProjectID();
|
||||||
@ -754,26 +754,30 @@
|
|||||||
type: "scenario", referenced: 'Created', environmentId: this.currentEnvironmentId, hashTree: this.scenarioDefinition
|
type: "scenario", referenced: 'Created', environmentId: this.currentEnvironmentId, hashTree: this.scenarioDefinition
|
||||||
};
|
};
|
||||||
this.currentScenario.scenarioDefinition = scenario;
|
this.currentScenario.scenarioDefinition = scenario;
|
||||||
if (this.currentScenario.tagId instanceof Array) {
|
if (this.currentScenario.tags instanceof Array) {
|
||||||
this.currentScenario.tagId = JSON.stringify(this.currentScenario.tagId);
|
this.currentScenario.tags = JSON.stringify(this.currentScenario.tags);
|
||||||
}
|
}
|
||||||
if (this.currentModule != null) {
|
if (this.currentModule != null) {
|
||||||
this.currentScenario.modulePath = this.currentModule.method !== undefined ? this.currentModule.method : null;
|
this.currentScenario.modulePath = this.currentModule.method !== undefined ? this.currentModule.method : null;
|
||||||
this.currentScenario.apiScenarioModuleId = this.currentModule.id;
|
this.currentScenario.apiScenarioModuleId = this.currentModule.id;
|
||||||
}
|
}
|
||||||
this.currentScenario.projectId = this.projectId;
|
this.currentScenario.projectId = this.projectId;
|
||||||
},
|
}
|
||||||
|
,
|
||||||
runRefresh() {
|
runRefresh() {
|
||||||
this.debugVisible = true;
|
this.debugVisible = true;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
},
|
}
|
||||||
|
,
|
||||||
showScenarioParameters() {
|
showScenarioParameters() {
|
||||||
this.$refs.scenarioParameters.open(this.currentScenario.variables);
|
this.$refs.scenarioParameters.open(this.currentScenario.variables);
|
||||||
},
|
}
|
||||||
|
,
|
||||||
addParameters(data) {
|
addParameters(data) {
|
||||||
this.currentScenario.variables = data;
|
this.currentScenario.variables = data;
|
||||||
this.reload();
|
this.reload();
|
||||||
},
|
}
|
||||||
|
,
|
||||||
apiImport(importData) {
|
apiImport(importData) {
|
||||||
if (importData && importData.data) {
|
if (importData && importData.data) {
|
||||||
importData.data.forEach(item => {
|
importData.data.forEach(item => {
|
||||||
@ -827,6 +831,12 @@
|
|||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ms-font {
|
||||||
|
color: #303133;
|
||||||
|
font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
.ms-col-one {
|
.ms-col-one {
|
||||||
margin-top: 6px;
|
margin-top: 6px;
|
||||||
}
|
}
|
||||||
@ -912,8 +922,30 @@
|
|||||||
margin-bottom: 0px;
|
margin-bottom: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/deep/ .el-link {
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .el-checkbox {
|
||||||
|
color: #303133;
|
||||||
|
font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .el-checkbox__label {
|
||||||
|
padding-left: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
.head {
|
.head {
|
||||||
border-bottom: 1px solid #474849;
|
border-bottom: 1px solid #303133;
|
||||||
|
color: #303133;
|
||||||
|
font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/deep/ .el-form-item__content {
|
||||||
|
line-height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -0,0 +1,69 @@
|
|||||||
|
<template>
|
||||||
|
<input-tag v-model="data"></input-tag>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import InputTag from 'vue-input-tag'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "MsInputTag",
|
||||||
|
components: {InputTag},
|
||||||
|
props: {currentScenario: {}},
|
||||||
|
created() {
|
||||||
|
if (!this.currentScenario.tags) {
|
||||||
|
this.currentScenario.tags = [];
|
||||||
|
}
|
||||||
|
console.log(this.currentScenario.tags)
|
||||||
|
this.data = this.currentScenario.tags;
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
data: [],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
data() {
|
||||||
|
this.currentScenario.tags = this.data;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
/deep/ .vue-input-tag-wrapper {
|
||||||
|
border-radius: 2px;
|
||||||
|
border: 1px solid #a5d24a;
|
||||||
|
color: #909399;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .input-tag {
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 12px;
|
||||||
|
min-width: auto;
|
||||||
|
border-width: 1px;
|
||||||
|
border-style: solid;
|
||||||
|
border-radius: 4px;
|
||||||
|
-webkit-box-sizing: border-box;
|
||||||
|
box-sizing: border-box;
|
||||||
|
white-space: nowrap;
|
||||||
|
background-color: #fff;
|
||||||
|
border-color: #909399;
|
||||||
|
color: #909399;
|
||||||
|
width: auto;
|
||||||
|
|
||||||
|
height: 23px;
|
||||||
|
padding: 0 5px;
|
||||||
|
line-height: 19px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .remove {
|
||||||
|
color: #909399;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .el-form-item__content {
|
||||||
|
line-height: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div style="min-width: 1000px;margin-bottom: 20px">
|
||||||
<el-radio-group v-model="body.type" size="mini">
|
<el-radio-group v-model="body.type" size="mini">
|
||||||
<el-radio :disabled="isReadOnly" :label="type.FORM_DATA" @change="modeChange">
|
<el-radio :disabled="isReadOnly" :label="type.FORM_DATA" @change="modeChange">
|
||||||
{{ $t('api_test.definition.request.body_form_data') }}
|
{{ $t('api_test.definition.request.body_form_data') }}
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
<el-col :span="16">
|
<el-col :span="16">
|
||||||
<el-form-item :label="$t('api_report.request')" prop="path">
|
<el-form-item :label="$t('api_report.request')" prop="path">
|
||||||
<el-input :placeholder="$t('api_test.definition.request.path_info')" v-model="httpForm.path"
|
<el-input :placeholder="$t('api_test.definition.request.path_info')" v-model="httpForm.path"
|
||||||
class="ms-http-input" size="small" style="margin-top: 5px">
|
class="ms-http-input" size="small" style="margin-top: 5px" @change="urlChange">
|
||||||
<el-select v-model="httpForm.method" slot="prepend" style="width: 100px" size="small">
|
<el-select v-model="httpForm.method" slot="prepend" style="width: 100px" size="small">
|
||||||
<el-option v-for="item in reqOptions" :key="item.id" :label="item.label" :value="item.id"/>
|
<el-option v-for="item in reqOptions" :key="item.id" :label="item.label" :value="item.id"/>
|
||||||
</el-select>
|
</el-select>
|
||||||
@ -95,6 +95,7 @@
|
|||||||
import {WORKSPACE_ID} from '../../../../../../common/js/constants';
|
import {WORKSPACE_ID} from '../../../../../../common/js/constants';
|
||||||
import {REQ_METHOD, API_STATUS} from "../../model/JsonData";
|
import {REQ_METHOD, API_STATUS} from "../../model/JsonData";
|
||||||
import MsJsr233Processor from "../processor/Jsr233Processor";
|
import MsJsr233Processor from "../processor/Jsr233Processor";
|
||||||
|
import {KeyValue} from "../../model/ApiTestModel";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "MsAddCompleteHttpApi",
|
name: "MsAddCompleteHttpApi",
|
||||||
@ -169,6 +170,35 @@
|
|||||||
});
|
});
|
||||||
return path[0].path;
|
return path[0].path;
|
||||||
},
|
},
|
||||||
|
urlChange() {
|
||||||
|
if (!this.httpForm.path) return;
|
||||||
|
let url = this.getURL(this.addProtocol(this.httpForm.path));
|
||||||
|
if (url) {
|
||||||
|
this.httpForm.path = decodeURIComponent("/" + url.hostname + url.pathname);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
addProtocol(url) {
|
||||||
|
if (url) {
|
||||||
|
if (!url.toLowerCase().startsWith("https") && !url.toLowerCase().startsWith("http")) {
|
||||||
|
return "https://" + url;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return url;
|
||||||
|
},
|
||||||
|
getURL(urlStr) {
|
||||||
|
try {
|
||||||
|
let url = new URL(urlStr);
|
||||||
|
console.log(urlStr)
|
||||||
|
url.searchParams.forEach((value, key) => {
|
||||||
|
if (key && value) {
|
||||||
|
this.request.arguments.splice(0, 0, new KeyValue({name: key, required: false, value: value}));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return url;
|
||||||
|
} catch (e) {
|
||||||
|
this.$error(this.$t('api_test.request.url_invalid'), 2000);
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
created() {
|
created() {
|
||||||
|
@ -18,9 +18,6 @@
|
|||||||
<span style="margin-right: 10px">
|
<span style="margin-right: 10px">
|
||||||
<el-checkbox class="follow-redirects-item" v-model="request.followRedirects">{{$t('api_test.request.follow_redirects')}}</el-checkbox>
|
<el-checkbox class="follow-redirects-item" v-model="request.followRedirects">{{$t('api_test.request.follow_redirects')}}</el-checkbox>
|
||||||
</span>
|
</span>
|
||||||
<span style="margin-right: 10px">
|
|
||||||
<el-checkbox class="do-multipart-post" v-model="request.doMultipartPost">{{$t('api_test.request.do_multipart_post')}}</el-checkbox>
|
|
||||||
</span>
|
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|
||||||
<!--请求体-->
|
<!--请求体-->
|
||||||
<el-tab-pane v-if="isBodyShow" :label="$t('api_test.request.body')" name="body">
|
<el-tab-pane v-if="isBodyShow" :label="$t('api_test.request.body')" name="body" style="overflow: auto">
|
||||||
<ms-api-body @headersChange="reloadBody" :is-read-only="isReadOnly" :isShowEnable="isShowEnable" :headers="headers" :body="request.body"/>
|
<ms-api-body @headersChange="reloadBody" :is-read-only="isReadOnly" :isShowEnable="isShowEnable" :headers="headers" :body="request.body"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
<ms-code-edit v-if="!isSqlType" :mode="mode" :read-only="true" :modes="modes" :data.sync="response.responseResult.body" ref="codeEdit"/>
|
<ms-code-edit v-if="!isSqlType" :mode="mode" :read-only="true" :modes="modes" :data.sync="response.responseResult.body" ref="codeEdit"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<!--<el-tab-pane label="Cookie" name="cookie" class="pane cookie">-->
|
<!--<el-tab-pane label="Cookie" name="cookie" class="pane cookie">-->
|
||||||
<!--<pre>{{response.cookies}}</pre>-->
|
<!--<pre>{{response.cookies}}</pre>-->
|
||||||
<!--</el-tab-pane>-->
|
<!--</el-tab-pane>-->
|
||||||
|
|
||||||
<el-tab-pane :label="$t('api_test.definition.request.console')" name="console" class="pane">
|
<el-tab-pane :label="$t('api_test.definition.request.console')" name="console" class="pane">
|
||||||
@ -26,17 +26,21 @@
|
|||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|
||||||
<el-tab-pane :label="$t('api_report.request_body')" name="request_body" class="pane">
|
<el-tab-pane :label="$t('api_report.request_body')" name="request_body" class="pane">
|
||||||
<div>
|
<div class="ms-div">
|
||||||
{{$t('api_test.request.address')}} : {{ response.url }}
|
{{$t('api_test.request.address')}} :
|
||||||
|
<pre>{{ response.url }}</pre>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div class="ms-div">
|
||||||
{{$t('api_test.scenario.headers')}} : {{ response.headers }}
|
{{$t('api_test.scenario.headers')}} :
|
||||||
|
<pre>{{ response.headers }}</pre>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div class="ms-div">
|
||||||
Cookies : {{response.cookies}}
|
Cookies :
|
||||||
|
<pre>{{response.cookies}}</pre>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div class="ms-div">
|
||||||
Body : {{response.body}}
|
Body :
|
||||||
|
<pre>{{response.body}}</pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
@ -45,7 +49,6 @@
|
|||||||
<template v-slot:label>
|
<template v-slot:label>
|
||||||
<ms-dropdown v-if="currentProtocol==='SQL'" :commands="sqlModes" :default-command="mode" @command="sqlModeChange"/>
|
<ms-dropdown v-if="currentProtocol==='SQL'" :commands="sqlModes" :default-command="mode" @command="sqlModeChange"/>
|
||||||
<ms-dropdown v-else :commands="modes" :default-command="mode" @command="modeChange"/>
|
<ms-dropdown v-else :commands="modes" :default-command="mode" @command="modeChange"/>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
@ -139,6 +142,10 @@
|
|||||||
height: 0px;
|
height: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ms-div {
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
pre {
|
pre {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
@ -24,79 +24,83 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "MsSqlResultTable",
|
name: "MsSqlResultTable",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
tables: [],
|
tables: [],
|
||||||
titles: []
|
titles: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
body: String
|
body: String
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
if (!this.body) {
|
if (!this.body) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let rowArry = this.body.split("\n");
|
let rowArry = this.body.split("\n");
|
||||||
this.getTableData(rowArry);
|
// 过多会有性能问题
|
||||||
if (this.tables.length > 1) {
|
if (rowArry.length > 100) {
|
||||||
for (let i = 0; i < this.tables.length; i++) {
|
rowArry = rowArry.slice(0, 100);
|
||||||
if (this.tables[i].titles.length === 1 && i < this.tables.length - 1) {
|
}
|
||||||
this.tables[i].tableData.splice(this.tables[i].tableData.length - 1, 1);
|
this.getTableData(rowArry);
|
||||||
}
|
if (this.tables.length > 1) {
|
||||||
|
for (let i = 0; i < this.tables.length; i++) {
|
||||||
|
if (this.tables[i].titles.length === 1 && i < this.tables.length - 1) {
|
||||||
|
this.tables[i].tableData.splice(this.tables[i].tableData.length - 1, 1);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
let lastTable = this.tables[this.tables.length - 1];
|
let lastTable = this.tables[this.tables.length - 1];
|
||||||
if (lastTable.titles.length === 1) {
|
if (lastTable.titles.length === 1) {
|
||||||
if (lastTable.tableData.length > 4) {
|
if (lastTable.tableData.length > 4) {
|
||||||
lastTable.tableData.splice(lastTable.tableData.length - 4, 4);
|
lastTable.tableData.splice(lastTable.tableData.length - 4, 4);
|
||||||
} else {
|
|
||||||
this.tables.splice(this.tables.length - 1, 1);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
this.tables.splice(this.tables.length - 1, 1);
|
this.tables.splice(this.tables.length - 1, 1);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
let table = this.tables[0];
|
this.tables.splice(this.tables.length - 1, 1);
|
||||||
table.tableData.splice(table.tableData.length - 4, 4);
|
|
||||||
}
|
}
|
||||||
},
|
} else {
|
||||||
methods: {
|
let table = this.tables[0];
|
||||||
getTableData(rowArry) {
|
table.tableData.splice(table.tableData.length - 4, 4);
|
||||||
let titles;
|
}
|
||||||
let result = [];
|
},
|
||||||
for (let i = 0; i < rowArry.length; i++) {
|
methods: {
|
||||||
let colArray = rowArry[i].split("\t");
|
getTableData(rowArry) {
|
||||||
if (i === 0) {
|
let titles;
|
||||||
titles = colArray;
|
let result = [];
|
||||||
} else {
|
for (let i = 0; i < rowArry.length; i++) {
|
||||||
if (colArray.length != titles.length) {
|
let colArray = rowArry[i].split("\t");
|
||||||
// 创建新的表
|
if (i === 0) {
|
||||||
if (colArray.length === 1 && colArray[0] === '') {
|
titles = colArray;
|
||||||
this.getTableData(rowArry.slice(i + 1));
|
} else {
|
||||||
} else {
|
if (colArray.length != titles.length) {
|
||||||
this.getTableData(rowArry.slice(i));
|
// 创建新的表
|
||||||
}
|
if (colArray.length === 1 && colArray[0] === '') {
|
||||||
break;
|
this.getTableData(rowArry.slice(i + 1));
|
||||||
} else {
|
} else {
|
||||||
let item = {};
|
this.getTableData(rowArry.slice(i));
|
||||||
for (let j = 0; j < colArray.length; j++) {
|
|
||||||
item[titles[j]] = (colArray[j] ? colArray[j] : "");
|
|
||||||
}
|
|
||||||
result.push(item);
|
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
} else {
|
||||||
|
let item = {};
|
||||||
|
for (let j = 0; j < colArray.length; j++) {
|
||||||
|
item[titles[j]] = (colArray[j] ? colArray[j] : "");
|
||||||
|
}
|
||||||
|
result.push(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.tables.splice(0, 0, {
|
|
||||||
titles: titles,
|
|
||||||
tableData: result
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.tables.splice(0, 0, {
|
||||||
|
titles: titles,
|
||||||
|
tableData: result
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
@ -114,7 +118,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.el-container {
|
.el-container {
|
||||||
overflow:auto;
|
overflow: auto;
|
||||||
max-height: 500px;
|
max-height: 500px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -216,6 +216,7 @@
|
|||||||
updateApi() {
|
updateApi() {
|
||||||
let url = "/api/definition/update";
|
let url = "/api/definition/update";
|
||||||
let bodyFiles = this.getBodyUploadFiles();
|
let bodyFiles = this.getBodyUploadFiles();
|
||||||
|
this.api.method = this.api.request.method;
|
||||||
this.$fileUpload(url, null, bodyFiles, this.api, () => {
|
this.$fileUpload(url, null, bodyFiles, this.api, () => {
|
||||||
this.$success(this.$t('commons.save_success'));
|
this.$success(this.$t('commons.save_success'));
|
||||||
this.$emit('saveApi', this.api);
|
this.$emit('saveApi', this.api);
|
||||||
|
@ -18,7 +18,22 @@
|
|||||||
</el-aside>
|
</el-aside>
|
||||||
<el-main style="padding-left: 0px;padding-right: 0px;">
|
<el-main style="padding-left: 0px;padding-right: 0px;">
|
||||||
<div style="width: 200px;margin:0 auto">
|
<div style="width: 200px;margin:0 auto">
|
||||||
<el-row align="center">
|
|
||||||
|
<el-row align="center" class="hidden-lg-and-down">
|
||||||
|
<el-col :span="6" style="padding: 5px;border-right-style: solid;border-right-width: 1px;border-right-color: #ECEEF4;">
|
||||||
|
<div class="count-info-div" v-html="apiCountData.httpCountStr"></div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6" style="padding: 5px;border-right-style: solid;border-right-width: 1px;border-right-color: #ECEEF4;">
|
||||||
|
<div class="count-info-div" v-html="apiCountData.rpcCountStr"></div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6" style="padding: 5px;border-right-style: solid;border-right-width: 1px;border-right-color: #ECEEF4;">
|
||||||
|
<div class="count-info-div" v-html="apiCountData.tcpCountStr"></div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6" style="padding: 5px;">
|
||||||
|
<div class="count-info-div" v-html="apiCountData.sqlCountStr"></div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row align="right" style="margin-left: 20px" class="hidden-xl-only">
|
||||||
<el-col :span="6" style="padding: 5px;border-right-style: solid;border-right-width: 1px;border-right-color: #ECEEF4;">
|
<el-col :span="6" style="padding: 5px;border-right-style: solid;border-right-width: 1px;border-right-color: #ECEEF4;">
|
||||||
<div class="count-info-div" v-html="apiCountData.httpCountStr"></div>
|
<div class="count-info-div" v-html="apiCountData.httpCountStr"></div>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -11,8 +11,16 @@
|
|||||||
<el-table-column prop="rule" :label="$t('api_test.home_page.running_task_list.table_coloum.run_rule')" width="120" show-overflow-tooltip/>
|
<el-table-column prop="rule" :label="$t('api_test.home_page.running_task_list.table_coloum.run_rule')" width="120" show-overflow-tooltip/>
|
||||||
<el-table-column width="100" :label="$t('api_test.home_page.running_task_list.table_coloum.task_status')">
|
<el-table-column width="100" :label="$t('api_test.home_page.running_task_list.table_coloum.task_status')">
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<el-switch @click.stop.native v-model="scope.row.taskStatus" @change="updateTask(scope.row)"/>
|
<div>
|
||||||
|
<el-switch
|
||||||
|
v-model="scope.row.taskStatus"
|
||||||
|
class="captcha-img"
|
||||||
|
@click.native="closeTaskConfirm(scope.row)"
|
||||||
|
></el-switch>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column width="170" :label="$t('api_test.home_page.running_task_list.table_coloum.next_execution_time')">
|
<el-table-column width="170" :label="$t('api_test.home_page.running_task_list.table_coloum.next_execution_time')">
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
@ -41,6 +49,7 @@ export default {
|
|||||||
value: '100',
|
value: '100',
|
||||||
result: {},
|
result: {},
|
||||||
tableData: [],
|
tableData: [],
|
||||||
|
visible: false,
|
||||||
loading: false
|
loading: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -53,6 +62,19 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
closeTaskConfirm(row){
|
||||||
|
let flag = row.taskStatus;
|
||||||
|
row.taskStatus = !flag; //保持switch点击前的状态
|
||||||
|
this.$confirm(this.$t('api_test.home_page.running_task_list.confirm.close_title'), this.$t('commons.prompt'), {
|
||||||
|
confirmButtonText: this.$t('commons.confirm'),
|
||||||
|
cancelButtonText: this.$t('commons.cancel'),
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
this.updateTask(row);
|
||||||
|
}).catch(() => {
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
updateTask(taskRow){
|
updateTask(taskRow){
|
||||||
|
|
||||||
this.result = this.$post('/api/schedule/updateEnableByPrimyKey', taskRow, response => {
|
this.result = this.$post('/api/schedule/updateEnableByPrimyKey', taskRow, response => {
|
||||||
@ -66,8 +88,11 @@ export default {
|
|||||||
},
|
},
|
||||||
activated() {
|
activated() {
|
||||||
this.search();
|
this.search();
|
||||||
|
},
|
||||||
|
handleStatus(scope) {
|
||||||
|
console.log(scope.row.userId)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
@ -18,7 +18,21 @@
|
|||||||
</el-aside>
|
</el-aside>
|
||||||
<el-main style="padding-left: 0px;padding-right: 0px">
|
<el-main style="padding-left: 0px;padding-right: 0px">
|
||||||
<div style="width: 200px;margin:0 auto">
|
<div style="width: 200px;margin:0 auto">
|
||||||
<el-row align="center">
|
<el-row align="center" class="hidden-lg-and-down">
|
||||||
|
<el-col :span="6" style="padding: 5px;border-right-style: solid;border-right-width: 1px;border-right-color: #ECEEF4;">
|
||||||
|
<div class="count-info-div" v-html="testCaseCountData.httpCountStr"></div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6" style="padding: 5px;border-right-style: solid;border-right-width: 1px;border-right-color: #ECEEF4;">
|
||||||
|
<div class="count-info-div" v-html="testCaseCountData.rpcCountStr"></div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6" style="padding: 5px;border-right-style: solid;border-right-width: 1px;border-right-color: #ECEEF4;">
|
||||||
|
<div class="count-info-div" v-html="testCaseCountData.tcpCountStr"></div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6" style="padding: 5px;">
|
||||||
|
<div class="count-info-div" v-html="testCaseCountData.sqlCountStr"></div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row align="right" style="margin-left: 20px" class="hidden-xl-only">
|
||||||
<el-col :span="6" style="padding: 5px;border-right-style: solid;border-right-width: 1px;border-right-color: #ECEEF4;">
|
<el-col :span="6" style="padding: 5px;border-right-style: solid;border-right-width: 1px;border-right-color: #ECEEF4;">
|
||||||
<div class="count-info-div" v-html="testCaseCountData.httpCountStr"></div>
|
<div class="count-info-div" v-html="testCaseCountData.httpCountStr"></div>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<div id="menu-bar">
|
<div id="menu-bar">
|
||||||
<el-row type="flex">
|
<el-row type="flex">
|
||||||
<project-change :project-name="currentProject"/>
|
<project-change :project-name="currentProject"/>
|
||||||
<el-col :span="12">
|
<el-col :span="9">
|
||||||
<el-menu class="header-menu" :unique-opened="true" mode="horizontal" router :default-active='$route.path'>
|
<el-menu class="header-menu" :unique-opened="true" mode="horizontal" router :default-active='$route.path'>
|
||||||
<el-menu-item :index="'/performance/home'">
|
<el-menu-item :index="'/performance/home'">
|
||||||
{{ $t("i18n.home") }}
|
{{ $t("i18n.home") }}
|
||||||
@ -32,7 +32,7 @@
|
|||||||
<ms-create-test :to="'/performance/test/create'"/>
|
<ms-create-test :to="'/performance/test/create'"/>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="10"/>
|
<el-col :span="11"/>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -13,10 +13,10 @@
|
|||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
<el-card shadow="always" class="ms-card-index-2">
|
<el-card shadow="always" class="ms-card-index-2">
|
||||||
<span class="ms-card-data">
|
<span class="ms-card-data">
|
||||||
<span class="ms-card-data-digital">{{ avgThroughput }}</span>
|
<span class="ms-card-data-digital">{{ avgTransactions }}</span>
|
||||||
<span class="ms-card-data-unit"> Hits/s</span>
|
<span class="ms-card-data-unit"> Transactions/s</span>
|
||||||
</span>
|
</span>
|
||||||
<span class="ms-card-desc">Avg.Throughput</span>
|
<span class="ms-card-desc">Avg.Transactions</span>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
@ -86,6 +86,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
maxUsers: "0",
|
maxUsers: "0",
|
||||||
avgThroughput: "0",
|
avgThroughput: "0",
|
||||||
|
avgTransactions: "0",
|
||||||
errors: "0",
|
errors: "0",
|
||||||
avgResponseTime: "0",
|
avgResponseTime: "0",
|
||||||
responseTime90: "0",
|
responseTime90: "0",
|
||||||
@ -103,6 +104,7 @@ export default {
|
|||||||
let data = res.data.data;
|
let data = res.data.data;
|
||||||
this.maxUsers = data.maxUsers;
|
this.maxUsers = data.maxUsers;
|
||||||
this.avgThroughput = data.avgThroughput;
|
this.avgThroughput = data.avgThroughput;
|
||||||
|
this.avgTransactions = data.avgTransactions;
|
||||||
this.errors = data.errors;
|
this.errors = data.errors;
|
||||||
this.avgResponseTime = data.avgResponseTime;
|
this.avgResponseTime = data.avgResponseTime;
|
||||||
this.responseTime90 = data.responseTime90;
|
this.responseTime90 = data.responseTime90;
|
||||||
@ -110,6 +112,7 @@ export default {
|
|||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.maxUsers = '0';
|
this.maxUsers = '0';
|
||||||
this.avgThroughput = '0';
|
this.avgThroughput = '0';
|
||||||
|
this.avgTransactions = '0';
|
||||||
this.errors = '0';
|
this.errors = '0';
|
||||||
this.avgResponseTime = '0';
|
this.avgResponseTime = '0';
|
||||||
this.responseTime90 = '0';
|
this.responseTime90 = '0';
|
||||||
|
@ -114,6 +114,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
phone: [
|
phone: [
|
||||||
|
{required: true, message: this.$t('user.input_phone'), trigger: 'blur'},
|
||||||
{
|
{
|
||||||
required: false,
|
required: false,
|
||||||
pattern: PHONE_REGEX,
|
pattern: PHONE_REGEX,
|
||||||
|
@ -61,6 +61,9 @@
|
|||||||
<el-form-item :label="$t('commons.description')" prop="description">
|
<el-form-item :label="$t('commons.description')" prop="description">
|
||||||
<el-input v-model="form.description" autocomplete="off"/>
|
<el-input v-model="form.description" autocomplete="off"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item :label="$t('commons.image')" prop="image">
|
||||||
|
<el-input v-model="form.image" autocomplete="off"/>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item :label="$t('test_resource_pool.type')" prop="type">
|
<el-form-item :label="$t('test_resource_pool.type')" prop="type">
|
||||||
<el-select v-model="form.type" :placeholder="$t('test_resource_pool.select_pool_type')"
|
<el-select v-model="form.type" :placeholder="$t('test_resource_pool.select_pool_type')"
|
||||||
@change="changeResourceType()">
|
@change="changeResourceType()">
|
||||||
@ -148,6 +151,9 @@
|
|||||||
<el-form-item :label="$t('commons.description')" prop="description">
|
<el-form-item :label="$t('commons.description')" prop="description">
|
||||||
<el-input v-model="form.description" autocomplete="off"/>
|
<el-input v-model="form.description" autocomplete="off"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item :label="$t('commons.image')" prop="image">
|
||||||
|
<el-input v-model="form.image" autocomplete="off"/>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item :label="$t('test_resource_pool.type')" prop="type">
|
<el-form-item :label="$t('test_resource_pool.type')" prop="type">
|
||||||
<el-select v-model="form.type" :placeholder="$t('test_resource_pool.select_pool_type')"
|
<el-select v-model="form.type" :placeholder="$t('test_resource_pool.select_pool_type')"
|
||||||
@change="changeResourceType()">
|
@change="changeResourceType()">
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<i class="el-icon-refresh" @click="getComments()"
|
<i class="el-icon-refresh" @click="getComments()"
|
||||||
style="margin-left:10px;font-size: 14px; cursor: pointer"/>
|
style="margin-left:10px;font-size: 14px; cursor: pointer"/>
|
||||||
</template>
|
</template>
|
||||||
<div class="comment-list" style="height: 500px; overflow: auto;">
|
<div style="height: 100%;overflow:auto;">
|
||||||
<review-comment-item v-for="(comment,index) in comments"
|
<review-comment-item v-for="(comment,index) in comments"
|
||||||
:key="index"
|
:key="index"
|
||||||
:comment="comment"
|
:comment="comment"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-row :gutter="5">
|
<el-row :gutter="5">
|
||||||
<el-col :span="16">
|
<el-col :span="15">
|
||||||
<el-card class="case-detail-form-card">
|
<el-card class="case-detail-form-card">
|
||||||
<el-form :model="form" ref="caseFrom" v-loading="result.loading">
|
<el-form :model="form" ref="caseFrom" v-loading="result.loading">
|
||||||
|
|
||||||
@ -11,13 +11,13 @@
|
|||||||
:label="$t('test_track.case.name')"
|
:label="$t('test_track.case.name')"
|
||||||
:label-width="formLabelWidth"
|
:label-width="formLabelWidth"
|
||||||
prop="name">
|
prop="name">
|
||||||
<el-input class="case-name" :disabled="readOnly" v-model="testCase.name"></el-input>
|
<el-input :disabled="readOnly" v-model="testCase.name"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item :label="$t('test_track.case.module')" :label-width="formLabelWidth" prop="module">
|
<el-form-item :label="$t('test_track.case.module')" :label-width="formLabelWidth" prop="module">
|
||||||
<el-input class="case-name" :disabled="readOnly" v-model="testCase.nodePath"></el-input>
|
<el-input :disabled="readOnly" v-model="testCase.nodePath"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -156,8 +156,8 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="9">
|
||||||
<case-comment :case-id="testCaseId" :read-only="true"/>
|
<case-comment :case-id="testCaseId" :read-only="true" class="case-detail-comment"/>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
@ -193,7 +193,7 @@ export default {
|
|||||||
remark: '',
|
remark: '',
|
||||||
},
|
},
|
||||||
workspaceId: '',
|
workspaceId: '',
|
||||||
formLabelWidth: "120px",
|
formLabelWidth: "80px",
|
||||||
|
|
||||||
isStepTableAlive: true,
|
isStepTableAlive: true,
|
||||||
methodOptions: [
|
methodOptions: [
|
||||||
@ -223,6 +223,12 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.case-detail-form-card >>> .el-card__body {
|
.case-detail-form-card >>> .el-card__body {
|
||||||
padding: 20px 28px;
|
padding: 20px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.case-detail-comment {
|
||||||
|
min-width: 320px;
|
||||||
|
height: 600px;
|
||||||
|
overflow: auto;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -3,13 +3,13 @@
|
|||||||
<el-dialog :close-on-click-modal="false" class="case-dialog"
|
<el-dialog :close-on-click-modal="false" class="case-dialog"
|
||||||
@close="close"
|
@close="close"
|
||||||
:title="operationType == 'edit' ? ( readOnly ? $t('test_track.case.view_case') : $t('test_track.case.edit_case')) : $t('test_track.case.create')"
|
:title="operationType == 'edit' ? ( readOnly ? $t('test_track.case.view_case') : $t('test_track.case.edit_case')) : $t('test_track.case.create')"
|
||||||
:visible.sync="dialogFormVisible" width="88%">
|
:visible.sync="dialogFormVisible" width="85%">
|
||||||
|
|
||||||
<el-row :gutter="10">
|
<el-row :gutter="10">
|
||||||
<div>
|
<div>
|
||||||
<el-col :span="17">
|
<el-col :span="17">
|
||||||
<el-card>
|
<el-card class="container">
|
||||||
<el-form :model="form" :rules="rules" ref="caseFrom" v-loading="result.loading">
|
<el-form :model="form" :rules="rules" ref="caseFrom" v-loading="result.loading" class="case-form">
|
||||||
|
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="8" :offset="1">
|
<el-col :span="8" :offset="1">
|
||||||
@ -170,7 +170,7 @@
|
|||||||
clearable/>
|
clearable/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="$t('commons.input_content')" min-width="20%">
|
<el-table-column :label="$t('commons.input_content')" min-width="25%">
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@ -237,22 +237,20 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-row style="float: right; margin-bottom: 10px;">
|
|
||||||
<el-switch v-if="operationType == 'add'"
|
|
||||||
v-model="isCreateContinue"
|
|
||||||
:active-text="$t('test_track.case.save_create_continue')">
|
|
||||||
</el-switch>
|
|
||||||
<ms-dialog-footer v-if="!readOnly"
|
|
||||||
@cancel="dialogFormVisible = false"
|
|
||||||
@confirm="saveCase"/>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
|
<el-row style="float: right; margin-bottom: 20px;margin-top: 20px">
|
||||||
|
<el-switch v-if="operationType == 'add'"
|
||||||
|
v-model="isCreateContinue"
|
||||||
|
:active-text="$t('test_track.case.save_create_continue')">
|
||||||
|
</el-switch>
|
||||||
|
<ms-dialog-footer v-if="!readOnly"
|
||||||
|
@cancel="dialogFormVisible = false"
|
||||||
|
@confirm="saveCase"/>
|
||||||
|
</el-row>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="7">
|
<el-col :span="7">
|
||||||
<case-comment :case-id="testCase ? testCase.id : ''"/>
|
<case-comment :case-id="testCase ? testCase.id : ''" class="comment-card"/>
|
||||||
</el-col>
|
</el-col>
|
||||||
</div>
|
</div>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -712,8 +710,28 @@ export default {
|
|||||||
width: 194px;
|
width: 194px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
height: 100vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.case-form {
|
||||||
|
height: 95%;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
.case-dialog >>> .el-dialog__body {
|
.case-dialog >>> .el-dialog__body {
|
||||||
padding: 0 20px 10px 20px;
|
padding: 0 20px 10px 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.container >>> .el-card__body {
|
||||||
|
height: calc(100vh - 120px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.comment-card >>> .el-card__header {
|
||||||
|
padding: 27px 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.comment-card >>> .el-card__body {
|
||||||
|
height: calc(100vh - 120px);
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -62,7 +62,6 @@
|
|||||||
<el-popover
|
<el-popover
|
||||||
placement="right-end"
|
placement="right-end"
|
||||||
:title="$t('test_track.case.view_case')"
|
:title="$t('test_track.case.view_case')"
|
||||||
width="70%"
|
|
||||||
trigger="hover"
|
trigger="hover"
|
||||||
>
|
>
|
||||||
<test-case-detail v-if="currentCaseId === scope.row.id" :test-case-id="currentCaseId"/>
|
<test-case-detail v-if="currentCaseId === scope.row.id" :test-case-id="currentCaseId"/>
|
||||||
|
@ -10,338 +10,348 @@
|
|||||||
v-loading="result.loading">
|
v-loading="result.loading">
|
||||||
|
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<div class="container">
|
<el-row :gutter="10">
|
||||||
|
<div class="container">
|
||||||
|
<el-col :span="17">
|
||||||
|
<el-card>
|
||||||
|
<el-scrollbar>
|
||||||
|
|
||||||
<el-scrollbar>
|
<el-header>
|
||||||
|
|
||||||
<el-header>
|
<el-row type="flex" class="head-bar">
|
||||||
|
|
||||||
<el-row type="flex" class="head-bar">
|
<el-col :span="12">
|
||||||
|
<el-button plain size="mini"
|
||||||
|
icon="el-icon-back"
|
||||||
|
@click="cancel">{{ $t('test_track.return') }}
|
||||||
|
</el-button>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="12">
|
<el-col :span="11" class="head-right">
|
||||||
<el-button plain size="mini"
|
|
||||||
icon="el-icon-back"
|
|
||||||
@click="cancel">{{ $t('test_track.return') }}
|
|
||||||
</el-button>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="11" class="head-right">
|
|
||||||
<span class="head-right-tip" v-if="index + 1 === testCases.length">
|
<span class="head-right-tip" v-if="index + 1 === testCases.length">
|
||||||
{{ $t('test_track.plan_view.pre_case') }} : {{
|
{{ $t('test_track.plan_view.pre_case') }} : {{
|
||||||
testCases[index - 1] ? testCases[index - 1].name : ''
|
testCases[index - 1] ? testCases[index - 1].name : ''
|
||||||
}}
|
}}
|
||||||
</span>
|
</span>
|
||||||
<span class="head-right-tip" v-if="index + 1 !== testCases.length">
|
<span class="head-right-tip" v-if="index + 1 !== testCases.length">
|
||||||
{{ $t('test_track.plan_view.next_case') }} : {{
|
{{ $t('test_track.plan_view.next_case') }} : {{
|
||||||
testCases[index + 1] ? testCases[index + 1].name : ''
|
testCases[index + 1] ? testCases[index + 1].name : ''
|
||||||
}}
|
}}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<el-button plain size="mini" icon="el-icon-arrow-up"
|
<el-button plain size="mini" icon="el-icon-arrow-up"
|
||||||
:disabled="index + 1 <= 1"
|
:disabled="index + 1 <= 1"
|
||||||
@click="handlePre()"/>
|
@click="handlePre()"/>
|
||||||
<span> {{ index + 1 }}/{{ testCases.length }} </span>
|
<span> {{ index + 1 }}/{{ testCases.length }} </span>
|
||||||
<el-button plain size="mini" icon="el-icon-arrow-down"
|
<el-button plain size="mini" icon="el-icon-arrow-down"
|
||||||
:disabled="index + 1 >= testCases.length"
|
:disabled="index + 1 >= testCases.length"
|
||||||
@click="handleNext()"/>
|
@click="handleNext()"/>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-row style="margin-top: 0;">
|
<el-row style="margin-top: 0;">
|
||||||
<el-col>
|
<el-col>
|
||||||
<el-divider content-position="left">{{ testCase.name }}</el-divider>
|
<el-divider content-position="left">{{ testCase.name }}</el-divider>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
</el-header>
|
</el-header>
|
||||||
|
|
||||||
<div class="case_container">
|
<div class="case_container">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="4" :offset="1">
|
<el-col :span="4" :offset="1">
|
||||||
<span class="cast_label">{{ $t('test_track.case.priority') }}:</span>
|
<span class="cast_label">{{ $t('test_track.case.priority') }}:</span>
|
||||||
<span class="cast_item">{{ testCase.priority }}</span>
|
<span class="cast_item">{{ testCase.priority }}</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<span class="cast_label">{{ $t('test_track.case.case_type') }}:</span>
|
<span class="cast_label">{{ $t('test_track.case.case_type') }}:</span>
|
||||||
<span class="cast_item" v-if="testCase.type === 'functional'">{{ $t('commons.functional') }}</span>
|
<span class="cast_item" v-if="testCase.type === 'functional'">{{ $t('commons.functional') }}</span>
|
||||||
<span class="cast_item" v-if="testCase.type === 'performance'">{{ $t('commons.performance') }}</span>
|
<span class="cast_item" v-if="testCase.type === 'performance'">{{ $t('commons.performance') }}</span>
|
||||||
<span class="cast_item" v-if="testCase.type === 'api'">{{ $t('commons.api') }}</span>
|
<span class="cast_item" v-if="testCase.type === 'api'">{{ $t('commons.api') }}</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="13">
|
<el-col :span="10">
|
||||||
<test-plan-test-case-status-button class="status-button"
|
<test-plan-test-case-status-button class="status-button"
|
||||||
@statusChange="statusChange"
|
@statusChange="statusChange"
|
||||||
:is-read-only="isReadOnly"
|
:is-read-only="isReadOnly"
|
||||||
:is-failure="isFailure"
|
:is-failure="isFailure"
|
||||||
:status="testCase.status"/>
|
:status="testCase.status"/>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="4" :offset="1">
|
<el-col :span="4" :offset="1">
|
||||||
<span class="cast_label">{{ $t('test_track.case.method') }}:</span>
|
<span class="cast_label">{{ $t('test_track.case.method') }}:</span>
|
||||||
<span v-if="testCase.method === 'manual'">{{ $t('test_track.case.manual') }}</span>
|
<span v-if="testCase.method === 'manual'">{{ $t('test_track.case.manual') }}</span>
|
||||||
<span v-if="testCase.method === 'auto'">{{ $t('test_track.case.auto') }}</span>
|
<span v-if="testCase.method === 'auto'">{{ $t('test_track.case.auto') }}</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<span class="cast_label">{{ $t('test_track.case.module') }}:</span>
|
<span class="cast_label">{{ $t('test_track.case.module') }}:</span>
|
||||||
<span class="cast_item">{{ testCase.nodePath }}</span>
|
<span class="cast_item">{{ testCase.nodePath }}</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4" :offset="1">
|
<el-col :span="4" :offset="1">
|
||||||
<span class="cast_label">{{ $t('test_track.plan.plan_project') }}:</span>
|
<span class="cast_label">{{ $t('test_track.plan.plan_project') }}:</span>
|
||||||
<span class="cast_item">{{ testCase.projectName }}</span>
|
<span class="cast_item">{{ testCase.projectName }}</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="4" :offset="1" v-if="testCase.testId == 'other'">
|
<el-col :span="4" :offset="1" v-if="testCase.testId == 'other'">
|
||||||
<span class="cast_label">{{ $t('test_track.case.test_name') }}:</span>
|
<span class="cast_label">{{ $t('test_track.case.test_name') }}:</span>
|
||||||
<span class="cast_item">{{ testCase.otherTestName }}</span>
|
<span class="cast_item">{{ testCase.otherTestName }}</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :offset="1">
|
<el-col :offset="1">
|
||||||
<span class="cast_label">{{ $t('test_track.case.prerequisite') }}:</span>
|
<span class="cast_label">{{ $t('test_track.case.prerequisite') }}:</span>
|
||||||
<span class="cast_item"><p>{{ testCase.prerequisite }}</p></span>
|
<span class="cast_item"><p>{{ testCase.prerequisite }}</p></span>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-row v-if="testCase.method === 'auto' && testCase.testId && testCase.testId != 'other'">
|
<el-row v-if="testCase.method === 'auto' && testCase.testId && testCase.testId != 'other'">
|
||||||
<el-col class="test-detail" :span="20" :offset="1">
|
<el-col class="test-detail" :span="20" :offset="1">
|
||||||
<el-tabs v-model="activeTab" type="border-card" @tab-click="testTabChange">
|
<el-tabs v-model="activeTab" type="border-card" @tab-click="testTabChange">
|
||||||
<el-tab-pane name="detail" :label="$t('test_track.plan_view.test_detail')">
|
<el-tab-pane name="detail" :label="$t('test_track.plan_view.test_detail')">
|
||||||
<api-test-detail :is-read-only="isReadOnly" v-if="testCase.type === 'api'" @runTest="testRun"
|
<api-test-detail :is-read-only="isReadOnly" v-if="testCase.type === 'api'" @runTest="testRun"
|
||||||
:id="testCase.testId" ref="apiTestDetail"/>
|
:id="testCase.testId" ref="apiTestDetail"/>
|
||||||
<performance-test-detail :is-read-only="isReadOnly" v-if="testCase.type === 'performance'"
|
<performance-test-detail :is-read-only="isReadOnly" v-if="testCase.type === 'performance'"
|
||||||
@runTest="testRun" :id="testCase.testId" ref="performanceTestDetail"/>
|
@runTest="testRun" :id="testCase.testId" ref="performanceTestDetail"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane name="result" :label="$t('test_track.plan_view.test_result')">
|
<el-tab-pane name="result" :label="$t('test_track.plan_view.test_result')">
|
||||||
<api-test-result :report-id="testCase.reportId" v-if=" testCase.type === 'api'"
|
<api-test-result :report-id="testCase.reportId" v-if=" testCase.type === 'api'"
|
||||||
ref="apiTestResult"/>
|
ref="apiTestResult"/>
|
||||||
<performance-test-result :is-read-only="isReadOnly" :report-id="testCase.reportId"
|
<performance-test-result :is-read-only="isReadOnly" :report-id="testCase.reportId"
|
||||||
v-if="testCase.type === 'performance'" ref="performanceTestResult"/>
|
v-if="testCase.type === 'performance'" ref="performanceTestResult"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-row v-if="testCase.method && testCase.method !== 'auto'">
|
<el-row v-if="testCase.method && testCase.method !== 'auto'">
|
||||||
<el-col :span="20" :offset="1">
|
<el-col :span="22" :offset="1">
|
||||||
<div>
|
<div>
|
||||||
<span class="cast_label">{{ $t('test_track.case.steps') }}:</span>
|
<span class="cast_label">{{ $t('test_track.case.steps') }}:</span>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
:data="testCase.steptResults"
|
:data="testCase.steptResults"
|
||||||
class="tb-edit"
|
class="tb-edit"
|
||||||
size="mini"
|
|
||||||
:border="true"
|
|
||||||
:default-sort="{prop: 'num', order: 'ascending'}"
|
|
||||||
highlight-current-row>
|
|
||||||
<el-table-column :label="$t('test_track.case.number')" prop="num" min-width="5%"></el-table-column>
|
|
||||||
|
|
||||||
<el-table-column :label="$t('test_track.case.step_desc')" prop="desc" min-width="21%">
|
|
||||||
<template v-slot:default="scope">
|
|
||||||
<el-input
|
|
||||||
size="mini"
|
size="mini"
|
||||||
class="border-hidden"
|
:border="true"
|
||||||
type="textarea"
|
:default-sort="{prop: 'num', order: 'ascending'}"
|
||||||
:autosize="{ minRows: 1, maxRows: 4}"
|
highlight-current-row>
|
||||||
:disabled="true"
|
<el-table-column :label="$t('test_track.case.number')" prop="num" min-width="5%"></el-table-column>
|
||||||
v-model="scope.row.desc"/>
|
|
||||||
</template>
|
<el-table-column :label="$t('test_track.case.step_desc')" prop="desc" min-width="21%">
|
||||||
</el-table-column>
|
<template v-slot:default="scope">
|
||||||
<el-table-column :label="$t('test_track.case.expected_results')" prop="result" min-width="21%">
|
<el-input
|
||||||
<template v-slot:default="scope">
|
size="mini"
|
||||||
<el-input
|
class="border-hidden"
|
||||||
size="mini"
|
type="textarea"
|
||||||
class="border-hidden"
|
:autosize="{ minRows: 1, maxRows: 4}"
|
||||||
type="textarea"
|
:disabled="true"
|
||||||
:autosize="{ minRows: 1, maxRows: 4}"
|
v-model="scope.row.desc"/>
|
||||||
:disabled="true"
|
</template>
|
||||||
v-model="scope.row.result"/>
|
</el-table-column>
|
||||||
</template>
|
<el-table-column :label="$t('test_track.case.expected_results')" prop="result" min-width="21%">
|
||||||
</el-table-column>
|
<template v-slot:default="scope">
|
||||||
<el-table-column :label="$t('test_track.plan_view.actual_result')" min-width="21%">
|
<el-input
|
||||||
<template v-slot:default="scope">
|
size="mini"
|
||||||
<el-input
|
class="border-hidden"
|
||||||
class="table-edit-input"
|
type="textarea"
|
||||||
size="mini"
|
:autosize="{ minRows: 1, maxRows: 4}"
|
||||||
type="textarea"
|
:disabled="true"
|
||||||
:autosize="{ minRows: 2, maxRows: 4}"
|
v-model="scope.row.result"/>
|
||||||
:rows="2"
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column :label="$t('test_track.plan_view.actual_result')" min-width="21%">
|
||||||
|
<template v-slot:default="scope">
|
||||||
|
<el-input
|
||||||
|
class="table-edit-input"
|
||||||
|
size="mini"
|
||||||
|
type="textarea"
|
||||||
|
:autosize="{ minRows: 2, maxRows: 4}"
|
||||||
|
:rows="2"
|
||||||
|
:disabled="isReadOnly"
|
||||||
|
v-model="scope.row.actualResult"
|
||||||
|
:placeholder="$t('commons.input_content')"
|
||||||
|
clearable/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column :label="$t('test_track.plan_view.step_result')" min-width="12%">
|
||||||
|
<template v-slot:default="scope">
|
||||||
|
<el-select
|
||||||
|
:disabled="isReadOnly"
|
||||||
|
v-model="scope.row.executeResult"
|
||||||
|
@change="stepResultChange()"
|
||||||
|
filterable
|
||||||
|
size="mini">
|
||||||
|
<el-option :label="$t('test_track.plan_view.pass')" value="Pass"
|
||||||
|
style="color: #7ebf50;"></el-option>
|
||||||
|
<el-option :label="$t('test_track.plan_view.failure')" value="Failure"
|
||||||
|
style="color: #e57471;"></el-option>
|
||||||
|
<el-option :label="$t('test_track.plan_view.blocking')" value="Blocking"
|
||||||
|
style="color: #dda451;"></el-option>
|
||||||
|
<el-option :label="$t('test_track.plan_view.skip')" value="Skip"
|
||||||
|
style="color: #919399;"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="5" :offset="1">
|
||||||
|
<el-switch
|
||||||
:disabled="isReadOnly"
|
:disabled="isReadOnly"
|
||||||
v-model="scope.row.actualResult"
|
v-model="issuesSwitch"
|
||||||
:placeholder="$t('commons.input_content')"
|
@change="issuesChange"
|
||||||
clearable/>
|
:active-text="$t('test_track.plan_view.submit_issues')">
|
||||||
</template>
|
</el-switch>
|
||||||
</el-table-column>
|
<el-tooltip class="item" effect="dark"
|
||||||
<el-table-column :label="$t('test_track.plan_view.step_result')" min-width="12%">
|
:content="$t('test_track.issue.platform_tip')"
|
||||||
<template v-slot:default="scope">
|
placement="right">
|
||||||
<el-select
|
<i class="el-icon-info"/>
|
||||||
:disabled="isReadOnly"
|
|
||||||
v-model="scope.row.executeResult"
|
|
||||||
@change="stepResultChange()"
|
|
||||||
filterable
|
|
||||||
size="mini">
|
|
||||||
<el-option :label="$t('test_track.plan_view.pass')" value="Pass"
|
|
||||||
style="color: #7ebf50;"></el-option>
|
|
||||||
<el-option :label="$t('test_track.plan_view.failure')" value="Failure"
|
|
||||||
style="color: #e57471;"></el-option>
|
|
||||||
<el-option :label="$t('test_track.plan_view.blocking')" value="Blocking"
|
|
||||||
style="color: #dda451;"></el-option>
|
|
||||||
<el-option :label="$t('test_track.plan_view.skip')" value="Skip"
|
|
||||||
style="color: #919399;"></el-option>
|
|
||||||
</el-select>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="5" :offset="1">
|
|
||||||
<el-switch
|
|
||||||
:disabled="isReadOnly"
|
|
||||||
v-model="issuesSwitch"
|
|
||||||
@change="issuesChange"
|
|
||||||
:active-text="$t('test_track.plan_view.submit_issues')">
|
|
||||||
</el-switch>
|
|
||||||
<el-tooltip class="item" effect="dark"
|
|
||||||
:content="$t('test_track.issue.platform_tip')"
|
|
||||||
placement="right">
|
|
||||||
<i class="el-icon-info"/>
|
|
||||||
</el-tooltip>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-row v-if="issuesSwitch">
|
|
||||||
<el-col :span="20" :offset="1" class="issues-edit">
|
|
||||||
<el-input
|
|
||||||
type="text"
|
|
||||||
:placeholder="$t('test_track.issue.input_title')"
|
|
||||||
v-model="testCase.issues.title"
|
|
||||||
maxlength="60"
|
|
||||||
show-word-limit
|
|
||||||
/>
|
|
||||||
<ckeditor :editor="editor" :disabled="isReadOnly" :config="editorConfig"
|
|
||||||
v-model="testCase.issues.content"/>
|
|
||||||
<el-row v-if="hasTapdId">
|
|
||||||
{{ $t('test_track.issue.tapd_current_owner') }}
|
|
||||||
<el-select v-model="testCase.tapdUsers"
|
|
||||||
multiple
|
|
||||||
filterable
|
|
||||||
style="width: 20%"
|
|
||||||
:placeholder="$t('test_track.issue.please_choose_current_owner')"
|
|
||||||
collapse-tags size="small">
|
|
||||||
<el-option v-for="(userInfo, index) in users" :key="index" :label="userInfo.user"
|
|
||||||
:value="userInfo.user"/>
|
|
||||||
</el-select>
|
|
||||||
</el-row>
|
|
||||||
<el-row v-if="hasZentaoId">
|
|
||||||
{{ $t('test_track.issue.zentao_bug_build') }}
|
|
||||||
<el-select v-model="testCase.zentaoBuilds"
|
|
||||||
multiple
|
|
||||||
filterable
|
|
||||||
style="width: 20%"
|
|
||||||
:placeholder="$t('test_track.issue.zentao_bug_build')"
|
|
||||||
collapse-tags size="small">
|
|
||||||
<el-option v-for="(build, index) in Builds" :key="index" :label="build.name"
|
|
||||||
:value="build.id"/>
|
|
||||||
</el-select>
|
|
||||||
{{ $t('test_track.issue.zentao_bug_assigned') }}
|
|
||||||
<el-select v-model="testCase.zentaoAssigned"
|
|
||||||
filterable
|
|
||||||
style="width: 20%"
|
|
||||||
:placeholder="$t('test_track.issue.please_choose_current_owner')"
|
|
||||||
collapse-tags size="small">
|
|
||||||
<el-option v-for="(userInfo, index) in zentaoUsers" :key="index" :label="userInfo.name"
|
|
||||||
:value="userInfo.user"/>
|
|
||||||
</el-select>
|
|
||||||
</el-row>
|
|
||||||
<el-button type="primary" size="small" @click="saveIssues">{{ $t('commons.save') }}</el-button>
|
|
||||||
<el-button size="small" @click="issuesSwitch=false">{{ $t('commons.cancel') }}</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="20" :offset="1" class="issues-edit">
|
|
||||||
<el-table border class="adjust-table" :data="issues" style="width: 100%">
|
|
||||||
<el-table-column prop="id" :label="$t('test_track.issue.id')" show-overflow-tooltip/>
|
|
||||||
<el-table-column prop="title" :label="$t('test_track.issue.title')" show-overflow-tooltip/>
|
|
||||||
<el-table-column prop="description" :label="$t('test_track.issue.description')">
|
|
||||||
<template v-slot:default="scope">
|
|
||||||
<el-popover
|
|
||||||
placement="left"
|
|
||||||
width="400"
|
|
||||||
trigger="hover"
|
|
||||||
>
|
|
||||||
<ckeditor :editor="editor" disabled :config="readConfig"
|
|
||||||
v-model="scope.row.description"/>
|
|
||||||
<el-button slot="reference" type="text">{{ $t('test_track.issue.preview') }}</el-button>
|
|
||||||
</el-popover>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="status" :label="$t('test_track.issue.status')"/>
|
|
||||||
<el-table-column prop="platform" :label="$t('test_track.issue.platform')"/>
|
|
||||||
<el-table-column :label="$t('test_track.issue.operate')">
|
|
||||||
<template v-slot:default="scope">
|
|
||||||
<el-tooltip :content="$t('test_track.issue.close')"
|
|
||||||
placement="top" :enterable="false">
|
|
||||||
<el-button type="danger" icon="el-icon-circle-close" size="mini"
|
|
||||||
circle v-if="scope.row.platform === 'Local'"
|
|
||||||
@click="closeIssue(scope.row)"
|
|
||||||
/>
|
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip :content="$t('test_track.issue.delete')"
|
</el-col>
|
||||||
placement="top" :enterable="false">
|
</el-row>
|
||||||
<el-button type="danger" icon="el-icon-delete" size="mini"
|
|
||||||
circle v-if="scope.row.platform === 'Local'"
|
<el-row v-if="issuesSwitch">
|
||||||
@click="deleteIssue(scope.row)"
|
<el-col :span="20" :offset="1" class="issues-edit">
|
||||||
|
<el-input
|
||||||
|
type="text"
|
||||||
|
:placeholder="$t('test_track.issue.input_title')"
|
||||||
|
v-model="testCase.issues.title"
|
||||||
|
maxlength="60"
|
||||||
|
show-word-limit
|
||||||
|
/>
|
||||||
|
<ckeditor :editor="editor" :disabled="isReadOnly" :config="editorConfig"
|
||||||
|
v-model="testCase.issues.content"/>
|
||||||
|
<el-row v-if="hasTapdId">
|
||||||
|
{{ $t('test_track.issue.tapd_current_owner') }}
|
||||||
|
<el-select v-model="testCase.tapdUsers"
|
||||||
|
multiple
|
||||||
|
filterable
|
||||||
|
style="width: 20%"
|
||||||
|
:placeholder="$t('test_track.issue.please_choose_current_owner')"
|
||||||
|
collapse-tags size="small">
|
||||||
|
<el-option v-for="(userInfo, index) in users" :key="index" :label="userInfo.user"
|
||||||
|
:value="userInfo.user"/>
|
||||||
|
</el-select>
|
||||||
|
</el-row>
|
||||||
|
<el-row v-if="hasZentaoId">
|
||||||
|
{{ $t('test_track.issue.zentao_bug_build') }}
|
||||||
|
<el-select v-model="testCase.zentaoBuilds"
|
||||||
|
multiple
|
||||||
|
filterable
|
||||||
|
style="width: 20%"
|
||||||
|
:placeholder="$t('test_track.issue.zentao_bug_build')"
|
||||||
|
collapse-tags size="small">
|
||||||
|
<el-option v-for="(build, index) in Builds" :key="index" :label="build.name"
|
||||||
|
:value="build.id"/>
|
||||||
|
</el-select>
|
||||||
|
{{ $t('test_track.issue.zentao_bug_assigned') }}
|
||||||
|
<el-select v-model="testCase.zentaoAssigned"
|
||||||
|
filterable
|
||||||
|
style="width: 20%"
|
||||||
|
:placeholder="$t('test_track.issue.please_choose_current_owner')"
|
||||||
|
collapse-tags size="small">
|
||||||
|
<el-option v-for="(userInfo, index) in zentaoUsers" :key="index" :label="userInfo.name"
|
||||||
|
:value="userInfo.user"/>
|
||||||
|
</el-select>
|
||||||
|
</el-row>
|
||||||
|
<el-button type="primary" size="small" @click="saveIssues">{{ $t('commons.save') }}</el-button>
|
||||||
|
<el-button size="small" @click="issuesSwitch=false">{{ $t('commons.cancel') }}</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="20" :offset="1" class="issues-edit">
|
||||||
|
<el-table border class="adjust-table" :data="issues" style="width: 100%">
|
||||||
|
<el-table-column prop="id" :label="$t('test_track.issue.id')" show-overflow-tooltip/>
|
||||||
|
<el-table-column prop="title" :label="$t('test_track.issue.title')" show-overflow-tooltip/>
|
||||||
|
<el-table-column prop="description" :label="$t('test_track.issue.description')">
|
||||||
|
<template v-slot:default="scope">
|
||||||
|
<el-popover
|
||||||
|
placement="left"
|
||||||
|
width="400"
|
||||||
|
trigger="hover"
|
||||||
|
>
|
||||||
|
<ckeditor :editor="editor" disabled :config="readConfig"
|
||||||
|
v-model="scope.row.description"/>
|
||||||
|
<el-button slot="reference" type="text">{{ $t('test_track.issue.preview') }}</el-button>
|
||||||
|
</el-popover>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="status" :label="$t('test_track.issue.status')"/>
|
||||||
|
<el-table-column prop="platform" :label="$t('test_track.issue.platform')"/>
|
||||||
|
<el-table-column :label="$t('test_track.issue.operate')">
|
||||||
|
<template v-slot:default="scope">
|
||||||
|
<el-tooltip :content="$t('test_track.issue.close')"
|
||||||
|
placement="top" :enterable="false">
|
||||||
|
<el-button type="danger" icon="el-icon-circle-close" size="mini"
|
||||||
|
circle v-if="scope.row.platform === 'Local'"
|
||||||
|
@click="closeIssue(scope.row)"
|
||||||
|
/>
|
||||||
|
</el-tooltip>
|
||||||
|
<el-tooltip :content="$t('test_track.issue.delete')"
|
||||||
|
placement="top" :enterable="false">
|
||||||
|
<el-button type="danger" icon="el-icon-delete" size="mini"
|
||||||
|
circle v-if="scope.row.platform === 'Local'"
|
||||||
|
@click="deleteIssue(scope.row)"
|
||||||
|
/>
|
||||||
|
</el-tooltip>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="15" :offset="1">
|
||||||
|
<div>
|
||||||
|
<span class="cast_label">{{ $t('commons.remark') }}:</span>
|
||||||
|
<span v-if="testCase.remark == null || testCase.remark === ''"
|
||||||
|
style="color: darkgrey">{{ $t('commons.not_filled') }}</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<el-input :rows="3"
|
||||||
|
type="textarea"
|
||||||
|
v-if="testCase.remark"
|
||||||
|
disabled
|
||||||
|
v-model="testCase.remark"></el-input>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="15" :offset="1">
|
||||||
|
<div>
|
||||||
|
<span class="cast_label">{{ $t('test_track.case.attachment') }}:</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<test-case-attachment :table-data="tableData"
|
||||||
|
:read-only="isReadOnly"
|
||||||
|
:is-delete="false"
|
||||||
|
@handleDelete="handleDelete"
|
||||||
/>
|
/>
|
||||||
</el-tooltip>
|
</div>
|
||||||
</template>
|
</el-col>
|
||||||
</el-table-column>
|
</el-row>
|
||||||
</el-table>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="15" :offset="1">
|
|
||||||
<div>
|
|
||||||
<span class="cast_label">{{ $t('commons.remark') }}:</span>
|
|
||||||
<span v-if="testCase.remark == null || testCase.remark === ''"
|
|
||||||
style="color: darkgrey">{{ $t('commons.not_filled') }}</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div>
|
|
||||||
<el-input :rows="3"
|
|
||||||
type="textarea"
|
|
||||||
v-if="testCase.remark"
|
|
||||||
disabled
|
|
||||||
v-model="testCase.remark"></el-input>
|
|
||||||
</div>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-row>
|
</el-scrollbar>
|
||||||
<el-col :span="15" :offset="1">
|
</el-card>
|
||||||
<div>
|
</el-col>
|
||||||
<span class="cast_label">{{ $t('test_track.case.attachment') }}:</span>
|
<el-col :span="7">
|
||||||
</div>
|
<case-comment :case-id="testCase ? testCase.caseId : ''" class="comment-card"/>
|
||||||
<div>
|
</el-col>
|
||||||
<test-case-attachment :table-data="tableData"
|
|
||||||
:read-only="isReadOnly"
|
|
||||||
:is-delete="false"
|
|
||||||
@handleDelete="handleDelete"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</el-scrollbar>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -359,10 +369,12 @@ import PerformanceTestDetail from "../test/PerformanceTestDetail";
|
|||||||
import PerformanceTestResult from "../test/PerformanceTestResult";
|
import PerformanceTestResult from "../test/PerformanceTestResult";
|
||||||
import {listenGoBack, removeGoBackListener} from "@/common/js/utils";
|
import {listenGoBack, removeGoBackListener} from "@/common/js/utils";
|
||||||
import TestCaseAttachment from "@/business/components/track/case/components/TestCaseAttachment";
|
import TestCaseAttachment from "@/business/components/track/case/components/TestCaseAttachment";
|
||||||
|
import CaseComment from "@/business/components/track/case/components/CaseComment";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "FunctionalTestCaseEdit",
|
name: "FunctionalTestCaseEdit",
|
||||||
components: {
|
components: {
|
||||||
|
CaseComment,
|
||||||
PerformanceTestResult,
|
PerformanceTestResult,
|
||||||
PerformanceTestDetail,
|
PerformanceTestDetail,
|
||||||
ApiTestResult,
|
ApiTestResult,
|
||||||
@ -722,6 +734,18 @@ export default {
|
|||||||
height: 100vh;
|
height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.container >>> .el-card__body {
|
||||||
|
height: calc(100vh - 70px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.comment-card >>> .el-card__header {
|
||||||
|
padding: 0 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.comment-card >>> .el-card__body {
|
||||||
|
height: calc(100vh - 120px);
|
||||||
|
}
|
||||||
|
|
||||||
.case_container > .el-row {
|
.case_container > .el-row {
|
||||||
margin-top: 1%;
|
margin-top: 1%;
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ export default {
|
|||||||
install(Vue) {
|
install(Vue) {
|
||||||
|
|
||||||
// 登入请求不重定向
|
// 登入请求不重定向
|
||||||
let unRedirectUrls = new Set(['signin']);
|
let unRedirectUrls = new Set(['signin','ldap/signin']);
|
||||||
|
|
||||||
if (!axios) {
|
if (!axios) {
|
||||||
window.console.error('You have to install axios');
|
window.console.error('You have to install axios');
|
||||||
|
@ -171,7 +171,8 @@ export default {
|
|||||||
all_label: {
|
all_label: {
|
||||||
case: "all",
|
case: "all",
|
||||||
review: "all"
|
review: "all"
|
||||||
}
|
},
|
||||||
|
image: 'Image'
|
||||||
},
|
},
|
||||||
license: {
|
license: {
|
||||||
title: 'Authorization management',
|
title: 'Authorization management',
|
||||||
@ -795,88 +796,88 @@ export default {
|
|||||||
suffixFormatErr: "The file format does not meet the requirements",
|
suffixFormatErr: "The file format does not meet the requirements",
|
||||||
swagger_url_import: "Import using URL",
|
swagger_url_import: "Import using URL",
|
||||||
},
|
},
|
||||||
home_page:{
|
home_page: {
|
||||||
unit_of_measurement:"",
|
unit_of_measurement: "",
|
||||||
api_count_card:{
|
api_count_card: {
|
||||||
title: "API count",
|
title: "API count",
|
||||||
},
|
},
|
||||||
test_case_count_card:{
|
test_case_count_card: {
|
||||||
title: "Api test case count",
|
title: "Api test case count",
|
||||||
},
|
},
|
||||||
test_scene_count_card:{
|
test_scene_count_card: {
|
||||||
title: "Scene test case count",
|
title: "Scene test case count",
|
||||||
},
|
},
|
||||||
schedule_task_count_card:{
|
schedule_task_count_card: {
|
||||||
title: "Schedule task count",
|
title: "Schedule task count",
|
||||||
},
|
},
|
||||||
detail_card:{
|
detail_card: {
|
||||||
running:"Running",
|
running: "Running",
|
||||||
not_started:"Not started",
|
not_started: "Not started",
|
||||||
finished:"Finished",
|
finished: "Finished",
|
||||||
uncoverage:"Uncoverage",
|
uncoverage: "Uncoverage",
|
||||||
coverage:"Coverage",
|
coverage: "Coverage",
|
||||||
unexecute:"Unexecute",
|
unexecute: "Unexecute",
|
||||||
execution_failed:"Execution failed",
|
execution_failed: "Execution failed",
|
||||||
execution_pass:"Execution passed",
|
execution_pass: "Execution passed",
|
||||||
failed:"Failure",
|
failed: "Failure",
|
||||||
success:"Success",
|
success: "Success",
|
||||||
rate:{
|
rate: {
|
||||||
completion:"Completion rate",
|
completion: "Completion rate",
|
||||||
coverage:"Coverage rate",
|
coverage: "Coverage rate",
|
||||||
pass:"Pass rate",
|
pass: "Pass rate",
|
||||||
success:"Success rate",
|
success: "Success rate",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
api_details_card:{
|
api_details_card: {
|
||||||
title: "API",
|
title: "API",
|
||||||
this_week_add:"Added {0} this week",
|
this_week_add: "Added {0} this week",
|
||||||
},
|
},
|
||||||
test_case_details_card:{
|
test_case_details_card: {
|
||||||
title: "Test case",
|
title: "Test case",
|
||||||
this_week_add:"Added {0} this week",
|
this_week_add: "Added {0} this week",
|
||||||
this_week_execute:"Executed {0} this week",
|
this_week_execute: "Executed {0} this week",
|
||||||
executed:"Executed {0} in history",
|
executed: "Executed {0} in history",
|
||||||
this_week_add_sm:"Added {0}<br/> this week",
|
this_week_add_sm: "Added {0}<br/> this week",
|
||||||
this_week_execute_sm:"Executed {0}<br/> this week",
|
this_week_execute_sm: "Executed {0}<br/> this week",
|
||||||
executed_sm:"Executed {0}<br/> in history",
|
executed_sm: "Executed {0}<br/> in history",
|
||||||
},
|
},
|
||||||
test_scene_details_card:{
|
test_scene_details_card: {
|
||||||
title: "Scene",
|
title: "Scene",
|
||||||
this_week_add:"Added {0} this week",
|
this_week_add: "Added {0} this week",
|
||||||
this_week_execute:"Executed {0} this week",
|
this_week_execute: "Executed {0} this week",
|
||||||
executed:"Executed {0} in history",
|
executed: "Executed {0} in history",
|
||||||
this_week_add_sm:"Added {0}<br/> this week",
|
this_week_add_sm: "Added {0}<br/> this week",
|
||||||
this_week_execute_sm:"Executed {0}<br/> this week",
|
this_week_execute_sm: "Executed {0}<br/> this week",
|
||||||
executed_sm:"Executed {0}<br/> in history",
|
executed_sm: "Executed {0}<br/> in history",
|
||||||
},
|
},
|
||||||
schedule_task_details_card:{
|
schedule_task_details_card: {
|
||||||
title: "Schedule task",
|
title: "Schedule task",
|
||||||
this_week_add:"Added {0} this week",
|
this_week_add: "Added {0} this week",
|
||||||
this_week_execute:"Executed {0} this week",
|
this_week_execute: "Executed {0} this week",
|
||||||
executed:"Executed {0} in history",
|
executed: "Executed {0} in history",
|
||||||
this_week_add_sm:"Added {0}<br/> this week",
|
this_week_add_sm: "Added {0}<br/> this week",
|
||||||
this_week_execute_sm:"Executed {0}<br/> this week",
|
this_week_execute_sm: "Executed {0}<br/> this week",
|
||||||
executed_sm:"Executed {0}<br/> in history",
|
executed_sm: "Executed {0}<br/> in history",
|
||||||
},
|
},
|
||||||
failed_case_list:{
|
failed_case_list: {
|
||||||
title: "Top 10 failure cases about test plan in the past 7 days",
|
title: "Top 10 failure cases about test plan in the past 7 days",
|
||||||
table_coloum:{
|
table_coloum: {
|
||||||
index: "Ranking",
|
index: "Ranking",
|
||||||
case_name: "Case name",
|
case_name: "Case name",
|
||||||
case_type: "Case Type",
|
case_type: "Case Type",
|
||||||
test_plan: "Test plan",
|
test_plan: "Test plan",
|
||||||
failure_times: "Failure times",
|
failure_times: "Failure times",
|
||||||
},
|
},
|
||||||
table_value:{
|
table_value: {
|
||||||
case_type:{
|
case_type: {
|
||||||
api: "Api case",
|
api: "Api case",
|
||||||
scene: "Scenario case",
|
scene: "Scenario case",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
running_task_list:{
|
running_task_list: {
|
||||||
title: "Running schedule task",
|
title: "Running schedule task",
|
||||||
table_coloum:{
|
table_coloum: {
|
||||||
index: "Index",
|
index: "Index",
|
||||||
scenario: "Scene",
|
scenario: "Scene",
|
||||||
run_rule: "Rule",
|
run_rule: "Rule",
|
||||||
@ -885,6 +886,9 @@ export default {
|
|||||||
create_user: "Creator",
|
create_user: "Creator",
|
||||||
update_time: "Update time",
|
update_time: "Update time",
|
||||||
},
|
},
|
||||||
|
confirm: {
|
||||||
|
close_title: "Do you want to close this scheduled task?",
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -171,7 +171,8 @@ export default {
|
|||||||
all_label: {
|
all_label: {
|
||||||
case: "全部用例",
|
case: "全部用例",
|
||||||
review: "全部评审"
|
review: "全部评审"
|
||||||
}
|
},
|
||||||
|
image: '镜像'
|
||||||
},
|
},
|
||||||
license: {
|
license: {
|
||||||
title: '授权管理',
|
title: '授权管理',
|
||||||
@ -796,88 +797,88 @@ export default {
|
|||||||
suffixFormatErr: "文件格式不符合要求",
|
suffixFormatErr: "文件格式不符合要求",
|
||||||
swagger_url_import: "使用URL导入",
|
swagger_url_import: "使用URL导入",
|
||||||
},
|
},
|
||||||
home_page:{
|
home_page: {
|
||||||
unit_of_measurement:"个",
|
unit_of_measurement: "个",
|
||||||
api_count_card:{
|
api_count_card: {
|
||||||
title: "接口数量统计",
|
title: "接口数量统计",
|
||||||
},
|
},
|
||||||
test_case_count_card:{
|
test_case_count_card: {
|
||||||
title: "接口用例数量统计",
|
title: "接口用例数量统计",
|
||||||
},
|
},
|
||||||
test_scene_count_card:{
|
test_scene_count_card: {
|
||||||
title: "场景用例数量统计",
|
title: "场景用例数量统计",
|
||||||
},
|
},
|
||||||
schedule_task_count_card:{
|
schedule_task_count_card: {
|
||||||
title: "定时任务数量统计",
|
title: "定时任务数量统计",
|
||||||
},
|
},
|
||||||
detail_card:{
|
detail_card: {
|
||||||
running:"进行中",
|
running: "进行中",
|
||||||
not_started:"未开始",
|
not_started: "未开始",
|
||||||
finished:"已完成",
|
finished: "已完成",
|
||||||
uncoverage:"未覆盖",
|
uncoverage: "未覆盖",
|
||||||
coverage:"已覆盖",
|
coverage: "已覆盖",
|
||||||
unexecute:"未执行",
|
unexecute: "未执行",
|
||||||
execution_failed:"未通过",
|
execution_failed: "未通过",
|
||||||
execution_pass:"已通过",
|
execution_pass: "已通过",
|
||||||
failed:"失败",
|
failed: "失败",
|
||||||
success:"成功",
|
success: "成功",
|
||||||
rate:{
|
rate: {
|
||||||
completion:"完成率",
|
completion: "完成率",
|
||||||
coverage:"覆盖率",
|
coverage: "覆盖率",
|
||||||
pass:"通过率",
|
pass: "通过率",
|
||||||
success:"成功率",
|
success: "成功率",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
api_details_card:{
|
api_details_card: {
|
||||||
title: "接口",
|
title: "接口",
|
||||||
this_week_add:"本周新增: {0}个",
|
this_week_add: "本周新增: {0}个",
|
||||||
},
|
},
|
||||||
test_case_details_card:{
|
test_case_details_card: {
|
||||||
title: "用例",
|
title: "用例",
|
||||||
this_week_add:"本周新增: {0}个",
|
this_week_add: "本周新增: {0}个",
|
||||||
this_week_execute:"本周执行: {0}次",
|
this_week_execute: "本周执行: {0}次",
|
||||||
executed:"历史总执行: {0}次",
|
executed: "历史总执行: {0}次",
|
||||||
this_week_add_sm:"本周新增:<br/>{0}个",
|
this_week_add_sm: "本周新增:<br/>{0}个",
|
||||||
this_week_execute_sm:"本周执行:<br/>{0}次",
|
this_week_execute_sm: "本周执行:<br/>{0}次",
|
||||||
executed_sm:"历史总执行:<br/>{0}次",
|
executed_sm: "历史总执行:<br/>{0}次",
|
||||||
},
|
},
|
||||||
test_scene_details_card:{
|
test_scene_details_card: {
|
||||||
title: "场景",
|
title: "场景",
|
||||||
this_week_add:"本周新增: {0}个",
|
this_week_add: "本周新增: {0}个",
|
||||||
this_week_execute:"本周执行: {0}次",
|
this_week_execute: "本周执行: {0}次",
|
||||||
executed:"历史总执行: {0}次",
|
executed: "历史总执行: {0}次",
|
||||||
this_week_add_sm:"本周新增:<br/>{0}个",
|
this_week_add_sm: "本周新增:<br/>{0}个",
|
||||||
this_week_execute_sm:"本周执行:<br/>{0}次",
|
this_week_execute_sm: "本周执行:<br/>{0}次",
|
||||||
executed_sm:"历史总执行:<br/>{0}次",
|
executed_sm: "历史总执行:<br/>{0}次",
|
||||||
},
|
},
|
||||||
schedule_task_details_card:{
|
schedule_task_details_card: {
|
||||||
title: "定时任务",
|
title: "定时任务",
|
||||||
this_week_add:"本周新增: {0}个",
|
this_week_add: "本周新增: {0}个",
|
||||||
this_week_execute:"本周执行: {0}次",
|
this_week_execute: "本周执行: {0}次",
|
||||||
executed:"历史总执行: {0}次",
|
executed: "历史总执行: {0}次",
|
||||||
this_week_add_sm:"本周新增:<br/>{0}个",
|
this_week_add_sm: "本周新增:<br/>{0}个",
|
||||||
this_week_execute_sm:"本周执行:<br/>{0}次",
|
this_week_execute_sm: "本周执行:<br/>{0}次",
|
||||||
executed_sm:"历史总执行:<br/>{0}次",
|
executed_sm: "历史总执行:<br/>{0}次",
|
||||||
},
|
},
|
||||||
failed_case_list:{
|
failed_case_list: {
|
||||||
title: "过去7天测试计划失败用例TOP 10",
|
title: "过去7天测试计划失败用例TOP 10",
|
||||||
table_coloum:{
|
table_coloum: {
|
||||||
index: "排名",
|
index: "排名",
|
||||||
case_name: "用例名称",
|
case_name: "用例名称",
|
||||||
case_type: "用例类型",
|
case_type: "用例类型",
|
||||||
test_plan: "所属测试计划",
|
test_plan: "所属测试计划",
|
||||||
failure_times: "失败次数",
|
failure_times: "失败次数",
|
||||||
},
|
},
|
||||||
table_value:{
|
table_value: {
|
||||||
case_type:{
|
case_type: {
|
||||||
api: "接口用例",
|
api: "接口用例",
|
||||||
scene: "场景用例",
|
scene: "场景用例",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
running_task_list:{
|
running_task_list: {
|
||||||
title: "运行中的定时任务",
|
title: "运行中的定时任务",
|
||||||
table_coloum:{
|
table_coloum: {
|
||||||
index: "序号",
|
index: "序号",
|
||||||
scenario: "场景名称",
|
scenario: "场景名称",
|
||||||
run_rule: "运行规则",
|
run_rule: "运行规则",
|
||||||
@ -886,6 +887,9 @@ export default {
|
|||||||
create_user: "创建人",
|
create_user: "创建人",
|
||||||
update_time: "更新时间",
|
update_time: "更新时间",
|
||||||
},
|
},
|
||||||
|
confirm: {
|
||||||
|
close_title: "要关闭这条定时任务吗?",
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -171,7 +171,8 @@ export default {
|
|||||||
all_label: {
|
all_label: {
|
||||||
case: "全部用例",
|
case: "全部用例",
|
||||||
review: "全部評審"
|
review: "全部評審"
|
||||||
}
|
},
|
||||||
|
image: '鏡像'
|
||||||
},
|
},
|
||||||
license: {
|
license: {
|
||||||
title: '授權管理',
|
title: '授權管理',
|
||||||
@ -885,6 +886,9 @@ export default {
|
|||||||
create_user: "創建人",
|
create_user: "創建人",
|
||||||
update_time: "更新時間",
|
update_time: "更新時間",
|
||||||
},
|
},
|
||||||
|
confirm:{
|
||||||
|
close_title: "要關閉這條定時任務嗎?",
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user