From 62c7ab861776382f6237472e2c817e48b2a5998c Mon Sep 17 00:00:00 2001 From: haifeng414 Date: Thu, 13 Feb 2020 12:21:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E7=AE=80=E5=8D=95=E7=9A=84?= =?UTF-8?q?=E4=BF=9D=E5=AD=98=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/TestPlanController.java | 8 +- .../testplan/FileOperationRequest.java | 2 +- .../request/testplan/SaveTestPlanRequest.java | 31 +++++++ .../components/testPlan/CreateTestPlan.vue | 88 ++++++++++++++----- .../testPlan/components/AdvancedConfig.vue | 16 +++- .../testPlan/components/BasicConfig.vue | 13 ++- .../testPlan/components/PressureConfig.vue | 16 +++- 7 files changed, 146 insertions(+), 28 deletions(-) rename backend/src/main/java/io/metersphere/{requests => controller/request}/testplan/FileOperationRequest.java (78%) create mode 100644 backend/src/main/java/io/metersphere/controller/request/testplan/SaveTestPlanRequest.java diff --git a/backend/src/main/java/io/metersphere/controller/TestPlanController.java b/backend/src/main/java/io/metersphere/controller/TestPlanController.java index b8b639f7eb..98efe3242d 100644 --- a/backend/src/main/java/io/metersphere/controller/TestPlanController.java +++ b/backend/src/main/java/io/metersphere/controller/TestPlanController.java @@ -1,6 +1,7 @@ package io.metersphere.controller; -import io.metersphere.requests.testplan.FileOperationRequest; +import io.metersphere.controller.request.testplan.FileOperationRequest; +import io.metersphere.controller.request.testplan.SaveTestPlanRequest; import io.metersphere.service.FileService; import org.springframework.http.HttpHeaders; import org.springframework.http.MediaType; @@ -21,6 +22,11 @@ public class TestPlanController { @Resource private FileService fileService; + @PostMapping("/save") + public void save(@RequestBody SaveTestPlanRequest request) { + System.out.println(String.format("save test plan: %s", request.getName())); + } + @PostMapping("/file/upload") public void uploadJmx(MultipartFile file) throws IOException { fileService.upload(file.getOriginalFilename(), file); diff --git a/backend/src/main/java/io/metersphere/requests/testplan/FileOperationRequest.java b/backend/src/main/java/io/metersphere/controller/request/testplan/FileOperationRequest.java similarity index 78% rename from backend/src/main/java/io/metersphere/requests/testplan/FileOperationRequest.java rename to backend/src/main/java/io/metersphere/controller/request/testplan/FileOperationRequest.java index 88ff096c6a..98e8c0ae5b 100644 --- a/backend/src/main/java/io/metersphere/requests/testplan/FileOperationRequest.java +++ b/backend/src/main/java/io/metersphere/controller/request/testplan/FileOperationRequest.java @@ -1,4 +1,4 @@ -package io.metersphere.requests.testplan; +package io.metersphere.controller.request.testplan; public class FileOperationRequest { private String name; diff --git a/backend/src/main/java/io/metersphere/controller/request/testplan/SaveTestPlanRequest.java b/backend/src/main/java/io/metersphere/controller/request/testplan/SaveTestPlanRequest.java new file mode 100644 index 0000000000..48b3a3b206 --- /dev/null +++ b/backend/src/main/java/io/metersphere/controller/request/testplan/SaveTestPlanRequest.java @@ -0,0 +1,31 @@ +package io.metersphere.controller.request.testplan; + +public class SaveTestPlanRequest { + private String fileId; + private String project; + private String name; + + public String getFileId() { + return fileId; + } + + public void setFileId(String fileId) { + this.fileId = fileId; + } + + public String getProject() { + return project; + } + + public void setProject(String project) { + this.project = project; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +} diff --git a/frontend/src/performance/components/testPlan/CreateTestPlan.vue b/frontend/src/performance/components/testPlan/CreateTestPlan.vue index 2a1cd96af5..4e35e56120 100644 --- a/frontend/src/performance/components/testPlan/CreateTestPlan.vue +++ b/frontend/src/performance/components/testPlan/CreateTestPlan.vue @@ -2,8 +2,8 @@
- - + + - - + + + + + + + +
diff --git a/frontend/src/performance/components/testPlan/components/BasicConfig.vue b/frontend/src/performance/components/testPlan/components/BasicConfig.vue index bb47c2d106..9c9463d5db 100644 --- a/frontend/src/performance/components/testPlan/components/BasicConfig.vue +++ b/frontend/src/performance/components/testPlan/components/BasicConfig.vue @@ -52,6 +52,7 @@