Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Somebody-JIAN committed Jan 27, 2021
2 parents 1f011e7 + a404fbf commit 99ec66a
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.github.pagehelper.PageInterceptor;
import io.metersphere.base.domain.ApiTestReportDetail;
import io.metersphere.base.domain.AuthSource;
import io.metersphere.base.domain.FileContent;
import io.metersphere.base.domain.TestResource;
import io.metersphere.commons.utils.CompressUtils;
Expand Down Expand Up @@ -45,6 +46,7 @@ public MybatisInterceptor dbInterceptor() {
configList.add(new MybatisInterceptorConfig(FileContent.class, "file", CompressUtils.class, "zip", "unzip"));
configList.add(new MybatisInterceptorConfig(ApiTestReportDetail.class, "content", CompressUtils.class, "compress", "decompress"));
configList.add(new MybatisInterceptorConfig(TestResource.class, "configuration"));
configList.add(new MybatisInterceptorConfig(AuthSource.class, "configuration"));
interceptor.setInterceptorConfigList(configList);
return interceptor;
}
Expand Down
2 changes: 1 addition & 1 deletion backend/src/main/java/io/metersphere/xpack
Submodule xpack updated from bb9c03 to 387ca5
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
highlight-current
@node-expand="nodeExpand"
@node-collapse="nodeCollapse"
:allow-drop="allowDrop" @node-drag-end="allowDrag" @node-click="nodeClick" v-if="!loading" draggable class="ms-is-leaf">
:allow-drop="allowDrop" @node-drag-end="allowDrag" @node-click="nodeClick" v-if="!loading" draggable>
<span class="custom-tree-node father" slot-scope="{ node, data}" style="width: 96%">
<!-- 步骤组件-->
<ms-component-config :type="data.type" :scenario="data" :response="response" :currentScenario="currentScenario"
Expand Down Expand Up @@ -1037,11 +1037,11 @@
z-index: 1;
}
/deep/ .el-tree-node__expand-icon.expanded {
.ms-expanded >>> .el-tree-node__expand-icon.expanded {
color: #7C3985;
}
/deep/ .el-icon-caret-right {
.ms-el-icon-caret-right .el-icon-caret-right {
color: #7C3985;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
v-if="!readOnly"
class="tag-input el-input"
v-model="newTag"
placeholder="$t('commons.tag_tip)"
:placeholder="$t('commons.tag_tip')"
@keydown.delete.stop="removeLastTag"
@keydown="addNew"
@blur="addNew"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<ms-run :debug="true" :reportId="reportId" :run-data="runData" @runRefresh="runRefresh" ref="runTest"/>
</el-card>
<div v-if="scenario">
<el-button style="float: right;margin: 20px" type="primary" @click="handleCommand('save_as')"> {{$t('commons.save')}}</el-button>
<el-button style="float: right;margin: 20px" type="primary" @click="handleCommand('save_as_api')"> {{$t('commons.save')}}</el-button>
</div>
<!-- 加载用例 -->
<ms-api-case-list :loaded="false" ref="caseList"/>
Expand Down Expand Up @@ -103,7 +103,10 @@
handleCommand(e) {
if (e === "save_as") {
this.saveAs();
} else {
} else if (e === 'save_as_api') {
this.saveAsApi();
}
else {
this.runDebug();
}
},
Expand All @@ -121,6 +124,11 @@
this.loading = false;
this.$refs.debugResult.reload();
},
saveAsApi() {
let obj = {request: this.request};
obj.request.id = getUUID();
this.$emit('saveAs', obj);
},
saveAs() {
let obj = {request: this.request};
obj.request.id = getUUID();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
</el-card>

<div v-if="scenario">
<el-button style="float: right;margin: 20px" type="primary" @click="handleCommand('save_as')"> {{$t('commons.save')}}</el-button>
<el-button style="float: right;margin: 20px" type="primary" @click="handleCommand('save_as_api')"> {{$t('commons.save')}}</el-button>
</div>
<!-- 加载用例 -->
<ms-api-case-list :loaded="false" ref="caseList"/>
Expand Down Expand Up @@ -131,7 +131,10 @@
handleCommand(e) {
if (e === "save_as") {
this.saveAs();
} else {
} else if (e === 'save_as_api') {
this.saveAsApi();
}
else {
this.runDebug();
}
},
Expand All @@ -157,6 +160,22 @@
this.loading = false;
this.$refs.debugResult.reload();
},
saveAsApi() {
this.$refs['debugForm'].validate((valid) => {
if (valid) {
this.debugForm.id = null;
this.request.id = getUUID();
this.debugForm.request = this.request;
this.debugForm.userId = getCurrentUser().id;
this.debugForm.status = "Underway";
this.debugForm.protocol = this.currentProtocol;
this.$emit('saveAs', this.debugForm);
}
else {
return false;
}
})
},
saveAs() {
this.$refs['debugForm'].validate((valid) => {
if (valid) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<ms-run :debug="true" :reportId="reportId" :run-data="runData" @runRefresh="runRefresh" ref="runTest"/>
</el-card>
<div v-if="scenario">
<el-button style="float: right;margin: 20px" type="primary" @click="handleCommand('save_as')"> {{$t('commons.save')}}</el-button>
<el-button style="float: right;margin: 20px" type="primary" @click="handleCommand('save_as_api')"> {{$t('commons.save')}}</el-button>
</div>
<!-- 加载用例 -->
<ms-api-case-list :loaded="false" ref="caseList"/>
Expand Down Expand Up @@ -105,7 +105,10 @@
handleCommand(e) {
if (e === "save_as") {
this.saveAs();
} else {
} else if (e === 'save_as_api') {
this.saveAsApi();
}
else {
this.$refs['requestForm'].validate();
}
},
Expand All @@ -123,6 +126,11 @@
this.loading = false;
this.$refs.debugResult.reload();
},
saveAsApi() {
let obj = {request: this.request};
obj.request.id = getUUID();
this.$emit('saveAs', obj);
},
saveAs() {
let obj = {request: this.request};
obj.request.id = getUUID();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<ms-run :debug="true" :reportId="reportId" :run-data="runData" @runRefresh="runRefresh" ref="runTest"/>
</el-card>
<div v-if="scenario">
<el-button style="float: right;margin: 20px" type="primary" @click="handleCommand('save_as')"> {{$t('commons.save')}}</el-button>
<el-button style="float: right;margin: 20px" type="primary" @click="handleCommand('save_as_api')"> {{$t('commons.save')}}</el-button>
</div>
<!-- 加载用例 -->
<ms-api-case-list :loaded="false" ref="caseList"/>
Expand Down Expand Up @@ -120,6 +120,8 @@
handleCommand(e) {
if (e === "save_as") {
this.saveAs();
} else if (e === 'save_as_api') {
this.saveAsApi();
} else {
this.$refs['requestForm'].validate();
}
Expand All @@ -138,6 +140,11 @@
this.loading = false;
this.$refs.debugResult.reload();
},
saveAsApi() {
let obj = {request: this.request};
obj.request.id = getUUID();
this.$emit('saveAs', obj);
},
saveAs() {
let obj = {request: this.request};
obj.request.server = this.debugForm.server;
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/business/components/xpack
Submodule xpack updated from 3a3363 to 2b0af7

0 comments on commit 99ec66a

Please sign in to comment.