This commit is contained in:
fit2-zhao 2021-01-22 20:15:33 +08:00
commit e69791a15a
8 changed files with 46 additions and 6 deletions

View File

@ -4,7 +4,7 @@
<select id="list" resultType="io.metersphere.track.dto.TestPlanReportDTO"
parameterType="io.metersphere.track.request.report.QueryTestPlanReportRequest">
SELECT tpr.id AS id, tpr.`name` AS `name`, tp.`name` AS testPlanName, tpr.creator AS creator, tpr.create_time AS createTime,tpr.trigger_Mode AS triggerMode
SELECT tpr.id AS id, tpr.`name` AS `name`, tp.`name` AS testPlanName, tpr.creator AS creator, tpr.create_time AS createTime,tpr.trigger_Mode AS triggerMode,tpr.status AS status
FROM test_plan tp
INNER JOIN test_plan_report tpr on tp.id = tpr.test_plan_id
<where>

View File

@ -27,6 +27,7 @@ public class ShiroUtils {
filterChainDefinitionMap.put("/jmeter/download/**", "anon");
filterChainDefinitionMap.put("/authsource/list/allenable", "anon");
filterChainDefinitionMap.put("/sso/signin", "anon");
filterChainDefinitionMap.put("/sso/callback", "anon");
// for swagger
filterChainDefinitionMap.put("/swagger-ui.html", "anon");
filterChainDefinitionMap.put("/swagger-ui/**", "anon");

View File

@ -20,6 +20,7 @@ public class TestPlanReportDTO {
private String creator;
private long createTime;
private String triggerMode;
private String status;
private TestCaseReportAdvanceStatusResultDTO executeResult;
private List<TestCaseReportModuleResultDTO> moduleExecuteResult;

View File

@ -109,7 +109,6 @@ public class TestPlanReportService {
TestPlanReport testPlanReport = new TestPlanReport();
testPlanReport.setTestPlanId(planId);
testPlanReport.setId(testPlanReportID);
testPlanReport.setStatus(APITestStatus.Starting.name());
testPlanReport.setCreateTime(System.currentTimeMillis());
testPlanReport.setUpdateTime(System.currentTimeMillis());
try {
@ -136,6 +135,12 @@ public class TestPlanReportService {
testPlanReport.setIsPerformanceExecuting(true);
}
testPlanReport.setPrincipal(testPlan.getPrincipal());
if(testPlanReport.getIsScenarioExecuting() || testPlanReport.getIsApiCaseExecuting() || testPlanReport.getIsPerformanceExecuting()){
testPlanReport.setStatus(APITestStatus.Starting.name());
}else {
testPlanReport.setStatus(APITestStatus.Completed.name());
}
testPlanReportMapper.insert(testPlanReport);
TestPlanReportDataWithBLOBs testPlanReportData = new TestPlanReportDataWithBLOBs();
@ -327,6 +332,7 @@ public class TestPlanReportService {
} catch (Exception e) {
}
}else {
}
testPlanReportMapper.updateByPrimaryKey(report);
}

@ -1 +1 @@
Subproject commit 8d175b5363274672ff33a5883b730e8aaa823f8d
Subproject commit 86f74f5e33eee90a9eba4019f67a470059e4d485

View File

@ -20,6 +20,16 @@
<report-trigger-mode-item :trigger-mode="scope.row.triggerMode"/>
</template>
</el-table-column>
<el-table-column prop="status" :label="$t('commons.status')">
<template v-slot:default="scope">
<ms-tag v-if="scope.row.status == 'RUNNING'" type="success" effect="plain" :content="'Running'"/>
<ms-tag v-else-if="scope.row.status == 'COMPLETED'||scope.row.status == 'SUCCESS'||scope.row.status == 'FAILED'" type="info" effect="plain" :content="'Completed'"/>
<ms-tag v-else type="effect" effect="plain" :content="scope.row.status"/>
<!-- <el-tag size="mini" type="success" v-if="row.status === 'Running'">{{ row.status }}</el-tag>-->
<!-- <el-tag size="mini" type="info" v-else-if="row.status === 'Completed'">{{ row.status }}</el-tag>-->
<!-- <el-tag size="mini" type="info" v-if="row.status === 'Completed'">{{ row.status }}</el-tag>-->
</template>
</el-table-column>
<el-table-column min-width="150" :label="$t('commons.operating')">
<template v-slot:default="scope">
<ms-table-operator-button :tip="$t('test_track.plan_view.view_report')" icon="el-icon-document"
@ -45,13 +55,14 @@ import {TEST_PLAN_REPORT_CONFIGS} from "../../../common/components/search/search
import {getCurrentProjectID} from "../../../../../common/js/utils";
import TestPlanReportView from "@/business/components/track/report/components/TestPlanReportView";
import ReportTriggerModeItem from "@/business/components/common/tableItem/ReportTriggerModeItem";
import MsTag from "@/business/components/common/components/MsTag";
export default {
name: "TestPlanReportList",
components: {
TestPlanReportView,
MsTableOperator, MsTableOperatorButton, MsTableHeader, MsTablePagination,
ReportTriggerModeItem
ReportTriggerModeItem,MsTag
},
data() {
return {

@ -1 +1 @@
Subproject commit 8a6a9ae708306eaf436f35394b71927cec075b0e
Subproject commit 9e64da846793401150260fc50262d82932cf5d8a

View File

@ -15,7 +15,7 @@
</div>
<div class="form">
<el-form-item v-slot:default>
<el-radio-group v-model="form.authenticate">
<el-radio-group v-model="form.authenticate" @change="redirectAuth(form.authenticate)">
<el-radio label="LDAP" size="mini" v-if="openLdap">LDAP</el-radio>
<el-radio label="LOCAL" size="mini" v-if="openLdap">普通登录</el-radio>
<el-radio :label="auth.id" size="mini" v-for="auth in authSources" :key="auth.id">{{ auth.type }} {{ auth.name }}</el-radio>
@ -172,6 +172,27 @@ export default {
} else {
window.location.href = "/"
}
},
redirectAuth(authId) {
if (authId === 'LDAP' || authId === 'LOCAL') {
return;
}
let source = this.authSources.filter(auth => auth.id === authId)[0];
if (source.type === 'CAS') {
return;
}
this.$confirm(this.$t('即将跳转到认证源页面进行认证'), '', {
confirmButtonText: this.$t('commons.confirm'),
cancelButtonText: this.$t('commons.cancel'),
type: 'warning'
}).then(() => {
let config = JSON.parse(source.configuration);
let url = config.authUrl + "/auth?client_id=" + config.clientId + "&redirect_uri=" + config.redirectUrl +
"&response_type=code&scope=openid+profile+email+offline_access&state=" + authId;
window.location.href = url;
}).catch(() => {
this.form.authenticate = 'LOCAL';
});
}
}
}