Merge branch 'master' of https://github.com/metersphere/metersphere
This commit is contained in:
commit
642de28841
|
@ -19,7 +19,6 @@ import org.apache.jmeter.config.ConfigTestElement;
|
||||||
import org.apache.jmeter.save.SaveService;
|
import org.apache.jmeter.save.SaveService;
|
||||||
import org.apache.jmeter.testelement.TestElement;
|
import org.apache.jmeter.testelement.TestElement;
|
||||||
import org.apache.jorphan.collections.HashTree;
|
import org.apache.jorphan.collections.HashTree;
|
||||||
import org.apache.jorphan.collections.ListedHashTree;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
@ -65,9 +64,7 @@ public class MsDubboSampler extends MsTestElement {
|
||||||
this.getRefElement(this);
|
this.getRefElement(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
final HashTree testPlanTree = new ListedHashTree();
|
final HashTree testPlanTree = tree.add(dubboSample());
|
||||||
testPlanTree.add(dubboConfig());
|
|
||||||
tree.set(dubboSample(), testPlanTree);
|
|
||||||
if (CollectionUtils.isNotEmpty(hashTree)) {
|
if (CollectionUtils.isNotEmpty(hashTree)) {
|
||||||
hashTree.forEach(el -> {
|
hashTree.forEach(el -> {
|
||||||
el.toHashTree(testPlanTree, el.getHashTree(), config);
|
el.toHashTree(testPlanTree, el.getHashTree(), config);
|
||||||
|
@ -115,7 +112,7 @@ public class MsDubboSampler extends MsTestElement {
|
||||||
|
|
||||||
private ConfigTestElement configCenter(MsConfigCenter configCenter) {
|
private ConfigTestElement configCenter(MsConfigCenter configCenter) {
|
||||||
ConfigTestElement configTestElement = new ConfigTestElement();
|
ConfigTestElement configTestElement = new ConfigTestElement();
|
||||||
if (configCenter != null) {
|
if (configCenter != null && configCenter.getProtocol() != null && configCenter.getUsername() != null && configCenter.getPassword() != null) {
|
||||||
Constants.setConfigCenterProtocol(configCenter.getProtocol(), configTestElement);
|
Constants.setConfigCenterProtocol(configCenter.getProtocol(), configTestElement);
|
||||||
Constants.setConfigCenterGroup(configCenter.getGroup(), configTestElement);
|
Constants.setConfigCenterGroup(configCenter.getGroup(), configTestElement);
|
||||||
Constants.setConfigCenterNamespace(configCenter.getNamespace(), configTestElement);
|
Constants.setConfigCenterNamespace(configCenter.getNamespace(), configTestElement);
|
||||||
|
|
|
@ -166,7 +166,11 @@
|
||||||
data.protocol = this.currentProtocol;
|
data.protocol = this.currentProtocol;
|
||||||
data.request = this.request;
|
data.request = this.request;
|
||||||
data.request.name = data.name;
|
data.request.name = data.name;
|
||||||
|
if (this.currentProtocol === "DUBBO" || this.currentProtocol === "dubbo://") {
|
||||||
|
data.request.protocol = "dubbo://";
|
||||||
|
} else {
|
||||||
data.request.protocol = this.currentProtocol;
|
data.request.protocol = this.currentProtocol;
|
||||||
|
}
|
||||||
data.id = data.request.id;
|
data.id = data.request.id;
|
||||||
data.response = this.response;
|
data.response = this.response;
|
||||||
},
|
},
|
||||||
|
|
|
@ -77,14 +77,16 @@
|
||||||
this.request.method = value;
|
this.request.method = value;
|
||||||
},
|
},
|
||||||
getProviderList() {
|
getProviderList() {
|
||||||
if (this.request.registryCenter === undefined || this.request.dubboConfig ===undefined) {
|
let param = {};
|
||||||
return;
|
if (this.request.registryCenter) {
|
||||||
|
param.protocol = this.request.registryCenter.protocol;
|
||||||
|
param.address = this.request.registryCenter.address;
|
||||||
|
param.group = this.request.registryCenter.group;
|
||||||
|
} else if (this.request.dubboConfig.registryCenter) {
|
||||||
|
param.protocol = this.request.dubboConfig.registryCenter.protocol;
|
||||||
|
param.address = this.request.dubboConfig.registryCenter.address;
|
||||||
|
param.group = this.request.dubboConfig.registryCenter.group;
|
||||||
}
|
}
|
||||||
let param = {
|
|
||||||
protocol: this.request.registryCenter.protocol || this.request.dubboConfig.registryCenter.protocol,
|
|
||||||
address: this.request.registryCenter.address || this.request.dubboConfig.registryCenter.address,
|
|
||||||
group: this.request.registryCenter.group || this.request.dubboConfig.registryCenter.group,
|
|
||||||
};
|
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$post("/api/dubbo/providers", param).then(response => {
|
this.$post("/api/dubbo/providers", param).then(response => {
|
||||||
|
|
Loading…
Reference in New Issue