From fadc55470703993805fcca184e87d0c803eff0b3 Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Fri, 19 Mar 2021 10:30:30 +0800 Subject: [PATCH 01/11] =?UTF-8?q?refactor(=E6=80=A7=E8=83=BD=E6=B5=8B?= =?UTF-8?q?=E8=AF=95):=20k8s=20job=E8=AE=BE=E7=BD=AE=E5=8F=8D=E4=BA=B2?= =?UTF-8?q?=E5=92=8C=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/main/java/io/metersphere/xpack | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/main/java/io/metersphere/xpack b/backend/src/main/java/io/metersphere/xpack index adefde265f..3623e15de5 160000 --- a/backend/src/main/java/io/metersphere/xpack +++ b/backend/src/main/java/io/metersphere/xpack @@ -1 +1 @@ -Subproject commit adefde265ff12d4ea909353c3f46008f8a8e17e7 +Subproject commit 3623e15de5cfc9837a46850ff462f9c9194e9892 From 04bf8111f5fed822837b3823fa8e9a32bdd0cc4a Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Fri, 19 Mar 2021 10:47:44 +0800 Subject: [PATCH 02/11] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92)?= =?UTF-8?q?:=20=E4=BF=AE=E5=A4=8D=E6=8A=A5=E5=91=8A=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E6=89=80=E5=B1=9E=E9=A1=B9=E7=9B=AE=E6=98=BE=E7=A4=BA=E9=94=99?= =?UTF-8?q?=E4=B9=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/metersphere/track/service/TestPlanService.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/src/main/java/io/metersphere/track/service/TestPlanService.java b/backend/src/main/java/io/metersphere/track/service/TestPlanService.java index 1b1a647ea8..bc850fe47d 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestPlanService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestPlanService.java @@ -551,8 +551,8 @@ public class TestPlanService { queryTestPlanRequest.setId(planId); TestPlanDTO testPlan = extTestPlanMapper.list(queryTestPlanRequest).get(0); - String projectName = getProjectNameByPlanId(planId); - testPlan.setProjectName(projectName); + Project project = projectMapper.selectByPrimaryKey(testPlan.getProjectId()); + testPlan.setProjectName(project.getName()); TestCaseReport testCaseReport = testCaseReportMapper.selectByPrimaryKey(testPlan.getReportId()); JSONObject content = JSONObject.parseObject(testCaseReport.getContent()); @@ -708,8 +708,8 @@ public class TestPlanService { queryTestPlanRequest.setId(planId); TestPlanDTO testPlan = extTestPlanMapper.list(queryTestPlanRequest).get(0); - String projectName = getProjectNameByPlanId(planId); - testPlan.setProjectName(projectName); + Project project = projectMapper.selectByPrimaryKey(testPlan.getProjectId()); + testPlan.setProjectName(project.getName()); TestCaseReport testCaseReport = testCaseReportMapper.selectByPrimaryKey(testPlan.getReportId()); JSONObject content = JSONObject.parseObject(testCaseReport.getContent()); From 8812a17cdb2672b24d9de5433b0ef1ae3366f40d Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Fri, 19 Mar 2021 11:03:43 +0800 Subject: [PATCH 03/11] chore: sync --- backend/src/main/java/io/metersphere/xpack | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/main/java/io/metersphere/xpack b/backend/src/main/java/io/metersphere/xpack index 3623e15de5..245845e07b 160000 --- a/backend/src/main/java/io/metersphere/xpack +++ b/backend/src/main/java/io/metersphere/xpack @@ -1 +1 @@ -Subproject commit 3623e15de5cfc9837a46850ff462f9c9194e9892 +Subproject commit 245845e07bf3fe2f60311eeb78f8f109301a2d39 From cd8c7a9124a6798618d0836202b586905045efae Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Fri, 19 Mar 2021 11:05:30 +0800 Subject: [PATCH 04/11] =?UTF-8?q?refactor:=20=E5=85=B3=E8=81=94=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E9=A1=B9=E7=9B=AE=E9=BB=98=E8=AE=A4=E4=B8=BA=E5=BD=93?= =?UTF-8?q?=E5=89=8D=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../track/plan/components/TestPlanList.vue | 2 -- .../view/comonents/base/TestCaseRelevanceBase.vue | 14 +++++++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/frontend/src/business/components/track/plan/components/TestPlanList.vue b/frontend/src/business/components/track/plan/components/TestPlanList.vue index eae5fdf3bc..2447032590 100644 --- a/frontend/src/business/components/track/plan/components/TestPlanList.vue +++ b/frontend/src/business/components/track/plan/components/TestPlanList.vue @@ -310,8 +310,6 @@ export default { } item.passRate=item.passRate+'%' }) - console.log(this.tableData) - }); }, copyData(status) { diff --git a/frontend/src/business/components/track/plan/view/comonents/base/TestCaseRelevanceBase.vue b/frontend/src/business/components/track/plan/view/comonents/base/TestCaseRelevanceBase.vue index 21d51de87e..c3c1a9dd0b 100644 --- a/frontend/src/business/components/track/plan/view/comonents/base/TestCaseRelevanceBase.vue +++ b/frontend/src/business/components/track/plan/view/comonents/base/TestCaseRelevanceBase.vue @@ -34,6 +34,7 @@ import MsDialogFooter from '../../../../../common/components/MsDialogFooter' import SelectMenu from "../../../../common/SelectMenu"; import RelevanceDialog from "./RelevanceDialog"; + import {getCurrentProjectID} from "@/common/js/utils"; export default { name: "TestCaseRelevanceBase", @@ -93,10 +94,17 @@ this.result = this.$get("/project/listAll", res => { let data = res.data; if (data) { + const index = data.findIndex(d => d.id === getCurrentProjectID()); this.projects = data; - this.projectId = data[0].id; - this.projectName = data[0].name; - this.changeProject(data[0]); + if (index !== -1) { + this.projectId = data[index].id; + this.projectName = data[index].name; + this.changeProject(data[index]); + } else { + this.projectId = data[0].id; + this.projectName = data[0].name; + this.changeProject(data[0]); + } } }) }, From 17453e926890c7bc3d44dba0f494cc92c3021b9e Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Fri, 19 Mar 2021 11:31:01 +0800 Subject: [PATCH 05/11] =?UTF-8?q?fix(=E7=94=A8=E4=BE=8B=E8=AF=84=E5=AE=A1)?= =?UTF-8?q?:=20=E4=BF=AE=E5=A4=8D=E8=AF=84=E5=AE=A1=E7=BB=93=E6=9E=9C?= =?UTF-8?q?=E7=AD=9B=E9=80=89=E6=97=A0=E6=95=88=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../metersphere/base/mapper/ext/ExtTestReviewCaseMapper.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestReviewCaseMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestReviewCaseMapper.xml index a520d29d33..2e56a206ce 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestReviewCaseMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestReviewCaseMapper.xml @@ -161,12 +161,12 @@ #{value} - - and test_case_review_test_case.status in + + and test_case.review_status in #{value} - + From 87334f4b5eafc6392132c79ab410f5e69ddb93d5 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Fri, 19 Mar 2021 12:00:36 +0800 Subject: [PATCH 06/11] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92)?= =?UTF-8?q?:=20=E6=9F=A5=E8=AF=A2=E7=BC=BA=E9=99=B7=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=E6=97=B6=E6=8D=95=E8=8E=B7=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../functional/FunctionalTestCaseEdit.vue | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/frontend/src/business/components/track/plan/view/comonents/functional/FunctionalTestCaseEdit.vue b/frontend/src/business/components/track/plan/view/comonents/functional/FunctionalTestCaseEdit.vue index cfa3aa69c9..c4d3b1f1e5 100644 --- a/frontend/src/business/components/track/plan/view/comonents/functional/FunctionalTestCaseEdit.vue +++ b/frontend/src/business/components/track/plan/view/comonents/functional/FunctionalTestCaseEdit.vue @@ -591,17 +591,23 @@ export default { const project = res.data; if (project.tapdId) { this.hasTapdId = true; - this.result = this.$get("/issues/tapd/user/" + this.testCase.caseId, response => { - this.users = response.data; + this.result = this.$get("/issues/tapd/user/" + this.testCase.caseId).then(response => { + this.users = response.data.data; + }).catch(() => { + console.log("get tapd user error."); }) } if (project.zentaoId) { this.hasZentaoId = true; - this.result = this.$get("/issues/zentao/builds/" + this.testCase.caseId, response => { - this.Builds = response.data; + this.result = this.$get("/issues/zentao/builds/" + this.testCase.caseId).then(response => { + this.Builds = response.data.data; + }).catch(() => { + console.log("get zentao builds error."); }) - this.result = this.$get("/issues/zentao/user/" + this.testCase.caseId, response => { - this.zentaoUsers = response.data; + this.result = this.$get("/issues/zentao/user/" + this.testCase.caseId).then(response => { + this.zentaoUsers = response.data.data; + }).catch(() => { + console.log("get zentao user error."); }) } }) @@ -649,8 +655,10 @@ export default { this.testCase.zentaoAssigned = ""; }, getIssues(caseId) { - this.result = this.$get("/issues/get/" + caseId, response => { - this.issues = response.data; + this.result = this.$get("/issues/get/" + caseId).then(response => { + this.issues = response.data.data; + }).catch(() => { + console.log("get issues error") }) }, closeIssue(row) { From 07ecb9702268dcf1eeb95d2a57b751838ab81fde Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Fri, 19 Mar 2021 13:44:46 +0800 Subject: [PATCH 07/11] =?UTF-8?q?refactor:=20=E8=84=91=E5=9B=BE=E5=85=A8?= =?UTF-8?q?=E5=B1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/common/components/MsDrawer.vue | 27 ++++++------ .../common/components/MsFullScreenButton.vue | 37 +++++++++++++++++ .../common/components/MsModuleMinder.vue | 41 ++++++++++++++++--- .../track/plan/components/TestPlanList.vue | 2 - 4 files changed, 86 insertions(+), 21 deletions(-) create mode 100644 frontend/src/business/components/common/components/MsFullScreenButton.vue diff --git a/frontend/src/business/components/common/components/MsDrawer.vue b/frontend/src/business/components/common/components/MsDrawer.vue index fa675d267f..472c8007ad 100644 --- a/frontend/src/business/components/common/components/MsDrawer.vue +++ b/frontend/src/business/components/common/components/MsDrawer.vue @@ -8,8 +8,7 @@
- - +
@@ -23,9 +22,10 @@ import MsRight2LeftDragBar from "./dragbar/MsRight2LeftDragBar"; import MsLeft2RightDragBar from "./dragbar/MsLeft2RightDragBar"; import MsBottom2TopDragBar from "./dragbar/MsBottom2TopDragBar"; + import MsFullScreenButton from "@/business/components/common/components/MsFullScreenButton"; export default { name: "MsDrawer", - components: {MsBottom2TopDragBar, MsLeft2RightDragBar, MsRight2LeftDragBar}, + components: {MsFullScreenButton, MsBottom2TopDragBar, MsLeft2RightDragBar, MsRight2LeftDragBar}, data() { return { x: 0, @@ -74,6 +74,15 @@ mounted() { this.init(); }, + watch: { + isFullScreen() { + if (this.isFullScreen) { + this.fullScreen() + } else { + this.unFullScreen(); + } + } + }, methods: { init() { // todo 其他方向待优化 @@ -123,12 +132,10 @@ this.originalH = this.h; this.w = document.body.clientWidth; this.h = document.body.clientHeight; - this.isFullScreen = true; }, unFullScreen() { this.w = this.originalW; this.h = this.originalH; - this.isFullScreen = false; }, close() { this.$emit('close') @@ -206,18 +213,10 @@ color: red; } - .alt-ico { + /deep/ .alt-ico { position: absolute; - font-size: 15px; right: 40px; top: 15px; - color: #8c939d; } - .alt-ico:hover { - color: black; - font-size: 18px; - } - - diff --git a/frontend/src/business/components/common/components/MsFullScreenButton.vue b/frontend/src/business/components/common/components/MsFullScreenButton.vue new file mode 100644 index 0000000000..44ddc031cb --- /dev/null +++ b/frontend/src/business/components/common/components/MsFullScreenButton.vue @@ -0,0 +1,37 @@ + + + + + diff --git a/frontend/src/business/components/common/components/MsModuleMinder.vue b/frontend/src/business/components/common/components/MsModuleMinder.vue index 9f879a88fc..ac8df743b5 100644 --- a/frontend/src/business/components/common/components/MsModuleMinder.vue +++ b/frontend/src/business/components/common/components/MsModuleMinder.vue @@ -1,10 +1,10 @@