提交 db0d13d4 编写于 作者: W wenyann

Merge remote-tracking branch 'origin/dev' into dev

......@@ -2,6 +2,8 @@ FROM registry.fit2cloud.com/metersphere/fabric8-java-alpine-openjdk8-jre
MAINTAINER FIT2CLOUD <support@fit2cloud.com>
ARG MS_VERSION=dev
RUN mkdir -p /opt/apps && mkdir -p /opt/jmeter
ADD backend/target/backend-1.0.jar /opt/apps
......@@ -12,5 +14,7 @@ ENV JAVA_APP_JAR=/opt/apps/backend-1.0.jar
ENV AB_OFF=true
ENV MS_VERSION=${MS_VERSION}
ENV JAVA_OPTIONS="-Dfile.encoding=utf-8 -Djava.awt.headless=true"
CMD ["/deployments/run-java.sh"]
......@@ -126,7 +126,7 @@ public class APIBackendListenerClient extends AbstractBackendListenerClient impl
}
ResponseResult responseResult = requestResult.getResponseResult();
responseResult.setBody(new String(result.getResponseData(), StandardCharsets.UTF_8));
responseResult.setBody(result.getResponseDataAsString());
responseResult.setHeaders(result.getResponseHeaders());
responseResult.setLatency(result.getLatency());
responseResult.setResponseCode(result.getResponseCode());
......
......@@ -1081,7 +1081,7 @@ csvdataset.file.encoding_list=UTF-8|UTF-16|ISO-8859-15|US-ASCII
#httpsampler.user_defined_methods=VERSION-CONTROL,REPORT,CHECKOUT,CHECKIN,UNCHECKOUT,MKWORKSPACE,UPDATE,LABEL,MERGE,BASELINE-CONTROL,MKACTIVITY
# The encoding to be used if none is provided (default ISO-8859-1)
#sampleresult.default.encoding=ISO-8859-1
sampleresult.default.encoding=UTF-8
# CookieManager behaviour - should cookies with null/empty values be deleted?
# Default is true. Use false to revert to original behaviour
......
......@@ -139,7 +139,7 @@
},
handleCopy(test) {
this.result = this.$post("/api/copy", {id: test.id}, () => {
this.$success(this.$t('commons.delete_success'));
this.$success(this.$t('commons.copy_success'));
this.search();
});
},
......
......@@ -174,7 +174,7 @@
},
handleCopy(testPlan) {
this.result = this.$post("/performance/copy", {id: testPlan.id}, () => {
this.$success(this.$t('commons.save_success'));
this.$success(this.$t('commons.copy_success'));
this.search();
});
},
......
......@@ -84,13 +84,22 @@
<el-table-column
:label="$t('commons.operating')">
<template v-slot:default="scope">
<ms-table-operator :is-tester-permission="true" @editClick="handleEdit(scope.row)" @deleteClick="handleDelete(scope.row)"/>
<ms-table-operator :is-tester-permission="true" @editClick="handleEdit(scope.row)" @deleteClick="handleDelete(scope.row)">
<template v-slot:middle>
<ms-table-operator-button type="success" v-if="!scope.row.reportId" :tip="$t('test_track.plan_view.create_report')" icon="el-icon-document" @exec="openTestReportTemplate(scope.row)"/>
<ms-table-operator-button type="success" v-if="scope.row.reportId" :tip="$t('test_track.plan_view.view_report')" icon="el-icon-document" @exec="openReport(scope.row.id, scope.row.reportId)"/>
</template>
</ms-table-operator>
</template>
</el-table-column>
</el-table>
<ms-table-pagination :change="initTableData" :current-page.sync="currentPage" :page-size.sync="pageSize"
:total="total"/>
<test-report-template-list @openReport="openReport" ref="testReporTtemplateList"/>
<test-case-report-view @refresh="initTableData" ref="testCaseReportView"/>
</el-card>
</template>
......@@ -104,10 +113,14 @@
import PlanStatusTableItem from "../../common/tableItems/plan/PlanStatusTableItem";
import PlanStageTableItem from "../../common/tableItems/plan/PlanStageTableItem";
import {_filter, _sort} from "../../../../../common/js/utils";
import TestReportTemplateList from "../view/comonents/TestReportTemplateList";
import TestCaseReportView from "../view/comonents/report/TestCaseReportView";
export default {
name: "TestPlanList",
components: {
TestCaseReportView,
TestReportTemplateList,
PlanStageTableItem,
PlanStatusTableItem,
MsTableOperator, MsTableOperatorButton, MsDialogFooter, MsTableHeader, MsCreateBox, MsTablePagination},
......@@ -198,7 +211,15 @@
sort(column) {
_sort(column, this.condition);
this.initTableData();
}
},
openTestReportTemplate(data) {
this.$refs.testReporTtemplateList.open(data.id);
},
openReport(planId, reportId) {
if (reportId) {
this.$refs.testCaseReportView.open(planId, reportId);
}
},
}
}
</script>
......
......@@ -13,8 +13,6 @@
<ms-table-button :is-tester-permission="true" icon="el-icon-unlock" :content="$t('test_track.plan_view.cancel_relevance')" @click="handleBatch('delete')"/>
<ms-table-button :is-tester-permission="true" icon="el-icon-edit-outline" :content="$t('test_track.plan_view.change_execution_results')" @click="handleBatch('status')"/>
<ms-table-button :is-tester-permission="true" icon="el-icon-user" :content="$t('test_track.plan_view.change_executor')" @click="handleBatch('executor')"/>
<ms-table-button :is-tester-permission="true" v-if="!testPlan.reportId" icon="el-icon-document" :content="$t('test_track.plan_view.create_report')" @click="openTestReport"/>
<ms-table-button :is-tester-permission="true" v-if="testPlan.reportId" icon="el-icon-document" :content="$t('test_track.plan_view.view_report')" @click="openReport"/>
</template>
</ms-table-header>
</template>
......@@ -138,9 +136,6 @@
:is-read-only="isReadOnly"
@refreshTable="search"/>
<test-report-template-list @openReport="openReport" :plan-id="planId" ref="testReporTtemplateList"/>
<test-case-report-view :plan-id="planId" ref="testCaseReportView"/>
</el-card>
</div>
</template>
......@@ -169,8 +164,6 @@
export default {
name: "TestPlanTestCaseList",
components: {
TestCaseReportView,
TestReportTemplateList,
MsTableOperatorButton,
MsTableOperator,
MethodTableItem,
......@@ -351,9 +344,6 @@
}
this.initTableData();
},
openTestReport() {
this.$refs.testReporTtemplateList.open();
},
statusChange(param) {
this.$post('/test/plan/case/edit' , param, () => {
for (let i = 0; i < this.tableData.length; i++) {
......@@ -372,13 +362,6 @@
});
}
},
openReport(id) {
this.getTestPlanById();
if (!id) {
id = this.testPlan.reportId;
}
this.$refs.testCaseReportView.open(id);
},
filter(filters) {
_filter(filters, this.condition);
this.initTableData();
......
......@@ -21,12 +21,8 @@
data() {
return {
templateVisible: false,
templates: []
}
},
props: {
planId: {
type: String
templates: [],
planId: ''
}
},
methods: {
......@@ -43,12 +39,13 @@
param.planId = this.planId;
param.templateId = templateId;
this.$post('/case/report/add', param, response => {
this.$emit('openReport', response.data);
this.$emit('openReport', param.planId, response.data);
this.templateVisible = false;
});
},
open() {
open(planId) {
this.templateVisible = true;
this.planId = planId;
this.initData();
}
......
......@@ -62,6 +62,7 @@
report: {},
reportId: '',
metric: {},
planId: '',
componentMap: new Map(
[
[1, { name: this.$t('test_track.plan_view.base_info'), id: 1 , type: 'system'}],
......@@ -72,11 +73,6 @@
)
}
},
props: {
planId: {
type: String
}
},
methods: {
listenGoBack() {
//监听浏览器返回操作,关闭该对话框
......@@ -88,7 +84,8 @@
goBack() {
this.handleClose();
},
open(id) {
open(planId, id) {
this.planId = planId;
if (id) {
this.reportId = id;
}
......@@ -125,6 +122,7 @@
},
handleClose() {
window.removeEventListener('popstate', this.goBack, false);
this.$emit('refresh');
this.showDialog = false;
},
handleEdit() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册