Merge branch 'v1.8' of github.com:metersphere/metersphere into v1.8
This commit is contained in:
commit
fc9d040579
|
@ -13,6 +13,9 @@ pipeline {
|
||||||
stage('Build/Test') {
|
stage('Build/Test') {
|
||||||
steps {
|
steps {
|
||||||
configFileProvider([configFile(fileId: 'metersphere-maven', targetLocation: 'settings.xml')]) {
|
configFileProvider([configFile(fileId: 'metersphere-maven', targetLocation: 'settings.xml')]) {
|
||||||
|
sh "cd frontend"
|
||||||
|
sh "yarn install"
|
||||||
|
sh "cd .."
|
||||||
sh "mvn clean package --settings ./settings.xml"
|
sh "mvn clean package --settings ./settings.xml"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -242,8 +242,8 @@ public class ApiAutomationService {
|
||||||
} else {
|
} else {
|
||||||
scenario.setUserId(request.getUserId());
|
scenario.setUserId(request.getUserId());
|
||||||
}
|
}
|
||||||
if (StringUtils.isEmpty(request.getApiScenarioModuleId())) {
|
if (StringUtils.isEmpty(request.getApiScenarioModuleId()) || StringUtils.isEmpty(request.getModulePath())) {
|
||||||
scenario.setApiScenarioModuleId("root");
|
scenario.setApiScenarioModuleId("default-module");
|
||||||
scenario.setModulePath("/默认模块");
|
scenario.setModulePath("/默认模块");
|
||||||
}
|
}
|
||||||
return scenario;
|
return scenario;
|
||||||
|
|
|
@ -262,9 +262,9 @@ public class ApiDefinitionService {
|
||||||
test.setEnvironmentId(request.getEnvironmentId());
|
test.setEnvironmentId(request.getEnvironmentId());
|
||||||
test.setUserId(request.getUserId());
|
test.setUserId(request.getUserId());
|
||||||
test.setTags(request.getTags());
|
test.setTags(request.getTags());
|
||||||
if (StringUtils.isEmpty(request.getModuleId())) {
|
if (StringUtils.isEmpty(request.getModulePath()) || StringUtils.isEmpty(request.getModuleId())) {
|
||||||
test.setModulePath("/默认模块");
|
test.setModulePath("/默认模块");
|
||||||
test.setModuleId("root");
|
test.setModuleId("default-module");
|
||||||
}
|
}
|
||||||
apiDefinitionMapper.updateByPrimaryKeySelective(test);
|
apiDefinitionMapper.updateByPrimaryKeySelective(test);
|
||||||
return test;
|
return test;
|
||||||
|
@ -290,9 +290,9 @@ public class ApiDefinitionService {
|
||||||
test.setStatus(APITestStatus.Underway.name());
|
test.setStatus(APITestStatus.Underway.name());
|
||||||
test.setModulePath(request.getModulePath());
|
test.setModulePath(request.getModulePath());
|
||||||
test.setModuleId(request.getModuleId());
|
test.setModuleId(request.getModuleId());
|
||||||
if (StringUtils.isEmpty(request.getModuleId())) {
|
if (StringUtils.isEmpty(request.getModulePath()) || StringUtils.isEmpty(request.getModuleId())) {
|
||||||
test.setModulePath("/默认模块");
|
test.setModulePath("/默认模块");
|
||||||
test.setModuleId("root");
|
test.setModuleId("default-module");
|
||||||
}
|
}
|
||||||
test.setResponse(JSONObject.toJSONString(request.getResponse()));
|
test.setResponse(JSONObject.toJSONString(request.getResponse()));
|
||||||
test.setEnvironmentId(request.getEnvironmentId());
|
test.setEnvironmentId(request.getEnvironmentId());
|
||||||
|
@ -604,8 +604,8 @@ public class ApiDefinitionService {
|
||||||
}
|
}
|
||||||
for (int i = 0; i < data.size(); i++) {
|
for (int i = 0; i < data.size(); i++) {
|
||||||
ApiDefinitionWithBLOBs item = data.get(i);
|
ApiDefinitionWithBLOBs item = data.get(i);
|
||||||
if (StringUtils.isEmpty(item.getModuleId())) {
|
if (StringUtils.isEmpty(item.getModuleId()) || StringUtils.isEmpty(item.getModulePath())) {
|
||||||
item.setModuleId("root");
|
item.setModuleId("default-module");
|
||||||
item.setModulePath("/默认模块");
|
item.setModulePath("/默认模块");
|
||||||
}
|
}
|
||||||
if (item.getName().length() > 255) {
|
if (item.getName().length() > 255) {
|
||||||
|
|
|
@ -296,7 +296,7 @@
|
||||||
}
|
}
|
||||||
let api = {
|
let api = {
|
||||||
status: "Underway", method: "GET", userId: getCurrentUser().id,
|
status: "Underway", method: "GET", userId: getCurrentUser().id,
|
||||||
url: "", protocol: this.currentProtocol, environmentId: "", moduleId: 'root', modulePath: "/" + this.$t("commons.module_title")
|
url: "", protocol: this.currentProtocol, environmentId: "", moduleId: 'default-module', modulePath: "/" + this.$t("commons.module_title")
|
||||||
};
|
};
|
||||||
if (this.nodeTree && this.nodeTree.length > 0) {
|
if (this.nodeTree && this.nodeTree.length > 0) {
|
||||||
api.moduleId = this.nodeTree[0].id;
|
api.moduleId = this.nodeTree[0].id;
|
||||||
|
|
|
@ -275,7 +275,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
addModule(row) {
|
addModule(row) {
|
||||||
this.saveApi(row, "root");
|
this.saveApi(row, "default-module");
|
||||||
},
|
},
|
||||||
saveApi(row, module) {
|
saveApi(row, module) {
|
||||||
let data = this.api;
|
let data = this.api;
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
:condition="condition"
|
:condition="condition"
|
||||||
:current-module="currentModule"
|
:current-module="currentModule"
|
||||||
:is-read-only="isReadOnly"
|
:is-read-only="isReadOnly"
|
||||||
:moduleOptions="extendTreeNodes"
|
:moduleOptions="data"
|
||||||
@exportAPI="exportAPI"
|
@exportAPI="exportAPI"
|
||||||
@saveAsEdit="saveAsEdit"
|
@saveAsEdit="saveAsEdit"
|
||||||
@refreshTable="$emit('refreshTable')"
|
@refreshTable="$emit('refreshTable')"
|
||||||
|
@ -62,7 +62,6 @@
|
||||||
},
|
},
|
||||||
data: [],
|
data: [],
|
||||||
currentModule: {},
|
currentModule: {},
|
||||||
extendTreeNodes: [],
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
@ -131,17 +130,17 @@
|
||||||
this.result = this.$get(url, response => {
|
this.result = this.$get(url, response => {
|
||||||
if (response.data != undefined && response.data != null) {
|
if (response.data != undefined && response.data != null) {
|
||||||
this.data = response.data;
|
this.data = response.data;
|
||||||
this.extendTreeNodes = [];
|
this.data.unshift({
|
||||||
this.extendTreeNodes.unshift({
|
"id": "default-module",
|
||||||
"id": "root",
|
|
||||||
"name": this.$t('commons.module_title'),
|
"name": this.$t('commons.module_title'),
|
||||||
"level": 0,
|
"level": 0,
|
||||||
"children": this.data,
|
"path": "/" + this.$t('commons.module_title'),
|
||||||
|
"children": [],
|
||||||
});
|
});
|
||||||
this.extendTreeNodes.forEach(node => {
|
this.data.forEach(node => {
|
||||||
buildTree(node, {path: ''});
|
buildTree(node, {path: ''});
|
||||||
});
|
});
|
||||||
this.$emit('setModuleOptions', this.extendTreeNodes);
|
this.$emit('setModuleOptions', this.data);
|
||||||
this.$emit('setNodeTree', this.data);
|
this.$emit('setNodeTree', this.data);
|
||||||
if (this.$refs.nodeTree) {
|
if (this.$refs.nodeTree) {
|
||||||
this.$refs.nodeTree.filter(this.condition.filterText);
|
this.$refs.nodeTree.filter(this.condition.filterText);
|
||||||
|
|
|
@ -92,7 +92,7 @@ export default {
|
||||||
allLabel: {
|
allLabel: {
|
||||||
type: String,
|
type: String,
|
||||||
default() {
|
default() {
|
||||||
return this.$t('commons.module_title');
|
return this.$t("commons.all_label.case");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
nameLimit: {
|
nameLimit: {
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 2115bd28a90854d2b6276a90878934715498c584
|
Subproject commit 07951ba17aef6f29e50cfd68e40de3266f9a60cd
|
Loading…
Reference in New Issue