Merge branch 'v1.7'

This commit is contained in:
chenjianxing 2021-02-05 10:56:42 +08:00
commit b41edd7c03
11 changed files with 204 additions and 184 deletions

View File

@ -196,6 +196,8 @@ public abstract class MsTestElement {
csvDataSet.setProperty("filename", BODY_FILE_DIR + "/" + item.getFiles().get(0).getId() + "_" + item.getFiles().get(0).getName());
}
csvDataSet.setIgnoreFirstLine(false);
csvDataSet.setRecycle(true);
csvDataSet.setProperty("recycle", true);
csvDataSet.setProperty("delimiter", item.getDelimiter());
csvDataSet.setComment(StringUtils.isEmpty(item.getDescription()) ? "" : item.getDescription());
tree.add(csvDataSet);

View File

@ -171,12 +171,16 @@ public class HistoricalDataUpgradeService {
element = new MsJDBCSampler();
SqlRequest request1 = (SqlRequest) request;
BeanUtils.copyBean(element, request1);
EnvironmentDTO dto = environmentDTOMap.get(request1.getDataSource());
if (dto != null) {
((MsJDBCSampler) element).setEnvironmentId(dto.getEnvironmentId());
((MsJDBCSampler) element).setDataSourceId(dto.getDatabaseConfig().getId());
((MsJDBCSampler) element).setDataSource(dto.getDatabaseConfig());
}
if (CollectionUtils.isEmpty(request1.getVariables())) {
((MsJDBCSampler) element).setVariables(new ArrayList<>());
}
element.setType("JDBCSampler");
}
if (request instanceof TCPRequest) {

View File

@ -11,6 +11,7 @@
@edit="edit"
@drag="drag"
@remove="remove"
@refresh="list"
@nodeSelectEvent="nodeChange"
ref="nodeTree">

View File

@ -22,8 +22,8 @@
import MsEditCompleteDubboApi from "./complete/EditCompleteDubboApi";
import MsEditCompleteSqlApi from "./complete/EditCompleteSQLApi";
import {ResponseFactory, Body} from "../model/ApiTestModel";
import {getUUID, getCurrentProjectID} from "@/common/js/utils";
import {Body} from "../model/ApiTestModel";
import {getUUID} from "@/common/js/utils";
import {createComponent, Request} from "./jmeter/components";
import Sampler from "./jmeter/components/sampler/sampler";
import {WORKSPACE_ID} from '@/common/js/constants';

View File

@ -11,6 +11,7 @@
@edit="edit"
@drag="drag"
@remove="remove"
@refresh="list"
@nodeSelectEvent="nodeChange"
ref="nodeTree">

View File

@ -44,7 +44,7 @@
</template>
<script>
import {downloadFile, getUUID} from "@/common/js/utils";
import {getUUID, uuid} from "@/common/js/utils";
import MsApiCaseList from "../case/ApiCaseList";
import MsContainer from "../../../../common/components/MsContainer";
import MsBottomContainer from "../BottomContainer";
@ -161,12 +161,14 @@
},
saveAsApi() {
let data = {};
this.api.request.id = uuid();
data.request = JSON.stringify(this.api.request);
data.method = this.api.method;
data.status = this.api.status;
data.userId = this.api.userId;
data.description = this.api.description;
this.$emit('saveAsApi', data);
this.$emit('refresh');
},
updateApi() {
let url = "/api/definition/update";

View File

@ -44,7 +44,7 @@
</template>
<script>
import {downloadFile, getUUID} from "@/common/js/utils";
import {getUUID, uuid} from "@/common/js/utils";
import MsApiCaseList from "../case/ApiCaseList";
import MsContainer from "../../../../common/components/MsContainer";
import MsBottomContainer from "../BottomContainer";
@ -160,12 +160,14 @@
},
saveAsApi() {
let data = {};
this.api.request.id = uuid();
data.request = JSON.stringify(this.api.request);
data.method = this.api.method;
data.status = this.api.status;
data.userId = this.api.userId;
data.description = this.api.description;
this.$emit('saveAsApi', data);
this.$emit('refresh');
},
updateApi() {
let url = "/api/definition/update";
@ -175,7 +177,7 @@
if (this.syncTabs.indexOf(this.api.id) === -1) {
this.syncTabs.push(this.api.id);
}
this.$emit('saveApi', this.api);
this.$emit('refresh');
});
},
selectTestCase(item) {

View File

@ -55,7 +55,7 @@
<script>
import MsApiRequestForm from "../request/http/ApiHttpRequestForm";
import {downloadFile, getUUID, getCurrentProjectID} from "@/common/js/utils";
import {getUUID, uuid} from "@/common/js/utils";
import MsApiCaseList from "../case/ApiCaseList";
import MsContainer from "../../../../common/components/MsContainer";
import MsBottomContainer from "../BottomContainer";
@ -173,12 +173,14 @@
},
saveAsApi() {
let data = {};
this.api.request.id = uuid();
data.request = JSON.stringify(this.api.request);
data.method = this.api.method;
data.status = this.api.status;
data.userId = this.api.userId;
data.description = this.api.description;
this.$emit('saveAsApi', data);
this.$emit('refresh');
},
updateApi() {
let url = "/api/definition/update";

View File

@ -469,11 +469,12 @@ export default {
},
},
watch: {
'report.testId': {
report: {
handler() {
this.getJmxContent();
},
}
deep: true
},
}
}
</script>

View File

@ -220,6 +220,10 @@ export default {
if (dropType === "none" || dropType === undefined) {
return;
}
if (dropNode.data.id === 'root' && dropType === 'before') {
this.$emit('refresh');
return false;
}
let param = this.buildParam(draggingNode, dropNode, dropType);
let list = [];
this.getNodeTree(this.treeNodes, draggingNode.data.id, list);

View File

@ -8,6 +8,7 @@
@drag="drag"
@remove="remove"
@nodeSelectEvent="nodeChange"
@refresh="list"
ref="nodeTree"/>
</template>