From bf45160521d90f331b808b361f7d2d64a597c078 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Fri, 23 Dec 2022 14:31:18 +0800 Subject: [PATCH 1/5] =?UTF-8?q?refactor(=E7=B3=BB=E7=BB=9F=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE):=20=E6=9B=B4=E6=96=B0license=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- framework/sdk-parent/frontend/src/i18n/lang/en-US.js | 2 ++ framework/sdk-parent/frontend/src/i18n/lang/zh-CN.js | 2 ++ framework/sdk-parent/frontend/src/i18n/lang/zh-TW.js | 2 ++ .../metersphere/xpack/license/dto/LicenseInfoDTO.java | 8 ++++++++ .../frontend/src/business/system/license/MxLicense.vue | 10 ++++++++++ 5 files changed, 24 insertions(+) diff --git a/framework/sdk-parent/frontend/src/i18n/lang/en-US.js b/framework/sdk-parent/frontend/src/i18n/lang/en-US.js index 7f9f61a672..dad3730c0f 100644 --- a/framework/sdk-parent/frontend/src/i18n/lang/en-US.js +++ b/framework/sdk-parent/frontend/src/i18n/lang/en-US.js @@ -509,6 +509,8 @@ const message = { invalid: 'invalid', count_warning: 'The number of system users has exceeded the license limit. Please contact the staff as soon as possible.', expired: 'expired', + serial_num: 'serial number', + remark: 'remark', }, workstation: { sync: 'Synchronize', diff --git a/framework/sdk-parent/frontend/src/i18n/lang/zh-CN.js b/framework/sdk-parent/frontend/src/i18n/lang/zh-CN.js index 7d7370df71..f813f39259 100644 --- a/framework/sdk-parent/frontend/src/i18n/lang/zh-CN.js +++ b/framework/sdk-parent/frontend/src/i18n/lang/zh-CN.js @@ -513,6 +513,8 @@ const message = { invalid: '无效', count_warning: '系统用户数已超过license限制数量,请尽快联系工作人员。', expired: '已过期', + serial_num: '序列号', + remark: '备注', }, workstation: { sync: '同步', diff --git a/framework/sdk-parent/frontend/src/i18n/lang/zh-TW.js b/framework/sdk-parent/frontend/src/i18n/lang/zh-TW.js index 9dd0a0ead3..fc18c7f8cb 100644 --- a/framework/sdk-parent/frontend/src/i18n/lang/zh-TW.js +++ b/framework/sdk-parent/frontend/src/i18n/lang/zh-TW.js @@ -512,6 +512,8 @@ const message = { invalid: '無效', count_warning: '系統用戶數已超過license限制數量,請盡快聯繫工作人員。', expired: '已過期', + serial_num: '序列號', + remark: '備註', }, workstation: { sync: '同步', diff --git a/framework/sdk-parent/xpack-interface/src/main/java/io/metersphere/xpack/license/dto/LicenseInfoDTO.java b/framework/sdk-parent/xpack-interface/src/main/java/io/metersphere/xpack/license/dto/LicenseInfoDTO.java index eac3931641..2e4a61c239 100644 --- a/framework/sdk-parent/xpack-interface/src/main/java/io/metersphere/xpack/license/dto/LicenseInfoDTO.java +++ b/framework/sdk-parent/xpack-interface/src/main/java/io/metersphere/xpack/license/dto/LicenseInfoDTO.java @@ -30,4 +30,12 @@ public class LicenseInfoDTO implements Serializable { * 授权数量 */ private int count; + /** + * 序列号 + */ + private String serialNo; + /** + * 备注 + */ + private String remark; } diff --git a/system-setting/frontend/src/business/system/license/MxLicense.vue b/system-setting/frontend/src/business/system/license/MxLicense.vue index f70cda551d..18c4468963 100644 --- a/system-setting/frontend/src/business/system/license/MxLicense.vue +++ b/system-setting/frontend/src/business/system/license/MxLicense.vue @@ -37,6 +37,14 @@ {{ $t('license.count') }} {{ license.count }} + + {{ $t('license.serial_num') }} + {{ license.serialNo }} + + + {{ $t('license.remark') }} + {{ license.remark }} + {{ $t('license.status') }} @@ -108,6 +116,8 @@ export default { this.license.licenseVersion = value.license.licenseVersion; this.license.licenseCount = value.license.licenseCount; this.license.status = value.status; + this.license.serialNo = value.license.serialNo; + this.license.remark = value.license.remark; saveLicense(value.status); if (hasLicense()) { getModuleList() From fb291ba2f837f3232c8de5042d5e6d4f24116dfa Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Fri, 23 Dec 2022 15:57:17 +0800 Subject: [PATCH 2/5] =?UTF-8?q?refactor(=E6=B5=8B=E8=AF=95=E8=B7=9F?= =?UTF-8?q?=E8=B8=AA):=20=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E6=89=A7?= =?UTF-8?q?=E8=A1=8C=E6=97=B6=EF=BC=8C=E7=A6=81=E6=AD=A2=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【【测试跟踪】正在执行的计划,批量删除也成功了】https://www.tapd.cn/55049933/bugtrace/bugs/view?bug_id=1155049933001020150 --- .../base/mapper/ext/ExtTestPlanReportContentMapper.java | 2 ++ .../base/mapper/ext/ExtTestPlanReportContentMapper.xml | 5 +++++ .../io/metersphere/plan/service/TestPlanReportService.java | 4 ++++ .../java/io/metersphere/plan/service/TestPlanService.java | 4 ++++ .../backend/src/main/resources/i18n/commons_en_US.properties | 3 ++- .../backend/src/main/resources/i18n/commons_zh_CN.properties | 1 + .../backend/src/main/resources/i18n/commons_zh_TW.properties | 3 ++- 7 files changed, 20 insertions(+), 2 deletions(-) diff --git a/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanReportContentMapper.java b/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanReportContentMapper.java index 37f3c77117..fe5b784d56 100644 --- a/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanReportContentMapper.java +++ b/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanReportContentMapper.java @@ -8,4 +8,6 @@ public interface ExtTestPlanReportContentMapper { boolean isDynamicallyGenerateReport(@Param("reportId") String reportId); TestPlanReportContentWithBLOBs selectForPassRate(@Param("reportId") String reportId); + + boolean hasRunningReport(@Param("planId") String planId); } diff --git a/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanReportContentMapper.xml b/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanReportContentMapper.xml index d5c8277f14..64126a20ee 100644 --- a/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanReportContentMapper.xml +++ b/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanReportContentMapper.xml @@ -23,4 +23,9 @@ from test_plan_report_content where test_plan_report_id = #{reportId} + diff --git a/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanReportService.java b/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanReportService.java index 35aad533f6..5221ca9b9b 100644 --- a/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanReportService.java +++ b/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanReportService.java @@ -136,6 +136,10 @@ public class TestPlanReportService { return list; } + public boolean hasRunningReport(String planId) { + return extTestPlanReportContentMapper.hasRunningReport(planId); + } + public void setTestPlanReportPassRate(List list) { for (TestPlanReportDTO testPlanReportDTO : list) { // 如果数据库查询成功率字段为空或 0 则重新计算一次 diff --git a/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanService.java b/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanService.java index 214b4bdffb..12702565bf 100644 --- a/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanService.java +++ b/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanService.java @@ -318,6 +318,10 @@ public class TestPlanService { public int deleteTestPlan(String planId) { + if (testPlanReportService.hasRunningReport(planId)) { + MSException.throwException(Translator.get("test_plan_delete_exec_error")); + } + // 发送删除通知 try { kafkaTemplate.send(KafkaTopicConstants.TEST_PLAN_DELETED_TOPIC, objectMapper.writeValueAsString(List.of(planId))); diff --git a/test-track/backend/src/main/resources/i18n/commons_en_US.properties b/test-track/backend/src/main/resources/i18n/commons_en_US.properties index 882c8628ee..8565c5ee83 100644 --- a/test-track/backend/src/main/resources/i18n/commons_en_US.properties +++ b/test-track/backend/src/main/resources/i18n/commons_en_US.properties @@ -225,4 +225,5 @@ jira_auth_error=Account name or password (Token) is wrong jira_auth_url_error=The test connection failed, please check whether the Jira address is correct platform_plugin_not_exit=Platform docking function has been plug-in, please download the corresponding version of the plug-in: -plan_warning=The test plan does not have an associated executable use case \ No newline at end of file +plan_warning=The test plan does not have an associated executable use case +test_plan_delete_exec_error=The test plan is being executed diff --git a/test-track/backend/src/main/resources/i18n/commons_zh_CN.properties b/test-track/backend/src/main/resources/i18n/commons_zh_CN.properties index 966e889318..c5cdbc4617 100644 --- a/test-track/backend/src/main/resources/i18n/commons_zh_CN.properties +++ b/test-track/backend/src/main/resources/i18n/commons_zh_CN.properties @@ -198,3 +198,4 @@ jira_auth_url_error=测试连接失败,请检查Jira地址是否正确 platform_plugin_not_exit=平台对接功能已插件化,请下载对应版本的插件: plan_warning=测试计划没有关联可执行的用例 +test_plan_delete_exec_error=测试计划正在执行中 diff --git a/test-track/backend/src/main/resources/i18n/commons_zh_TW.properties b/test-track/backend/src/main/resources/i18n/commons_zh_TW.properties index 7a355ade0d..edfe8fc614 100644 --- a/test-track/backend/src/main/resources/i18n/commons_zh_TW.properties +++ b/test-track/backend/src/main/resources/i18n/commons_zh_TW.properties @@ -198,4 +198,5 @@ jira_auth_error=賬號名或密碼(Token)錯誤 jira_auth_url_error=測試連接失敗,請檢查Jira地址是否正確 platform_plugin_not_exit=平臺對接功能已插件化,請下載對應版本的插件: -plan_warning=測試計劃沒有關聯可執行的用例 \ No newline at end of file +plan_warning=測試計劃沒有關聯可執行的用例 +test_plan_delete_exec_error=測試計劃正在執行中 From 1768fd22d33baec141ca76dfc9230196e19f3b72 Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Fri, 23 Dec 2022 15:46:36 +0800 Subject: [PATCH 3/5] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):?= =?UTF-8?q?=20=E4=BF=AE=E5=A4=8D=E5=88=87=E6=8D=A2tab=E5=90=8E=E5=86=8D?= =?UTF-8?q?=E5=9B=9E=E7=BC=96=E8=BE=91=E9=A1=B5=E9=9D=A2=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=EF=BC=8C=E6=B2=A1=E5=BC=B9=E5=90=8C=E6=AD=A5=E7=AA=97=E5=8F=A3?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1016100--user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001016100 --- .../complete/EditCompleteHTTPApi.vue | 64 +++++++++++++------ 1 file changed, 44 insertions(+), 20 deletions(-) diff --git a/api-test/frontend/src/business/definition/components/complete/EditCompleteHTTPApi.vue b/api-test/frontend/src/business/definition/components/complete/EditCompleteHTTPApi.vue index 45ab7cc218..1d8caf2e35 100644 --- a/api-test/frontend/src/business/definition/components/complete/EditCompleteHTTPApi.vue +++ b/api-test/frontend/src/business/definition/components/complete/EditCompleteHTTPApi.vue @@ -566,43 +566,69 @@ export default { if (this.httpForm.path !== this.beforeHttpForm.path && !this.noShowSyncRuleRelation) { this.batchSyncApiVisible = true; } - if (this.request.headers && this.beforeRequest.headers) { - let submitRequestHeaders = JSON.stringify(this.request.headers); + if (this.httpForm.request.headers && this.beforeRequest.headers) { + for (let i = 0; i < this.httpForm.request.headers.length; i++) { + if (this.httpForm.request.headers[i].isEdit !== undefined) { + this.beforeRequest.headers[i].isEdit = this.httpForm.request.headers[i].isEdit + } + } + let submitRequestHeaders = JSON.stringify(this.httpForm.request.headers); let beforeRequestHeaders = JSON.stringify(this.beforeRequest.headers); if (submitRequestHeaders !== beforeRequestHeaders && !this.noShowSyncRuleRelation) { this.batchSyncApiVisible = true; } } - if (this.request.arguments && this.beforeRequest.arguments) { - let submitRequestQuery = JSON.stringify(this.request.arguments); + if (this.httpForm.request.arguments && this.beforeRequest.arguments) { + for (let i = 0; i < this.httpForm.request.arguments.length; i++) { + if (this.httpForm.request.arguments[i].isEdit !== undefined) { + this.beforeRequest.arguments[i].isEdit = this.httpForm.request.arguments[i].isEdit + } + } + let submitRequestQuery = JSON.stringify(this.httpForm.request.arguments); let beforeRequestQuery = JSON.stringify(this.beforeRequest.arguments); if (submitRequestQuery !== beforeRequestQuery && !this.noShowSyncRuleRelation) { this.batchSyncApiVisible = true; } } - if (this.request.rest && this.beforeRequest.rest) { - let submitRequestRest = JSON.stringify(this.request.rest); + if (this.httpForm.request.rest && this.beforeRequest.rest) { + for (let i = 0; i < this.httpForm.request.rest.length; i++) { + if (this.httpForm.request.rest[i].isEdit !== undefined) { + this.beforeRequest.rest[i].isEdit = this.httpForm.request.rest[i].isEdit + } + } + let submitRequestRest = JSON.stringify(this.httpForm.request.rest); let beforeRequestRest = JSON.stringify(this.beforeRequest.rest); if (submitRequestRest !== beforeRequestRest && !this.noShowSyncRuleRelation) { this.batchSyncApiVisible = true; } } - if (this.request.body && this.beforeRequest.body) { - let submitRequestBody = JSON.stringify(this.request.body); + if (this.httpForm.request.body && this.beforeRequest.body) { + let submitRequestBody = JSON.stringify(this.httpForm.request.body); let beforeRequestBody = JSON.stringify(this.beforeRequest.body); + for (let i = 0; i < this.httpForm.request.body.kvs.length; i++) { + if (this.httpForm.request.body.kvs[i].isEdit !== undefined) { + this.beforeRequest.body.kvs[i].isEdit = this.httpForm.request.body.kvs[i].isEdit + } + if (this.httpForm.request.body.kvs[i].files !== null && this.httpForm.request.body.kvs[i].files.length === 0) { + this.beforeRequest.body.kvs[i].files = this.httpForm.request.body.kvs[i].files + } + if (this.httpForm.request.body.kvs[i].uuid) { + this.beforeRequest.body.kvs[i].uuid = this.httpForm.request.body.kvs[i].uuid + } + } if (submitRequestBody !== beforeRequestBody && !this.noShowSyncRuleRelation) { this.batchSyncApiVisible = true; } } - if (this.request.authManager && this.beforeRequest.authManager) { - let submitRequestAuthManager = JSON.stringify(this.request.authManager); + if (this.httpForm.request.authManager && this.beforeRequest.authManager) { + let submitRequestAuthManager = JSON.stringify(this.httpForm.request.authManager); let beforeRequestAuthManager = JSON.stringify(this.beforeRequest.authManager); if (submitRequestAuthManager !== beforeRequestAuthManager && !this.noShowSyncRuleRelation) { this.batchSyncApiVisible = true; } } - if (this.request.hashTree && this.beforeRequest.hashTree) { - let submitRequestHashTree = JSON.stringify(this.request.hashTree); + if (this.httpForm.request.hashTree && this.beforeRequest.hashTree) { + let submitRequestHashTree = JSON.stringify(this.httpForm.request.hashTree); let beforeRequestHashTree = JSON.stringify(this.beforeRequest.hashTree); if (submitRequestHashTree !== beforeRequestHashTree && !this.noShowSyncRuleRelation) { this.batchSyncApiVisible = true; @@ -782,6 +808,11 @@ export default { } else { this.versionData = response.data; } + + this.beforeHttpForm = this.versionData[0]; + this.beforeRequest = JSON.parse(this.versionData[0].request); + this.beforeResponse = JSON.parse(this.versionData[0].response); + let latestVersionData = response.data.filter((v) => v.versionId === this.latestVersionId); if (latestVersionData.length > 0) { this.hasLatest = false @@ -1078,14 +1109,7 @@ export default { this.getCitedScenarioCount(); this.getCaseCount(); } - }, - mounted() { - if (hasLicense()) { - this.beforeHttpForm = deepClone(this.basisData); - this.beforeRequest = deepClone(this.request); - this.beforeResponse = deepClone(this.response); - } - }, + } }; From 1bf178fede51fdef7afcfe5178f574cb5be72ce1 Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Wed, 21 Dec 2022 11:39:27 +0800 Subject: [PATCH 4/5] =?UTF-8?q?feat(=E9=80=9A=E7=94=A8=E5=8A=9F=E8=83=BD):?= =?UTF-8?q?=20=E7=8E=AF=E5=A2=83=E5=88=97=E8=A1=A8=E5=8A=A0=E5=8F=AF?= =?UTF-8?q?=E7=AD=9B=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --story=1010818--user=郭雨琦 https://www.tapd.cn/55049933/prong/stories/view/1155049933001010818 --- .../java/io/metersphere/sechedule/SwaggerUrlImportJob.java | 1 - .../frontend/src/business/automation/scenario/EnvSelect.vue | 1 + .../src/business/automation/scenario/EnvSelectPopover.vue | 1 + .../definition/components/case/MsEnvironmentSelect.vue | 1 + .../src/business/environment/components/EnvironmentSelect.vue | 1 + .../sdk-parent/frontend/src/components/MsEnvironmentSelect.vue | 2 +- .../components/environment/snippet/ext/MsEnvironmentSelect.vue | 2 +- test-track/frontend/src/business/plan/env/EnvSelect.vue | 2 +- test-track/frontend/src/business/plan/env/EnvSelectPopover.vue | 3 ++- .../frontend/src/business/module/environment/EnvSelect.vue | 3 ++- 10 files changed, 11 insertions(+), 6 deletions(-) diff --git a/api-test/backend/src/main/java/io/metersphere/sechedule/SwaggerUrlImportJob.java b/api-test/backend/src/main/java/io/metersphere/sechedule/SwaggerUrlImportJob.java index 4448b49965..7e4e2addef 100644 --- a/api-test/backend/src/main/java/io/metersphere/sechedule/SwaggerUrlImportJob.java +++ b/api-test/backend/src/main/java/io/metersphere/sechedule/SwaggerUrlImportJob.java @@ -8,7 +8,6 @@ import io.metersphere.service.definition.ApiDefinitionService; import io.metersphere.base.domain.SwaggerUrlProject; import io.metersphere.commons.constants.ScheduleGroup; import io.metersphere.commons.utils.CommonBeanFactory; -import io.metersphere.commons.utils.JSON; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.json.JSONObject; diff --git a/api-test/frontend/src/business/automation/scenario/EnvSelect.vue b/api-test/frontend/src/business/automation/scenario/EnvSelect.vue index 6841798b60..6491af61d9 100644 --- a/api-test/frontend/src/business/automation/scenario/EnvSelect.vue +++ b/api-test/frontend/src/business/automation/scenario/EnvSelect.vue @@ -3,6 +3,7 @@
diff --git a/api-test/frontend/src/business/automation/scenario/EnvSelectPopover.vue b/api-test/frontend/src/business/automation/scenario/EnvSelectPopover.vue index d39d179fa7..9b8ccc0b9d 100644 --- a/api-test/frontend/src/business/automation/scenario/EnvSelectPopover.vue +++ b/api-test/frontend/src/business/automation/scenario/EnvSelectPopover.vue @@ -40,6 +40,7 @@ :placeholder="$t('api_test.environment.select_environment')" style="margin-top: 8px; width: 100%" size="small" + filterable @change="chooseEnv"> - -
- {{ itemName }} -
- + From a4e4996e9fd6f5ed3900029865375c0cab13151f Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Fri, 23 Dec 2022 16:31:12 +0800 Subject: [PATCH 5/5] =?UTF-8?q?refactor(=E6=B5=8B=E8=AF=95=E8=B7=9F?= =?UTF-8?q?=E8=B8=AA):=20=E5=8E=BB=E6=8E=89=E9=A5=BC=E5=9B=BE=E5=9B=BE?= =?UTF-8?q?=E4=BE=8B=E7=82=B9=E5=87=BB=E6=94=BE=E5=A4=A7=E7=9A=84=E6=95=88?= =?UTF-8?q?=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --user=郭雨琦 --- .../frontend/src/business/home/components/chart/CountChart.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/test-track/frontend/src/business/home/components/chart/CountChart.vue b/test-track/frontend/src/business/home/components/chart/CountChart.vue index 1d28f1cdc2..18ee5229ca 100644 --- a/test-track/frontend/src/business/home/components/chart/CountChart.vue +++ b/test-track/frontend/src/business/home/components/chart/CountChart.vue @@ -133,6 +133,7 @@ export default { itemStyle: { borderWidth: 0.1 }, + inactiveBorderWidth: 0.1, pageIcons: { vertical: [ 'path://M387.84 164.906667a22.122667 22.122667 0 0 0-0.362667-30.72 20.522667 20.522667 0 0 0-29.674666 0.362666L0 512.853333l357.802667 378.282667c8.042667 8.533333 21.290667 8.746667 29.674666 0.341333 8.32-8.32 8.533333-22.016 0.384-30.72L60.330667 512.853333 387.861333 164.906667z',