Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
4576b38f80
|
@ -250,7 +250,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.metersphere</groupId>
|
<groupId>io.metersphere</groupId>
|
||||||
<artifactId>jmeter-plugins-dubbo</artifactId>
|
<artifactId>jmeter-plugins-dubbo</artifactId>
|
||||||
<version>2.7.11</version>
|
<version>2.7.12</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- LDAP Module -->
|
<!-- LDAP Module -->
|
||||||
|
@ -362,14 +362,6 @@
|
||||||
<artifactId>httpclient</artifactId>
|
<artifactId>httpclient</artifactId>
|
||||||
<version>4.5.6</version>
|
<version>4.5.6</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.commons</groupId>
|
|
||||||
<artifactId>commons-text</artifactId>
|
|
||||||
<version>1.3</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|
|
@ -61,7 +61,7 @@ public class MsParser extends ApiImportAbstractParser {
|
||||||
Object body = requestObject.get("body");
|
Object body = requestObject.get("body");
|
||||||
if (body instanceof JSONArray) {
|
if (body instanceof JSONArray) {
|
||||||
JSONArray bodies = requestObject.getJSONArray("body");
|
JSONArray bodies = requestObject.getJSONArray("body");
|
||||||
if (StringUtils.equalsIgnoreCase(requestObject.getString("method"), "POST") && bodies != null) {
|
if (bodies != null) {
|
||||||
StringBuilder bodyStr = new StringBuilder();
|
StringBuilder bodyStr = new StringBuilder();
|
||||||
for (int i = 0; i < bodies.size(); i++) {
|
for (int i = 0; i < bodies.size(); i++) {
|
||||||
String tmp = bodies.getString(i);
|
String tmp = bodies.getString(i);
|
||||||
|
@ -74,7 +74,7 @@ public class MsParser extends ApiImportAbstractParser {
|
||||||
}
|
}
|
||||||
} else if (body instanceof JSONObject) {
|
} else if (body instanceof JSONObject) {
|
||||||
JSONObject bodyObj = requestObject.getJSONObject("body");
|
JSONObject bodyObj = requestObject.getJSONObject("body");
|
||||||
if (StringUtils.equalsIgnoreCase(requestObject.getString("method"), "POST") && bodyObj != null) {
|
if (bodyObj != null) {
|
||||||
JSONArray kvs = new JSONArray();
|
JSONArray kvs = new JSONArray();
|
||||||
bodyObj.keySet().forEach(key -> {
|
bodyObj.keySet().forEach(key -> {
|
||||||
JSONObject kv = new JSONObject();
|
JSONObject kv = new JSONObject();
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
alter table message_task
|
ALTER TABLE message_task
|
||||||
add create_time bigint(13) null;
|
ADD create_time bigint(13) DEFAULT 0;
|
|
@ -1,3 +0,0 @@
|
||||||
alter table message_task
|
|
||||||
alter column create_time set default 0;
|
|
||||||
|
|
|
@ -162,9 +162,11 @@ export default {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getColor(enable, method) {
|
getColor(requestEnable, method) {
|
||||||
if (enable) {
|
if (this.scenario.enable && requestEnable) {
|
||||||
return this.methodColorMap.get(method);
|
return this.methodColorMap.get(method);
|
||||||
|
} else {
|
||||||
|
return '#909399';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
select(request) {
|
select(request) {
|
||||||
|
|
|
@ -1363,15 +1363,19 @@ class JMXGenerator {
|
||||||
}
|
}
|
||||||
|
|
||||||
addContentType(request, type) {
|
addContentType(request, type) {
|
||||||
|
let hasContentType = false;
|
||||||
for (let index in request.headers) {
|
for (let index in request.headers) {
|
||||||
if (request.headers.hasOwnProperty(index)) {
|
if (request.headers.hasOwnProperty(index)) {
|
||||||
if (request.headers[index].name === 'Content-Type') {
|
if (request.headers[index].name === 'Content-Type' && request.headers[index].enable != false) {
|
||||||
request.headers.splice(index, 1);
|
request.headers.splice(index, 1);
|
||||||
|
hasContentType = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
request.headers.push(new KeyValue({name: 'Content-Type', value: type}));
|
if (!hasContentType) {
|
||||||
|
request.headers.push(new KeyValue({name: 'Content-Type', value: type}));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
addRequestArguments(httpSamplerProxy, request) {
|
addRequestArguments(httpSamplerProxy, request) {
|
||||||
|
|
Loading…
Reference in New Issue