From dd2571e4765683bd9004d9f6aed0905f83415e9c Mon Sep 17 00:00:00 2001 From: CaptainB Date: Thu, 25 Nov 2021 13:03:05 +0800 Subject: [PATCH] =?UTF-8?q?fix(jenkins):=20=E4=BF=AE=E5=A4=8Djenkins?= =?UTF-8?q?=E6=89=A7=E8=A1=8C=E9=80=9A=E7=9F=A5=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1008340 --user=刘瑞斌 【jenkins插件】通知问题汇总 https://www.tapd.cn/55049933/s/1075016 --- .../notice/PerformanceNoticeEvent.java | 2 +- .../PerformanceApiSuccessNotification.html | 18 ------------------ .../mail/PerformanceSuccessNotification.html | 12 ++++++++++++ .../components/jenkins/JenkinsNotification.vue | 4 ++-- 4 files changed, 15 insertions(+), 21 deletions(-) delete mode 100644 backend/src/main/resources/mail/PerformanceApiSuccessNotification.html create mode 100644 backend/src/main/resources/mail/PerformanceSuccessNotification.html diff --git a/backend/src/main/java/io/metersphere/performance/notice/PerformanceNoticeEvent.java b/backend/src/main/java/io/metersphere/performance/notice/PerformanceNoticeEvent.java index ecb122c8e0..398f8e18ff 100644 --- a/backend/src/main/java/io/metersphere/performance/notice/PerformanceNoticeEvent.java +++ b/backend/src/main/java/io/metersphere/performance/notice/PerformanceNoticeEvent.java @@ -76,7 +76,7 @@ public class PerformanceNoticeEvent implements LoadTestFinishEvent { NoticeModel noticeModel = NoticeModel.builder() .operator(loadTestReport.getUserId()) .successContext(successContext) - .successMailTemplate("PerformanceApiSuccessNotification") + .successMailTemplate("PerformanceSuccessNotification") .failedContext(failedContext) .failedMailTemplate("PerformanceFailedNotification") .testId(loadTestReport.getTestId()) diff --git a/backend/src/main/resources/mail/PerformanceApiSuccessNotification.html b/backend/src/main/resources/mail/PerformanceApiSuccessNotification.html deleted file mode 100644 index 04bca545f6..0000000000 --- a/backend/src/main/resources/mail/PerformanceApiSuccessNotification.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - - MeterSphere - - -
-

尊敬的用户:

-

您好: -

-
-

您所执行的 ${name} 性能测试已完成
- 请点击下面链接进入测试报告页面

- ${url}/#/${type}/report/view/${id} -
- - \ No newline at end of file diff --git a/backend/src/main/resources/mail/PerformanceSuccessNotification.html b/backend/src/main/resources/mail/PerformanceSuccessNotification.html new file mode 100644 index 0000000000..0293d6e241 --- /dev/null +++ b/backend/src/main/resources/mail/PerformanceSuccessNotification.html @@ -0,0 +1,12 @@ + + + + + MeterSphere + + +
+ ${operator}执行性能测试成功: ${name}, 报告: ${reportUrl} +
+ + \ No newline at end of file diff --git a/frontend/src/business/components/settings/workspace/components/jenkins/JenkinsNotification.vue b/frontend/src/business/components/settings/workspace/components/jenkins/JenkinsNotification.vue index 0756eb1660..9f51d8e16b 100644 --- a/frontend/src/business/components/settings/workspace/components/jenkins/JenkinsNotification.vue +++ b/frontend/src/business/components/settings/workspace/components/jenkins/JenkinsNotification.vue @@ -157,11 +157,11 @@ export default { '\n' + '\n' + '
\n' + - '${operator}所执行的 ${name} ${type}测试运行成功' + + '${operator}执行 Jenkins 成功: ${name}' + '
\n' + '\n' + '', - robotTitle: "${operator}所执行的 ${name} ${type}测试运行成功", + robotTitle: "${operator}执行 Jenkins 成功: ${name}", jenkinsTask: [{ taskType: "jenkinsTask", event: "",