From 59a645edd2ab3873d998fbec2ddfa7e66dca5c58 Mon Sep 17 00:00:00 2001 From: wenyann <64353056+wenyann@users.noreply.github.com> Date: Mon, 1 Jun 2020 19:07:47 +0800 Subject: [PATCH 01/31] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/business/components/project/MsProject.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/src/business/components/project/MsProject.vue b/frontend/src/business/components/project/MsProject.vue index 258b8766b5..fa77915cd1 100644 --- a/frontend/src/business/components/project/MsProject.vue +++ b/frontend/src/business/components/project/MsProject.vue @@ -223,6 +223,10 @@ this.$router.push({ path: '/performance/test/' + row.id, }) + } else if (this.$route.name === 'fucProject') { + this.$router.push({ + path: '/api/test/list/' + row.id + }) } } } From 2dbc79eadd70560e3e6ca3f59e90a78293d21fcf Mon Sep 17 00:00:00 2001 From: wenyann <64353056+wenyann@users.noreply.github.com> Date: Mon, 1 Jun 2020 19:53:11 +0800 Subject: [PATCH 02/31] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E7=AD=9B=E9=80=89=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/api/report/ApiReportList.vue | 23 +++++++++++++++---- .../components/api/test/ApiTestList.vue | 16 ++++++++++++- 2 files changed, 34 insertions(+), 5 deletions(-) diff --git a/frontend/src/business/components/api/report/ApiReportList.vue b/frontend/src/business/components/api/report/ApiReportList.vue index 05941386ff..b20419462a 100644 --- a/frontend/src/business/components/api/report/ApiReportList.vue +++ b/frontend/src/business/components/api/report/ApiReportList.vue @@ -20,15 +20,19 @@ {{ scope.row.createTime | timestampFormatDate }} - + @@ -57,7 +61,15 @@ currentPage: 1, pageSize: 5, total: 0, - loading: false + loading: false, + statusFilters: [ + {text: 'Saved', value: 'Saved'}, + {text: 'Starting', value: 'Starting'}, + {text: 'Running', value: 'Running'}, + {text: 'Reporting', value: 'Reporting'}, + {text: 'Completed', value: 'Completed'}, + {text: 'Error', value: 'Error'} + ] } }, @@ -106,6 +118,9 @@ init() { this.testId = this.$route.params.testId; this.search(); + }, + filter(value, row) { + return row.status === value; } }, diff --git a/frontend/src/business/components/api/test/ApiTestList.vue b/frontend/src/business/components/api/test/ApiTestList.vue index a549faa9f4..3a52b396fb 100644 --- a/frontend/src/business/components/api/test/ApiTestList.vue +++ b/frontend/src/business/components/api/test/ApiTestList.vue @@ -25,7 +25,9 @@ {{ scope.row.updateTime | timestampFormatDate }} - + @@ -79,6 +81,14 @@ tip: this.$t('commons.delete'), icon: "el-icon-delete", type: "danger", exec: this.handleDelete } + ], + statusFilters: [ + {text: 'Saved', value: 'Saved'}, + {text: 'Starting', value: 'Starting'}, + {text: 'Running', value: 'Running'}, + {text: 'Reporting', value: 'Reporting'}, + {text: 'Completed', value: 'Completed'}, + {text: 'Error', value: 'Error'} ] } }, @@ -137,11 +147,15 @@ init() { this.projectId = this.$route.params.projectId; this.search(); + }, + filter(value, row) { + return row.status === value; } }, created() { this.init(); } + } From 9f3a21756a8ab9e52e679eca1bce1a5f902c3758 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Mon, 1 Jun 2020 21:16:18 +0800 Subject: [PATCH 03/31] =?UTF-8?q?fix=20=E7=AD=9B=E9=80=89,=E6=8E=92?= =?UTF-8?q?=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../base/mapper/ext/ExtLoadTestMapper.xml | 10 ++++++++++ .../service/PerformanceTestService.java | 3 ++- .../testplan/QueryTestPlanRequest.java | 2 ++ .../test/EditPerformanceTestPlan.vue | 4 +++- .../performance/test/PerformanceTestPlan.vue | 19 ++++++++++--------- 5 files changed, 27 insertions(+), 11 deletions(-) diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtLoadTestMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtLoadTestMapper.xml index 742728f1bb..3dcf811516 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtLoadTestMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtLoadTestMapper.xml @@ -26,6 +26,16 @@ AND load_test.id = #{request.id} + + + + and load_test.${key} in + + #{value} + + + + order by 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 e2a2fe3c3d..1fb420b453 100644 --- a/backend/src/main/java/io/metersphere/performance/service/PerformanceTestService.java +++ b/backend/src/main/java/io/metersphere/performance/service/PerformanceTestService.java @@ -1,6 +1,5 @@ package io.metersphere.performance.service; -import io.metersphere.api.dto.SaveAPITestRequest; import io.metersphere.base.domain.*; import io.metersphere.base.mapper.*; import io.metersphere.base.mapper.ext.ExtLoadTestMapper; @@ -10,6 +9,7 @@ import io.metersphere.commons.constants.APITestStatus; import io.metersphere.commons.constants.PerformanceTestStatus; import io.metersphere.commons.exception.MSException; import io.metersphere.commons.utils.LogUtil; +import io.metersphere.commons.utils.ServiceUtils; import io.metersphere.commons.utils.SessionUtils; import io.metersphere.dto.DashboardTestDTO; import io.metersphere.dto.LoadTestDTO; @@ -66,6 +66,7 @@ public class PerformanceTestService { private ReportService reportService; public List list(QueryTestPlanRequest request) { + request.setOrders(ServiceUtils.getDefaultOrder(request.getOrders())); return extLoadTestMapper.list(request); } diff --git a/backend/src/main/java/io/metersphere/track/request/testplan/QueryTestPlanRequest.java b/backend/src/main/java/io/metersphere/track/request/testplan/QueryTestPlanRequest.java index 33ead5d811..c8988e2730 100644 --- a/backend/src/main/java/io/metersphere/track/request/testplan/QueryTestPlanRequest.java +++ b/backend/src/main/java/io/metersphere/track/request/testplan/QueryTestPlanRequest.java @@ -5,10 +5,12 @@ import lombok.Getter; import lombok.Setter; import java.util.List; +import java.util.Map; @Getter @Setter public class QueryTestPlanRequest extends TestPlanRequest { private String workspaceId; private List orders; + private Map> filters; } diff --git a/frontend/src/business/components/performance/test/EditPerformanceTestPlan.vue b/frontend/src/business/components/performance/test/EditPerformanceTestPlan.vue index bcac4a4baa..2f20972c6c 100644 --- a/frontend/src/business/components/performance/test/EditPerformanceTestPlan.vue +++ b/frontend/src/business/components/performance/test/EditPerformanceTestPlan.vue @@ -4,7 +4,9 @@ - + - + + @@ -55,7 +58,7 @@