Merge branch 'v1.6' of https://github.com/metersphere/metersphere into v1.6
This commit is contained in:
commit
68ad16412d
|
@ -181,7 +181,7 @@
|
||||||
INNER JOIN (
|
INNER JOIN (
|
||||||
SELECT acitem.`name`,acitem.id FROM api_scenario acitem INNER JOIN `schedule` sc ON acitem.id = sc.resource_id
|
SELECT acitem.`name`,acitem.id FROM api_scenario acitem INNER JOIN `schedule` sc ON acitem.id = sc.resource_id
|
||||||
) ac on ar.scenario_id = ac.id
|
) ac on ar.scenario_id = ac.id
|
||||||
WHERE acr.project_id = #{projectId} AND ar.create_time BETWEEN #{firstDayTimestamp} AND #{lastDayTimestamp}
|
WHERE acr.project_id = #{projectId} AND ar.trigger_mode = 'SCHEDULE' AND ar.create_time BETWEEN #{firstDayTimestamp} AND #{lastDayTimestamp}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="countByProjectIdGroupByExecuteResult" resultType="io.metersphere.api.dto.datacount.ApiDataCountResult">
|
<select id="countByProjectIdGroupByExecuteResult" resultType="io.metersphere.api.dto.datacount.ApiDataCountResult">
|
||||||
|
@ -191,7 +191,7 @@
|
||||||
INNER JOIN (
|
INNER JOIN (
|
||||||
SELECT acitem.`name`,acitem.id FROM api_scenario acitem INNER JOIN `schedule` sc ON acitem.id = sc.resource_id
|
SELECT acitem.`name`,acitem.id FROM api_scenario acitem INNER JOIN `schedule` sc ON acitem.id = sc.resource_id
|
||||||
) ac on ar.scenario_id = ac.id
|
) ac on ar.scenario_id = ac.id
|
||||||
WHERE acr.project_id = #{projectId}
|
WHERE acr.project_id = #{projectId} AND ar.trigger_mode = 'SCHEDULE'
|
||||||
GROUP BY groupField;
|
GROUP BY groupField;
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
|
@ -159,7 +159,7 @@
|
||||||
INNER JOIN api_test_report testReport ON testReportDetail.report_id = testReport.id
|
INNER JOIN api_test_report testReport ON testReportDetail.report_id = testReport.id
|
||||||
WHERE sch.resource_id IN (
|
WHERE sch.resource_id IN (
|
||||||
SELECT id FROM api_test WHERE project_id = #{projectId,jdbcType=VARCHAR}
|
SELECT id FROM api_test WHERE project_id = #{projectId,jdbcType=VARCHAR}
|
||||||
)
|
) AND testReport.trigger_mode = 'SCHEDULE'
|
||||||
GROUP BY groupField;
|
GROUP BY groupField;
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
@ -170,6 +170,6 @@
|
||||||
WHERE sch.resource_id IN (
|
WHERE sch.resource_id IN (
|
||||||
SELECT id FROM api_test WHERE project_id = #{projectId,jdbcType=VARCHAR}
|
SELECT id FROM api_test WHERE project_id = #{projectId,jdbcType=VARCHAR}
|
||||||
)
|
)
|
||||||
AND testReport.create_time BETWEEN #{startTime} and #{endTime}
|
AND testReport.trigger_mode = 'SCHEDULE' AND testReport.create_time BETWEEN #{startTime} and #{endTime}
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
|
@ -46,9 +46,11 @@
|
||||||
<select id="countTaskByProjectIdAndCreateTimeRange" resultType="java.lang.Long">
|
<select id="countTaskByProjectIdAndCreateTimeRange" resultType="java.lang.Long">
|
||||||
SELECT COUNT(id) AS countNumber FROM `schedule`
|
SELECT COUNT(id) AS countNumber FROM `schedule`
|
||||||
WHERE resource_id IN (
|
WHERE resource_id IN (
|
||||||
SELECT id FROM api_test WHERE project_id = #{projectId,jdbcType=VARCHAR} AND status != 'Trash'
|
SELECT atest.id FROM api_test atest
|
||||||
|
WHERE atest.project_id = #{projectId,jdbcType=VARCHAR} AND atest.status != 'Trash'
|
||||||
UNION
|
UNION
|
||||||
SELECT id FROM api_scenario WHERE project_id = #{projectId,jdbcType=VARCHAR} AND status != 'Trash'
|
SELECT scene.id FROM api_scenario scene
|
||||||
|
WHERE scene.project_id = #{projectId,jdbcType=VARCHAR} AND scene.status != 'Trash'
|
||||||
)
|
)
|
||||||
AND create_time BETWEEN #{startTime} and #{endTime}
|
AND create_time BETWEEN #{startTime} and #{endTime}
|
||||||
</select>
|
</select>
|
||||||
|
|
|
@ -2,14 +2,22 @@
|
||||||
<ms-container>
|
<ms-container>
|
||||||
<el-header height="0">
|
<el-header height="0">
|
||||||
<div style="float: right">
|
<div style="float: right">
|
||||||
<div v-if="dateType==='1'">
|
<div v-if="tipsType==='1'">
|
||||||
🤔️天凉了,保温杯买了吗?
|
🤔️天凉了,保温杯买了吗?
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="dateType==='2'">
|
<div v-else-if="tipsType==='2'">
|
||||||
😔觉得MeterSphere不好用就来 <el-link href="https://github.com/metersphere/metersphere/issues" target="_blank" style="color: black" type="primary">https://github.com/metersphere/metersphere/issues</el-link> 吐个槽吧!
|
😔觉得MeterSphere不好用就来
|
||||||
|
<el-link href="https://github.com/metersphere/metersphere/issues" target="_blank" style="color: black"
|
||||||
|
type="primary">https://github.com/metersphere/metersphere/issues
|
||||||
|
</el-link>
|
||||||
|
吐个槽吧!
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="dateType==='3'">
|
<div v-else-if="tipsType==='3'">
|
||||||
😄觉得MeterSphere好用就来 <el-link href="https://github.com/metersphere/metersphere" target="_blank" style="color: black" type="primary">https://github.com/metersphere/metersphere</el-link> 点个star吧!
|
😄觉得MeterSphere好用就来
|
||||||
|
<el-link href="https://github.com/metersphere/metersphere" target="_blank" style="color: black"
|
||||||
|
type="primary">https://github.com/metersphere/metersphere
|
||||||
|
</el-link>
|
||||||
|
点个star吧!
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
😊 MeterSphere温馨提醒 —— 多喝热水哟!
|
😊 MeterSphere温馨提醒 —— 多喝热水哟!
|
||||||
|
@ -19,25 +27,25 @@
|
||||||
<ms-main-container v-loading="result.loading">
|
<ms-main-container v-loading="result.loading">
|
||||||
<el-row :gutter="0"></el-row>
|
<el-row :gutter="0"></el-row>
|
||||||
<el-row :gutter="10">
|
<el-row :gutter="10">
|
||||||
<el-col :span="6" >
|
<el-col :span="6">
|
||||||
<ms-api-info-card :api-count-data="apiCountData"/>
|
<ms-api-info-card :api-count-data="apiCountData"/>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6" >
|
<el-col :span="6">
|
||||||
<ms-test-case-info-card :test-case-count-data="testCaseCountData"/>
|
<ms-test-case-info-card :test-case-count-data="testCaseCountData"/>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6" >
|
<el-col :span="6">
|
||||||
<ms-scene-info-card :scene-count-data="sceneCountData"/>
|
<ms-scene-info-card :scene-count-data="sceneCountData"/>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6" >
|
<el-col :span="6">
|
||||||
<ms-schedule-task-info-card :schedule-task-count-data="scheduleTaskCountData"/>
|
<ms-schedule-task-info-card :schedule-task-count-data="scheduleTaskCountData"/>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-row :gutter="10" >
|
<el-row :gutter="10">
|
||||||
<el-col :span="12" >
|
<el-col :span="12">
|
||||||
<ms-failure-test-case-list/>
|
<ms-failure-test-case-list/>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12" >
|
<el-col :span="12">
|
||||||
<ms-running-task-list/>
|
<ms-running-task-list/>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
@ -48,7 +56,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import MsContainer from "@/business/components/common/components/MsContainer";
|
import MsContainer from "@/business/components/common/components/MsContainer";
|
||||||
import MsMainContainer from "@/business/components/common/components/MsMainContainer";
|
import MsMainContainer from "@/business/components/common/components/MsMainContainer";
|
||||||
import MsApiInfoCard from "./components/ApiInfoCard";
|
import MsApiInfoCard from "./components/ApiInfoCard";
|
||||||
import MsSceneInfoCard from "./components/SceneInfoCard";
|
import MsSceneInfoCard from "./components/SceneInfoCard";
|
||||||
import MsScheduleTaskInfoCard from "./components/ScheduleTaskInfoCard";
|
import MsScheduleTaskInfoCard from "./components/ScheduleTaskInfoCard";
|
||||||
|
@ -63,56 +71,49 @@ export default {
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
MsApiInfoCard, MsSceneInfoCard, MsScheduleTaskInfoCard, MsTestCaseInfoCard,
|
MsApiInfoCard, MsSceneInfoCard, MsScheduleTaskInfoCard, MsTestCaseInfoCard,
|
||||||
MsFailureTestCaseList,MsRunningTaskList,
|
MsFailureTestCaseList, MsRunningTaskList,
|
||||||
MsMainContainer, MsContainer
|
MsMainContainer, MsContainer
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
values: [],
|
values: [],
|
||||||
apiCountData:{},
|
apiCountData: {},
|
||||||
sceneCountData:{},
|
sceneCountData: {},
|
||||||
testCaseCountData:{},
|
testCaseCountData: {},
|
||||||
scheduleTaskCountData:{},
|
scheduleTaskCountData: {},
|
||||||
dateType:"1",
|
tipsType: "1",
|
||||||
result: {},
|
result: {},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
activated() {
|
activated() {
|
||||||
this.search();
|
this.search();
|
||||||
this.checkDateType();
|
this.checkTipsType();
|
||||||
},
|
},
|
||||||
// mounted() {
|
|
||||||
// this.getValues();
|
|
||||||
// },
|
|
||||||
created() {
|
created() {
|
||||||
// this.search();
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
checkDateType(){
|
checkTipsType() {
|
||||||
var random = Math.floor(Math.random() * (4 - 1 + 1))+1;
|
var random = Math.floor(Math.random() * (4 - 1 + 1)) + 1;
|
||||||
this.dateType = random +"";
|
this.tipsType = random + "";
|
||||||
},
|
|
||||||
openNewPage(herf){
|
|
||||||
window.open(herf, '_blank');
|
|
||||||
},
|
},
|
||||||
|
|
||||||
search() {
|
search() {
|
||||||
let selectProjectId = getCurrentProjectID();
|
let selectProjectId = getCurrentProjectID();
|
||||||
this.$get("/api/apiCount/"+selectProjectId, response => {
|
|
||||||
|
this.$get("/api/apiCount/" + selectProjectId, response => {
|
||||||
this.apiCountData = response.data;
|
this.apiCountData = response.data;
|
||||||
});
|
});
|
||||||
|
|
||||||
this.$get("/api/testSceneInfoCount/"+selectProjectId, response => {
|
this.$get("/api/testSceneInfoCount/" + selectProjectId, response => {
|
||||||
this.sceneCountData = response.data;
|
this.sceneCountData = response.data;
|
||||||
});
|
});
|
||||||
|
|
||||||
this.$get("/api/testCaseInfoCount/"+selectProjectId, response => {
|
this.$get("/api/testCaseInfoCount/" + selectProjectId, response => {
|
||||||
this.testCaseCountData = response.data;
|
this.testCaseCountData = response.data;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.$get("/api/scheduleTaskInfoCount/" + selectProjectId, response => {
|
||||||
// let workSpaceID = getCurrentWorkspaceId();
|
|
||||||
this.$get("/api/scheduleTaskInfoCount/"+selectProjectId, response => {
|
|
||||||
this.scheduleTaskCountData = response.data;
|
this.scheduleTaskCountData = response.data;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue