From 7b5dd9c14f6b5a8ff5e8caecb4e971c6f90133d2 Mon Sep 17 00:00:00 2001 From: BugKing Date: Wed, 25 Nov 2020 11:15:29 +0800 Subject: [PATCH 01/14] =?UTF-8?q?refactor:=20=E4=BF=AE=E6=94=B9=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 4 ++-- backend/pom.xml | 2 +- frontend/pom.xml | 2 +- .../src/business/components/api/test/model/ScenarioModel.js | 2 +- pom.xml | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 07f9e02988..162115dbac 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,11 +6,11 @@ ARG MS_VERSION=dev RUN mkdir -p /opt/apps && mkdir -p /opt/jmeter -COPY backend/target/backend-1.4.jar /opt/apps +COPY backend/target/backend-1.5.jar /opt/apps COPY backend/target/classes/jmeter/ /opt/jmeter/ -ENV JAVA_APP_JAR=/opt/apps/backend-1.4.jar +ENV JAVA_APP_JAR=/opt/apps/backend-1.5.jar ENV AB_OFF=true diff --git a/backend/pom.xml b/backend/pom.xml index 5df379de4c..6f47ee07c7 100644 --- a/backend/pom.xml +++ b/backend/pom.xml @@ -7,7 +7,7 @@ metersphere-server io.metersphere - 1.4 + 1.5 4.0.0 diff --git a/frontend/pom.xml b/frontend/pom.xml index f246001960..8a9a98a84a 100644 --- a/frontend/pom.xml +++ b/frontend/pom.xml @@ -7,7 +7,7 @@ metersphere-server io.metersphere - 1.4 + 1.5 4.0.0 diff --git a/frontend/src/business/components/api/test/model/ScenarioModel.js b/frontend/src/business/components/api/test/model/ScenarioModel.js index d6a29fdf21..84c8982ea6 100644 --- a/frontend/src/business/components/api/test/model/ScenarioModel.js +++ b/frontend/src/business/components/api/test/model/ScenarioModel.js @@ -157,7 +157,7 @@ export class Test extends BaseConfig { constructor(options) { super(); this.type = "MS API CONFIG"; - this.version = '1.4.0'; + this.version = '1.5.0'; this.id = uuid(); this.name = undefined; this.projectId = undefined; diff --git a/pom.xml b/pom.xml index 27f82b6fa6..3277873249 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 io.metersphere metersphere-server - 1.4 + 1.5 pom From e43ce4fa0a9af235a98ee0cbd2709dae3a2dd331 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Wed, 25 Nov 2020 11:26:09 +0800 Subject: [PATCH 02/14] =?UTF-8?q?fix(=E7=B3=BB=E7=BB=9F=E8=AE=BE=E7=BD=AE)?= =?UTF-8?q?:=20=E4=BF=AE=E5=A4=8D=E5=88=9B=E5=BB=BA=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E6=97=B6=E7=94=B5=E8=AF=9D=E5=8F=B7=E7=A0=81=E4=B8=8D=E6=94=AF?= =?UTF-8?q?=E6=8C=81199=E6=AE=B5=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes 818 --- .../business/components/settings/personal/PersonSetting.vue | 3 ++- frontend/src/business/components/settings/system/User.vue | 3 ++- frontend/src/common/js/regex.js | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 frontend/src/common/js/regex.js diff --git a/frontend/src/business/components/settings/personal/PersonSetting.vue b/frontend/src/business/components/settings/personal/PersonSetting.vue index bff2281cf7..89b15fa6d3 100644 --- a/frontend/src/business/components/settings/personal/PersonSetting.vue +++ b/frontend/src/business/components/settings/personal/PersonSetting.vue @@ -86,6 +86,7 @@ import MsDialogFooter from "../../common/components/MsDialogFooter"; import {getCurrentUser, listenGoBack, removeGoBackListener} from "../../../../common/js/utils"; import MsTableOperatorButton from "../../common/components/MsTableOperatorButton"; + import {PHONE_REGEX} from "@/common/js/regex"; export default { name: "MsPersonSetting", @@ -115,7 +116,7 @@ phone: [ { required: false, - pattern: '^1(3|4|5|7|8)\\d{9}$', + pattern: PHONE_REGEX, message: this.$t('member.mobile_number_format_is_incorrect'), trigger: 'blur' } diff --git a/frontend/src/business/components/settings/system/User.vue b/frontend/src/business/components/settings/system/User.vue index 4fc1069521..5be7dcc5ae 100644 --- a/frontend/src/business/components/settings/system/User.vue +++ b/frontend/src/business/components/settings/system/User.vue @@ -338,6 +338,7 @@ import {hasRole, listenGoBack, removeGoBackListener} from "@/common/js/utils"; import MsRolesTag from "../../common/components/MsRolesTag"; import {ROLE_ADMIN} from "@/common/js/constants"; import {getCurrentUser} from "../../../../common/js/utils"; +import {PHONE_REGEX} from "@/common/js/regex"; export default { name: "MsUser", @@ -401,7 +402,7 @@ export default { {required: true, message: this.$t('user.input_phone'), trigger: 'blur'}, { required: true, - pattern: '^1(3|4|5|7|8)\\d{9}$', + pattern: PHONE_REGEX, message: this.$t('user.mobile_number_format_is_incorrect'), trigger: 'blur' } diff --git a/frontend/src/common/js/regex.js b/frontend/src/common/js/regex.js new file mode 100644 index 0000000000..9320e4d0c0 --- /dev/null +++ b/frontend/src/common/js/regex.js @@ -0,0 +1 @@ +export const PHONE_REGEX = '^1(3|4|5|7|8|9)\\d{9}$'; From f4a3900439070871634101c8a798f319b4064e64 Mon Sep 17 00:00:00 2001 From: BugKing Date: Wed, 25 Nov 2020 13:44:29 +0800 Subject: [PATCH 03/14] =?UTF-8?q?docs:=20=E4=BF=AE=E6=94=B9=E8=8B=B1?= =?UTF-8?q?=E6=96=87=20readme=20=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README-EN.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README-EN.md b/README-EN.md index 9d0d82f374..a949f3fc9a 100644 --- a/README-EN.md +++ b/README-EN.md @@ -17,8 +17,8 @@ MeterSphere is a one-stop open-source enterprise-class continuous testing platfo Only need two steps to install MeterSphere: What you need: - 1. Prepare a 64-bit Linux host with no less than 8 G RAM - 2. Log into root user and execute the command down below to install MeterSphere +1. Prepare a 64-bit Linux host with no less than 8 G RAM +2. Log into root user and execute the command down below to install MeterSphere ```sh curl -sSL https://github.com/metersphere/metersphere/releases/latest/download/quick_start.sh | sh From b4a517c4ffe24a64fcbc465e5ecb2b51268e29db Mon Sep 17 00:00:00 2001 From: BugKing Date: Wed, 25 Nov 2020 13:48:40 +0800 Subject: [PATCH 04/14] =?UTF-8?q?style:=20=E4=BF=AE=E6=94=B9=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../view/comonents/report/TestCaseReportTemplateEdit.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/business/components/track/plan/view/comonents/report/TestCaseReportTemplateEdit.vue b/frontend/src/business/components/track/plan/view/comonents/report/TestCaseReportTemplateEdit.vue index d5a022954b..001917f1f2 100644 --- a/frontend/src/business/components/track/plan/view/comonents/report/TestCaseReportTemplateEdit.vue +++ b/frontend/src/business/components/track/plan/view/comonents/report/TestCaseReportTemplateEdit.vue @@ -127,7 +127,7 @@ this.listenGoBack(); }, initComponents() { - this.componentMap.forEach((value, key) =>{ + this.componentMap.forEach((value, key) => { if (this.template.content.components.indexOf(key) < 0 && this.components.indexOf(key) < 0) { this.components.push(key); } @@ -205,7 +205,7 @@ if (this.isReport) { url = '/case/report/get/'; } - this.$get(url + id, (response) =>{ + this.$get(url + id, (response) => { this.template = response.data; this.template.content = JSON.parse(response.data.content); if (this.template.content.customComponent) { @@ -238,7 +238,7 @@ if (this.isReport) { url = '/case/report/'; } - this.$post(url + this.type, param, () =>{ + this.$post(url + this.type, param, () => { this.$success(this.$t('commons.save_success')); this.handleClose(); this.$emit('refresh'); From 4122a81100a838aad43ab682685d7a8aa5b3742f Mon Sep 17 00:00:00 2001 From: BugKing Date: Wed, 25 Nov 2020 14:09:29 +0800 Subject: [PATCH 05/14] =?UTF-8?q?refactor:=20=E5=8E=BB=E6=8E=89=E4=B8=8D?= =?UTF-8?q?=E5=BF=85=E8=A6=81=E7=9A=84=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/common/css/main.css | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/frontend/src/common/css/main.css b/frontend/src/common/css/main.css index 85ae6dcfd5..fe69992221 100644 --- a/frontend/src/common/css/main.css +++ b/frontend/src/common/css/main.css @@ -110,9 +110,7 @@ body { } /* 修复带长度限制的文本框,内容太长造成的无法查看内容的问题 */ -/*.el-input-padding-fix .el-input__inner {*/ - /*padding-right: 60px ;*/ -/*}*/ + .el-input__inner[maxlength] { - padding-right: 60px ; + padding-right: 60px; } From 1c635c4617489d27fb3c628696abe2f86a5d7c80 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Wed, 25 Nov 2020 15:04:19 +0800 Subject: [PATCH 06/14] =?UTF-8?q?refactor(=E7=B3=BB=E7=BB=9F=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE):=20=E4=BF=AE=E6=94=B9=E7=94=A8=E6=88=B7ID=E9=95=BF?= =?UTF-8?q?=E5=BA=A6=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/business/components/settings/system/User.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/business/components/settings/system/User.vue b/frontend/src/business/components/settings/system/User.vue index 5be7dcc5ae..402b4413b1 100644 --- a/frontend/src/business/components/settings/system/User.vue +++ b/frontend/src/business/components/settings/system/User.vue @@ -381,7 +381,7 @@ export default { rule: { id: [ {required: true, message: this.$t('user.input_id'), trigger: 'blur'}, - {min: 2, max: 50, message: this.$t('commons.input_limit', [2, 50]), trigger: 'blur'}, + {min: 1, max: 50, message: this.$t('commons.input_limit', [1, 50]), trigger: 'blur'}, { required: true, pattern: '^[^\u4e00-\u9fa5]+$', From dcfb7a687a48cdc9661cbccaabd0809f89d7c8f8 Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Wed, 25 Nov 2020 15:26:15 +0800 Subject: [PATCH 07/14] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E8=AE=BE=E7=BD=AE=E5=AD=97=E6=95=B0=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E9=99=90=E5=88=B6=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/business/components/xpack | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/business/components/xpack b/frontend/src/business/components/xpack index 33bbdb3f52..13907bd5ff 160000 --- a/frontend/src/business/components/xpack +++ b/frontend/src/business/components/xpack @@ -1 +1 @@ -Subproject commit 33bbdb3f528c914bf333b2c1839dd6d3bbd9b569 +Subproject commit 13907bd5ff621214ae81e42098df382916c503ce From 4bd6c8ec71c4978d8947f0e455fe576a8745661c Mon Sep 17 00:00:00 2001 From: wenyann <64353056+wenyann@users.noreply.github.com> Date: Wed, 25 Nov 2020 15:38:58 +0800 Subject: [PATCH 08/14] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=BE=93?= =?UTF-8?q?=E5=85=A5=E9=A1=B9=E7=9B=AE=E5=90=8D=E7=A7=B0=EF=BC=8C=E7=82=B9?= =?UTF-8?q?=E5=87=BBenter=E9=94=AE=EF=BC=8C=E9=A1=B9=E7=9B=AE=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E5=88=9B=E5=BB=BA=E6=88=90=E5=8A=9F=EF=BC=8C=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=B2=A1=E6=9C=89=E6=8F=90=E7=A4=BA=20Closes=20819?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/business/components/project/MsProject.vue | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/frontend/src/business/components/project/MsProject.vue b/frontend/src/business/components/project/MsProject.vue index 147a478df8..54c45b8e19 100644 --- a/frontend/src/business/components/project/MsProject.vue +++ b/frontend/src/business/components/project/MsProject.vue @@ -204,6 +204,7 @@ export default { }); } }, + submit(formName) { this.$refs[formName].validate((valid) => { if (valid) { @@ -282,7 +283,18 @@ export default { }, openEnvironmentConfig(project) { this.$refs.environmentConfig.open(project.id); - } + }, + handleEvent(event) { + if (event.keyCode === 13) { + this.submit('form') + } + }, + }, + created() { + document.addEventListener('keydown', this.handleEvent) + }, + beforeDestroy() { + document.removeEventListener('keydown', this.handleEvent); } } From 9d1350a97b0ca4751062ee29475e05e18a870436 Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Wed, 25 Nov 2020 15:45:52 +0800 Subject: [PATCH 09/14] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA)?= =?UTF-8?q?:=20=E4=BF=AE=E5=A4=8D=20xmind=20=E5=AF=BC=E5=85=A5=E5=A4=87?= =?UTF-8?q?=E6=B3=A8=E7=BC=BA=E5=A4=B1=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/metersphere/xmind/XmindCaseParser.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/io/metersphere/xmind/XmindCaseParser.java b/backend/src/main/java/io/metersphere/xmind/XmindCaseParser.java index 7406ffec73..d08eea9ab3 100644 --- a/backend/src/main/java/io/metersphere/xmind/XmindCaseParser.java +++ b/backend/src/main/java/io/metersphere/xmind/XmindCaseParser.java @@ -231,7 +231,7 @@ public class XmindCaseParser { JSONObject step = new JSONObject(true); step.put("num", i + 1); step.put("desc", attacheds.get(i).getTitle()); - if (attacheds.get(i) != null && attacheds.get(i).getChildren() != null && attacheds.get(i).getChildren().getAttached()!=null) { + if (attacheds.get(i) != null && attacheds.get(i).getChildren() != null && attacheds.get(i).getChildren().getAttached() != null) { step.put("result", attacheds.get(i).getChildren().getAttached().get(0).getTitle()); } jsonArray.add(step); @@ -283,17 +283,20 @@ public class XmindCaseParser { // 测试步骤处理 List steps = new LinkedList<>(); + StringBuilder rc = new StringBuilder(); if (attacheds != null && !attacheds.isEmpty()) { attacheds.forEach(item -> { if (isAvailable(item.getTitle(), PC_REGEX)) { testCase.setPrerequisite(replace(item.getTitle(), PC_REGEX)); } else if (isAvailable(item.getTitle(), RC_REGEX)) { - testCase.setRemark(replace(item.getTitle(), RC_REGEX)); + rc.append(replace(item.getTitle(), RC_REGEX)); + rc.append("\n"); } else { steps.add(item); } }); } + testCase.setRemark(rc.toString()); testCase.setSteps(this.getSteps(steps)); testCases.add(testCase); // 校验合规性 From 45a7a05c143b3b90e478d8f5138f29dbdf7bbc7c Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Wed, 25 Nov 2020 16:23:53 +0800 Subject: [PATCH 10/14] =?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=E5=8F=AA=E8=AF=BB=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E7=BB=99=E7=94=A8=E4=BE=8B=E8=AF=84=E5=AE=A1?= =?UTF-8?q?=E5=8A=A0=E8=AF=84=E8=AE=BA=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/track/review/commom/ReviewComment.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/src/business/components/track/review/commom/ReviewComment.vue b/frontend/src/business/components/track/review/commom/ReviewComment.vue index c8901d7269..c849f11adc 100644 --- a/frontend/src/business/components/track/review/commom/ReviewComment.vue +++ b/frontend/src/business/components/track/review/commom/ReviewComment.vue @@ -23,9 +23,10 @@ resize="none" :autosize="{ minRows: 4, maxRows: 4}" @keyup.ctrl.enter.native="sendComment" + :disabled="isReadOnly" > - + {{ $t('test_track.comment.send') }} @@ -34,6 +35,7 @@