diff --git a/backend/src/main/java/io/metersphere/api/jmeter/APIBackendListenerClient.java b/backend/src/main/java/io/metersphere/api/jmeter/APIBackendListenerClient.java index ba7836e762..2b765169fe 100644 --- a/backend/src/main/java/io/metersphere/api/jmeter/APIBackendListenerClient.java +++ b/backend/src/main/java/io/metersphere/api/jmeter/APIBackendListenerClient.java @@ -243,21 +243,23 @@ public class APIBackendListenerClient extends AbstractBackendListenerClient impl BaseSystemConfigDTO baseSystemConfigDTO = systemParameterService.getBaseInfo(); String url = reportUrl; + String url2 = reportUrl; if (StringUtils.isEmpty(url)) { url = baseSystemConfigDTO.getUrl() + "/#/api/report/view/" + report.getId(); + url2 = baseSystemConfigDTO.getUrl() + "/#/api/automation/report"; } String successContext = ""; String failedContext = ""; String subject = ""; String event = ""; if (StringUtils.equals(ReportTriggerMode.API.name(), report.getTriggerMode())) { - successContext = "接口测试 API任务通知:'" + report.getName() + "'执行成功" + "\n" + "请点击下面链接进入测试报告页面" + "\n" + url; - failedContext = "接口测试 API任务通知:'" + report.getName() + "'执行失败" + "\n" + "请点击下面链接进入测试报告页面" + "\n" + url; + successContext = "接口测试 API任务通知:'" + report.getName() + "'执行成功" + "\n" + "请点击下面链接进入测试报告页面" + "\n" + "旧版接口测试路径" + url + "\n" + "新版接口测试路径" + url2; + failedContext = "接口测试 API任务通知:'" + report.getName() + "'执行失败" + "\n" + "请点击下面链接进入测试报告页面" + "\n" + "旧版接口测试路径" + url + "\n" + "新版接口测试路径" + url2; subject = Translator.get("task_notification_jenkins"); } if (StringUtils.equals(ReportTriggerMode.SCHEDULE.name(), report.getTriggerMode())) { - successContext = "接口测试定时任务通知:'" + report.getName() + "'执行成功" + "\n" + "请点击下面链接进入测试报告页面" + "\n" + url; - failedContext = "接口测试定时任务通知:'" + report.getName() + "'执行失败" + "\n" + "请点击下面链接进入测试报告页面" + "\n" + url; + successContext = "接口测试定时任务通知:'" + report.getName() + "'执行成功" + "\n" + "请点击下面链接进入测试报告页面" + "\n" + "旧版接口测试路径" + url + "\n" + "新版接口测试路径" + url2; + failedContext = "接口测试定时任务通知:'" + report.getName() + "'执行失败" + "\n" + "请点击下面链接进入测试报告页面" + "\n" + "旧版接口测试路径" + url + "\n" + "新版接口测试路径" + url2; subject = Translator.get("task_notification"); } if (StringUtils.equals("Success", report.getStatus())) { diff --git a/backend/src/main/resources/mail/ApiFailedNotification.html b/backend/src/main/resources/mail/ApiFailedNotification.html index aed24551e0..dded07b788 100644 --- a/backend/src/main/resources/mail/ApiFailedNotification.html +++ b/backend/src/main/resources/mail/ApiFailedNotification.html @@ -14,6 +14,8 @@

您所执行的 ${testName} 接口测试运行失败
请点击下面链接进入测试报告页面

${url}/#/${type}/report/view/${id} +

新版接口测试报告路径

+ ${url}/#/api/automation diff --git a/backend/src/main/resources/mail/ApiSuccessfulNotification.html b/backend/src/main/resources/mail/ApiSuccessfulNotification.html index 6512d5089f..11dc44ebc3 100644 --- a/backend/src/main/resources/mail/ApiSuccessfulNotification.html +++ b/backend/src/main/resources/mail/ApiSuccessfulNotification.html @@ -13,6 +13,8 @@

您所执行的 ${testName} 接口测试运行成功
请点击下面链接进入测试报告页面

${url}/#/${type}/report/view/${id} +

新版接口测试报告路径

+ ${url}/#/api/automation \ No newline at end of file diff --git a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue index 257b9335ef..f7fc3ea11a 100644 --- a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue +++ b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue @@ -148,7 +148,7 @@ + @remove="remove" @copyRow="copyRow" @suggestClick="suggestClick" @refReload="reload"/> @@ -423,7 +423,6 @@ document.removeEventListener("keydown", this.createCtrlSHandle); }, createCtrlSHandle(event) { - console.log("create ctrl + s"); handleCtrlSEvent(event, this.editScenario); }, getIdx(index) { @@ -884,7 +883,6 @@ } this.enableCookieShare = obj.enableCookieShare; this.scenarioDefinition = obj.hashTree; - console.log(this.scenarioDefinition) } } if (this.currentScenario.copy) { diff --git a/frontend/src/business/components/api/automation/scenario/common/ApiBaseComponent.vue b/frontend/src/business/components/api/automation/scenario/common/ApiBaseComponent.vue index 8f45731527..f5897a3516 100644 --- a/frontend/src/business/components/api/automation/scenario/common/ApiBaseComponent.vue +++ b/frontend/src/business/components/api/automation/scenario/common/ApiBaseComponent.vue @@ -12,7 +12,7 @@ + @click="active(data)" v-if="data.type!='scenario'"/> diff --git a/frontend/src/business/components/api/automation/scenario/component/ApiScenarioComponent.vue b/frontend/src/business/components/api/automation/scenario/component/ApiScenarioComponent.vue index e706dc9740..c98ca9d676 100644 --- a/frontend/src/business/components/api/automation/scenario/component/ApiScenarioComponent.vue +++ b/frontend/src/business/components/api/automation/scenario/component/ApiScenarioComponent.vue @@ -38,11 +38,15 @@ }, watch: {}, created() { - if (this.scenario.id && this.scenario.referenced === 'REF') { + if (this.scenario.id && this.scenario.referenced === 'REF' && !this.scenario.loaded) { this.result = this.$get("/api/automation/getApiScenario/" + this.scenario.id, response => { if (response.data) { + this.scenario.loaded = true; + if (response.data.scenarioDefinition) { + this.scenario.hashTree = JSON.parse(response.data.scenarioDefinition).hashTree; + } this.scenario.name = response.data.name; - this.reload(); + this.$emit('refReload'); } else { this.scenario.referenced = "Deleted"; } @@ -58,7 +62,7 @@ }, computed: { isDeletedOrRef() { - if (this.scenario.referenced!= undefined && this.scenario.referenced === 'Deleted' || this.scenario.referenced === 'REF') { + if (this.scenario.referenced != undefined && this.scenario.referenced === 'Deleted' || this.scenario.referenced === 'REF') { return true } return false; diff --git a/frontend/src/business/components/api/automation/scenario/component/ComponentConfig.vue b/frontend/src/business/components/api/automation/scenario/component/ComponentConfig.vue index a6834429db..8e9a5cd98e 100644 --- a/frontend/src/business/components/api/automation/scenario/component/ComponentConfig.vue +++ b/frontend/src/business/components/api/automation/scenario/component/ComponentConfig.vue @@ -2,7 +2,7 @@
+ @remove="remove" @copyRow="copyRow" @refReload="refReload"/>
@@ -107,6 +107,9 @@ suggestClick(node) { this.$emit('suggestClick', node); }, + refReload(){ + this.$emit('refReload'); + } } } diff --git a/frontend/src/business/components/api/automation/schedule/ScheduleNotification.vue b/frontend/src/business/components/api/automation/schedule/ScheduleNotification.vue index 074ff9c691..1c1f284b26 100644 --- a/frontend/src/business/components/api/automation/schedule/ScheduleNotification.vue +++ b/frontend/src/business/components/api/automation/schedule/ScheduleNotification.vue @@ -6,6 +6,26 @@ @click="handleAddTaskModel"> {{ $t('organization.message.create_new_notification') }} + + + {{ $t('organization.message.mail_template_example') }} + + + + + {{ $t('organization.message.robot_template') }} + + @@ -134,7 +154,35 @@ export default { }, data() { return { - + title: '\n' + + '\n' + + '\n' + + ' \n' + + ' MeterSphere\n' + + '\n' + + '\n' + + '
\n' + + '
\n' + + '

尊敬的用户:

\n' + + '

您好:\n' + + '

\n' + + '
\n' + + '

您所执行的 ${testName} 接口测试运行失败
\n' + + ' 请点击下面链接进入测试报告页面

\n' + + ' ${url}/#/${type}/report/view/${id}\n' + + '

新版接口测试报告路径

\n' + + ' ${url}/#/api/automation\n' + + '
\n' + + '\n' + + '
\n' + + '\n' + + '', + robotTitle: + "测试【任务通知】:'您所执行的 ${testName} ${type}测试运行${status}\n" + + "请点击下面链接进入测试报告页面\n" + + "${url}/#/${type}/report/view/${id}" + + "新版接口测试报告路径\n" + + "${url}/#/api/automation", scheduleTask: [{ taskType: "scheduleTask", event: "", diff --git a/frontend/src/business/components/api/definition/components/import/ApiImport.vue b/frontend/src/business/components/api/definition/components/import/ApiImport.vue index 655fbdde6f..c15783b710 100644 --- a/frontend/src/business/components/api/definition/components/import/ApiImport.vue +++ b/frontend/src/business/components/api/definition/components/import/ApiImport.vue @@ -181,7 +181,7 @@ export default { methods: { scheduleEdit() { if (!this.formData.swaggerUrl) { - this.$warning(this.$t('commons.please_upload')); + this.$warning(this.$t('commons.please_fill_path')); this.swaggerSynchronization = !this.swaggerSynchronization } else { if (this.swaggerSynchronization) { diff --git a/frontend/src/business/components/common/components/MsTableHeader.vue b/frontend/src/business/components/common/components/MsTableHeader.vue index 00c0f9d991..463e5feadb 100644 --- a/frontend/src/business/components/common/components/MsTableHeader.vue +++ b/frontend/src/business/components/common/components/MsTableHeader.vue @@ -116,7 +116,7 @@ } .search-bar { - width: 200px + width: 240px } diff --git a/frontend/src/business/components/settings/organization/components/DefectTaskNotification.vue b/frontend/src/business/components/settings/organization/components/DefectTaskNotification.vue index 9443c71359..1375d4ab42 100644 --- a/frontend/src/business/components/settings/organization/components/DefectTaskNotification.vue +++ b/frontend/src/business/components/settings/organization/components/DefectTaskNotification.vue @@ -6,6 +6,26 @@ {{ $t('organization.message.create_new_notification') }} + + + {{ $t('organization.message.mail_template_example') }} + + + + + {{ $t('organization.message.robot_template') }} + +
@@ -129,6 +149,19 @@ export default { }, data() { return { + title: "\n" + + "\n" + + "\n" + + " \n" + + " MeterSphere\n" + + "\n" + + "\n" + + "
\n" + + "

${creator}发起了一个缺陷:${issuesName},请跟进

\n" + + "
\n" + + "\n" + + "", + robotTitle: "【任务通知】:${creator}发起了一个缺陷:${issuesName},请跟进", defectTask: [{ taskType: "defectTask", event: "", diff --git a/frontend/src/business/components/settings/organization/components/JenkinsNotification.vue b/frontend/src/business/components/settings/organization/components/JenkinsNotification.vue index 82b18b0380..14f8bb6109 100644 --- a/frontend/src/business/components/settings/organization/components/JenkinsNotification.vue +++ b/frontend/src/business/components/settings/organization/components/JenkinsNotification.vue @@ -6,6 +6,28 @@ {{ $t('organization.message.create_new_notification') }} + + + {{ $t('organization.message.mail_template_example') }} + + + + + {{ $t('organization.message.robot_template') }} + + + +
@@ -132,6 +154,35 @@ export default { }, data() { return { + title: '\n' + + '\n' + + '\n' + + ' \n' + + ' MeterSphere\n' + + '\n' + + '\n' + + '
\n' + + '
\n' + + '

尊敬的用户:

\n' + + '

您好:\n' + + '

\n' + + '
\n' + + '

您所执行的 ${testName} 接口测试运行失败
\n' + + ' 请点击下面链接进入测试报告页面

\n' + + ' ${url}/#/${type}/report/view/${id}\n' + + '

新版接口测试报告路径

\n' + + ' ${url}/#/api/automation\n' + + '
\n' + + '\n' + + '
\n' + + '\n' + + '', + robotTitle: + "测试【任务通知】:'您所执行的 ${testName} ${type}测试运行${status}\n" + + "请点击下面链接进入测试报告页面\n" + + "${url}/#/${type}/report/view/${id}" + + "新版接口测试报告路径\n" + + "${url}/#/api/automation", jenkinsTask: [{ taskType: "jenkinsTask", event: "", diff --git a/frontend/src/business/components/settings/organization/components/ScheduleTaskNotification.vue b/frontend/src/business/components/settings/organization/components/ScheduleTaskNotification.vue index 5daf2ba323..43e18163a8 100644 --- a/frontend/src/business/components/settings/organization/components/ScheduleTaskNotification.vue +++ b/frontend/src/business/components/settings/organization/components/ScheduleTaskNotification.vue @@ -6,6 +6,26 @@ @click="handleAddTaskModel"> {{ $t('organization.message.create_new_notification') }} + + + {{ $t('organization.message.mail_template_example') }} + + + + + {{ $t('organization.message.robot_template') }} + +
@@ -135,7 +155,35 @@ export default { }, data() { return { - + title: '\n' + + '\n' + + '\n' + + ' \n' + + ' MeterSphere\n' + + '\n' + + '\n' + + '
\n' + + '
\n' + + '

尊敬的用户:

\n' + + '

您好:\n' + + '

\n' + + '
\n' + + '

您所执行的 ${testName} 接口测试运行失败
\n' + + ' 请点击下面链接进入测试报告页面

\n' + + ' ${url}/#/${type}/report/view/${id}\n' + + '

新版接口测试报告路径

\n' + + ' ${url}/#/api/automation\n' + + '
\n' + + '\n' + + '
\n' + + '\n' + + '', + robotTitle: + "测试【任务通知】:'您所执行的 ${testName} ${type}测试运行${status}\n" + + "请点击下面链接进入测试报告页面\n" + + "${url}/#/${type}/report/view/${id}" + + "新版接口测试报告路径\n" + + "${url}/#/api/automation", scheduleTask: [{ taskType: "scheduleTask", event: "", diff --git a/frontend/src/business/components/settings/organization/components/TestPlanTaskNotification.vue b/frontend/src/business/components/settings/organization/components/TestPlanTaskNotification.vue index 07da85f9a4..2708c60379 100644 --- a/frontend/src/business/components/settings/organization/components/TestPlanTaskNotification.vue +++ b/frontend/src/business/components/settings/organization/components/TestPlanTaskNotification.vue @@ -6,6 +6,26 @@ {{ $t('organization.message.create_new_notification') }} + + + {{ $t('organization.message.mail_template_example') }} + + + + + {{ $t('organization.message.robot_template') }} + +
@@ -130,6 +150,27 @@ export default { }, data() { return { + title: "\n" + + "\n" + + "\n" + + " \n" + + " MeterSphere\n" + + "\n" + + "\n" + + "
\n" + + "

${creator} 创建的:
\n" + + " ${testPlanName}
\n" + + " 计划开始时间是:${start}
\n" + + " 计划结束时间为:${end}
\n" + + " 请跟进!
\n" + + " 点击下面链接进入测试计划页面

\n" + + " ${url}/#/track/plan/all\n" + + "
\n" + + "\n" + + "", + robotTitle: + " 【任务通知】:${creator} 创建的:${testPlanName}计划开始时间是:${start}计划结束时间是:${end}请跟进!/ ${status}!" + + "点击下面链接进入测试计划页面${url}/#/track/plan/all", testCasePlanTask: [{ taskType: "testPlanTask", event: "", diff --git a/frontend/src/business/components/settings/organization/components/TestReviewNotification.vue b/frontend/src/business/components/settings/organization/components/TestReviewNotification.vue index 46707c2799..ed89473882 100644 --- a/frontend/src/business/components/settings/organization/components/TestReviewNotification.vue +++ b/frontend/src/business/components/settings/organization/components/TestReviewNotification.vue @@ -6,6 +6,26 @@ {{ $t('organization.message.create_new_notification') }} + + + {{ $t('organization.message.mail_template_example') }} + + + + + {{ $t('organization.message.robot_template') }} + +
@@ -130,6 +150,26 @@ export default { }, data() { return { + title: "\n" + + "\n" + + "\n" + + " \n" + + " MeterSphere\n" + + "\n" + + "\n" + + "
\n" + + "

${creator} 创建的:
\n" + + " ${reviewName}待开始
\n" + + " 计划开始时间是:${start}
\n" + + " 计划结束时间为:${end}
\n" + + " 请跟进!/${status}
\n" + + " 点击下面链接进入评审页面进行审核

\n" + + " ${url}/#/track/review/view/${id}\n" + + "
\n" + + "\n" + + "", + robotTitle: "【任务通知】:${creator} 创建的:${reviewName}待开始,计划开始时间是:${start}," + + "计划结束时间是:${end}请跟进!/ ${status}!点击下面链接进入测试评审页面${url}/#/track/review/view/${id}", reviewTask: [{ taskType: "reviewTask", event: "", diff --git a/frontend/src/business/components/track/plan/view/comonents/api/TestPlanCaseListHeader.vue b/frontend/src/business/components/track/plan/view/comonents/api/TestPlanCaseListHeader.vue index c16c85224c..d5da2e47e2 100644 --- a/frontend/src/business/components/track/plan/view/comonents/api/TestPlanCaseListHeader.vue +++ b/frontend/src/business/components/track/plan/view/comonents/api/TestPlanCaseListHeader.vue @@ -3,7 +3,7 @@ :condition="condition" @search="$emit('refresh')" :show-create="false" - :tip="$t('commons.search_by_name_or_id')"> + :tip="$t('commons.search_by_id_name_tag')"> diff --git a/frontend/src/business/components/track/plan/view/comonents/functional/FunctionalTestCaseList.vue b/frontend/src/business/components/track/plan/view/comonents/functional/FunctionalTestCaseList.vue index 7f4ed90945..620cbc9433 100644 --- a/frontend/src/business/components/track/plan/view/comonents/functional/FunctionalTestCaseList.vue +++ b/frontend/src/business/components/track/plan/view/comonents/functional/FunctionalTestCaseList.vue @@ -3,7 +3,7 @@