From 18c7a30a03c9689dc8278c030ad8e5d0bb6aa1a3 Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Fri, 7 Aug 2020 10:03:22 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E9=A6=96=E9=A1=B5=E5=8F=AA?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E8=BF=90=E8=A1=8C=E4=B8=AD=E7=9A=84=E5=AE=9A?= =?UTF-8?q?=E6=97=B6=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/metersphere/api/service/APITestService.java | 1 + .../metersphere/base/mapper/ext/ExtScheduleMapper.xml | 3 +++ .../performance/service/PerformanceTestService.java | 1 + .../src/business/components/api/home/ApiTestHome.vue | 6 +++--- .../{ApiTestScheduleList.vue => ScheduleList.vue} | 4 ++-- .../components/common/components/MsScheduleConfig.vue | 11 ++++++----- .../business/components/common/cron/CrontabResult.vue | 4 ++-- .../performance/home/PerformanceTestHome.vue | 6 +++--- frontend/src/i18n/en-US.js | 1 + frontend/src/i18n/zh-CN.js | 1 + frontend/src/i18n/zh-TW.js | 1 + 11 files changed, 24 insertions(+), 15 deletions(-) rename frontend/src/business/components/api/home/{ApiTestScheduleList.vue => ScheduleList.vue} (96%) diff --git a/backend/src/main/java/io/metersphere/api/service/APITestService.java b/backend/src/main/java/io/metersphere/api/service/APITestService.java index a886c9ed3a..648d4a8c4d 100644 --- a/backend/src/main/java/io/metersphere/api/service/APITestService.java +++ b/backend/src/main/java/io/metersphere/api/service/APITestService.java @@ -314,6 +314,7 @@ public class APITestService { } public List listSchedule(QueryScheduleRequest request) { + request.setEnable(true); List schedules = scheduleService.list(request); List resourceIds = schedules.stream() .map(Schedule::getResourceId) diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtScheduleMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtScheduleMapper.xml index 8738fdf285..5cb36cffce 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtScheduleMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtScheduleMapper.xml @@ -10,6 +10,9 @@ and schedule.workspace_id = #{request.workspaceId} + + and schedule.enable = #{request.enable} + diff --git a/backend/src/main/java/io/metersphere/performance/service/PerformanceTestService.java b/backend/src/main/java/io/metersphere/performance/service/PerformanceTestService.java index 6625dc899b..a52187115d 100644 --- a/backend/src/main/java/io/metersphere/performance/service/PerformanceTestService.java +++ b/backend/src/main/java/io/metersphere/performance/service/PerformanceTestService.java @@ -420,6 +420,7 @@ public class PerformanceTestService { } public List listSchedule(QueryScheduleRequest request) { + request.setEnable(true); List schedules = scheduleService.list(request); List resourceIds = schedules.stream() .map(Schedule::getResourceId) diff --git a/frontend/src/business/components/api/home/ApiTestHome.vue b/frontend/src/business/components/api/home/ApiTestHome.vue index 431568988b..69919d5c8a 100644 --- a/frontend/src/business/components/api/home/ApiTestHome.vue +++ b/frontend/src/business/components/api/home/ApiTestHome.vue @@ -14,7 +14,7 @@ - + @@ -28,13 +28,13 @@ import MsApiTestRecentList from "./ApiTestRecentList"; import MsApiReportRecentList from "./ApiReportRecentList"; import MsTestHeatmap from "../../common/components/MsTestHeatmap"; - import MsApiTestScheduleList from "./ApiTestScheduleList"; + import MsScheduleList from "./ScheduleList"; export default { name: "ApiTestHome", components: { - MsApiTestScheduleList, + MsScheduleList, MsTestHeatmap, MsApiReportRecentList, MsApiTestRecentList, MsMainContainer, MsContainer }, diff --git a/frontend/src/business/components/api/home/ApiTestScheduleList.vue b/frontend/src/business/components/api/home/ScheduleList.vue similarity index 96% rename from frontend/src/business/components/api/home/ApiTestScheduleList.vue rename to frontend/src/business/components/api/home/ScheduleList.vue index 1495f1e11a..d0cdfcf42d 100644 --- a/frontend/src/business/components/api/home/ApiTestScheduleList.vue +++ b/frontend/src/business/components/api/home/ScheduleList.vue @@ -1,7 +1,7 @@ @@ -59,9 +63,6 @@ scheduleChange() { this.$emit('scheduleChange'); }, - resultListChange(resultList) { - this.recentList = resultList; - }, flashResultList() { this.$refs.crontabResult.expressionChange(); } diff --git a/frontend/src/business/components/common/cron/CrontabResult.vue b/frontend/src/business/components/common/cron/CrontabResult.vue index fa7f206531..a1f4c74e6a 100644 --- a/frontend/src/business/components/common/cron/CrontabResult.vue +++ b/frontend/src/business/components/common/cron/CrontabResult.vue @@ -1,5 +1,5 @@ - +