Merge branch 'master' of https://github.com/metersphere/metersphere
This commit is contained in:
commit
3ac8b83d54
|
@ -275,7 +275,6 @@ public class Swagger2Parser extends SwaggerAbstractParser {
|
|||
} else {
|
||||
propertyList.add(new JSONObject());
|
||||
}
|
||||
|
||||
jsonObject.put(key, propertyList);
|
||||
} else {
|
||||
jsonObject.put(key, new ArrayList<>());
|
||||
|
|
|
@ -40,6 +40,26 @@
|
|||
<if test="request.name != null">
|
||||
and (lt.name like CONCAT('%', #{request.name},'%') or lt.num like CONCAT('%', #{request.name},'%'))
|
||||
</if>
|
||||
<if test="request.filters != null and request.filters.size() > 0">
|
||||
<foreach collection="request.filters.entrySet()" index="key" item="values">
|
||||
<if test="values != null and values.size() > 0">
|
||||
<choose>
|
||||
<when test="key=='status'">
|
||||
and lt.status in
|
||||
<foreach collection="values" item="value" separator="," open="(" close=")">
|
||||
#{value}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</if>
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
<if test="request.orders != null and request.orders.size() > 0">
|
||||
order by
|
||||
<foreach collection="request.orders" separator="," item="order">
|
||||
tplc.${order.name} ${order.type}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
|
@ -1,10 +1,12 @@
|
|||
package io.metersphere.track.request.testplan;
|
||||
|
||||
import io.metersphere.base.domain.TestPlanLoadCase;
|
||||
import io.metersphere.controller.request.OrderRequest;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
|
@ -12,4 +14,6 @@ public class LoadCaseRequest extends TestPlanLoadCase {
|
|||
private String projectId;
|
||||
private List<String> caseIds;
|
||||
private String name;
|
||||
private Map<String, List<String>> filters;
|
||||
private List<OrderRequest> orders;
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ import io.metersphere.base.mapper.LoadTestMapper;
|
|||
import io.metersphere.base.mapper.LoadTestReportMapper;
|
||||
import io.metersphere.base.mapper.TestPlanLoadCaseMapper;
|
||||
import io.metersphere.base.mapper.ext.ExtTestPlanLoadCaseMapper;
|
||||
import io.metersphere.controller.request.OrderRequest;
|
||||
import io.metersphere.performance.service.PerformanceTestService;
|
||||
import io.metersphere.track.dto.TestPlanLoadCaseDTO;
|
||||
import io.metersphere.track.request.testplan.LoadCaseReportRequest;
|
||||
|
@ -50,6 +51,15 @@ public class TestPlanLoadCaseService {
|
|||
}
|
||||
|
||||
public List<TestPlanLoadCaseDTO> list(LoadCaseRequest request) {
|
||||
List<OrderRequest> orders = request.getOrders();
|
||||
if (orders == null || orders.size() < 1) {
|
||||
OrderRequest orderRequest = new OrderRequest();
|
||||
orderRequest.setName("create_time");
|
||||
orderRequest.setType("desc");
|
||||
orders = new ArrayList<>();
|
||||
orders.add(orderRequest);
|
||||
}
|
||||
request.setOrders(orders);
|
||||
return extTestPlanLoadCaseMapper.selectTestPlanLoadCaseList(request);
|
||||
}
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 77a4db3ee59003d88aed53601d0d2bfa09ec272f
|
||||
Subproject commit e4521190f0f1be113c8b84fbdcdf8ff273bf274e
|
|
@ -49,8 +49,13 @@
|
|||
},
|
||||
methods: {
|
||||
validateSocket(socket) {
|
||||
// if (!socket) return true;
|
||||
if (socket !== ''){
|
||||
if (!socket) {
|
||||
this.httpConfig.domain = socket;
|
||||
this.httpConfig.port = '';
|
||||
this.httpConfig.socket = socket;
|
||||
return true;
|
||||
}
|
||||
|
||||
let urlStr = this.httpConfig.protocol + '://' + socket;
|
||||
let url = {};
|
||||
try {
|
||||
|
@ -67,13 +72,6 @@
|
|||
this.httpConfig.socket = this.httpConfig.domain + path;
|
||||
}
|
||||
return true;
|
||||
}else {
|
||||
this.httpConfig.domain = socket;
|
||||
this.httpConfig.port = '';
|
||||
this.httpConfig.socket = socket;
|
||||
return true;
|
||||
}
|
||||
|
||||
},
|
||||
validate() {
|
||||
let isValidate = false;
|
||||
|
|
|
@ -64,11 +64,11 @@ export class HttpConfig extends BaseConfig {
|
|||
constructor(options = {}) {
|
||||
super();
|
||||
|
||||
this.socket = undefined;
|
||||
this.domain = undefined;
|
||||
this.socket = '';
|
||||
this.domain = '';
|
||||
this.headers = [];
|
||||
this.protocol = 'https';
|
||||
this.port = undefined;
|
||||
this.port = '';
|
||||
|
||||
this.set(options);
|
||||
this.sets({headers: KeyValue}, options);
|
||||
|
|
|
@ -284,15 +284,15 @@ export default {
|
|||
},
|
||||
sort(column) {
|
||||
// 每次只对一个字段排序
|
||||
// if (this.condition.orders) {
|
||||
// this.condition.orders = [];
|
||||
// }
|
||||
// _sort(column, this.condition);
|
||||
// this.initTable();
|
||||
if (this.condition.orders) {
|
||||
this.condition.orders = [];
|
||||
}
|
||||
_sort(column, this.condition);
|
||||
this.initTable();
|
||||
},
|
||||
filter(filters) {
|
||||
// _filter(filters, this.condition);
|
||||
// this.initTable();
|
||||
_filter(filters, this.condition);
|
||||
this.initTable();
|
||||
},
|
||||
getReport(data) {
|
||||
const {loadReportId} = data;
|
||||
|
|
Loading…
Reference in New Issue