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 d4a4a98a8d..cc3ad10c74 100644 --- a/backend/src/main/java/io/metersphere/api/jmeter/APIBackendListenerClient.java +++ b/backend/src/main/java/io/metersphere/api/jmeter/APIBackendListenerClient.java @@ -158,9 +158,7 @@ public class APIBackendListenerClient extends AbstractBackendListenerClient impl } catch (Exception e) { LogUtil.error(e); } - } - try { sendTask(report, testResult); } catch (Exception e) { @@ -185,13 +183,13 @@ public class APIBackendListenerClient extends AbstractBackendListenerClient impl if (StringUtils.equals(NoticeConstants.API, report.getTriggerMode())) { MessageSettingDetail messageSettingDetail = noticeService.searchMessage(); taskList = messageSettingDetail.getJenkinsTask(); - successContext = "jenkins任务通知:" + report.getName() + "执行成功" + "请点击下面链接进入测试报告页面" + url; - failedContext = "jenkins任务通知:" + report.getName() + "执行失败" + "请点击下面链接进入测试报告页面" + url; + successContext = "ApiJenkins任务通知:'" + report.getName() + "'执行成功" + "\n" + "请点击下面链接进入测试报告页面" + "\n" + url; + failedContext = "ApiJenkins任务通知:'" + report.getName() + "'执行失败" + "\n" + "请点击下面链接进入测试报告页面" + "\n" + url; } if (StringUtils.equals(NoticeConstants.SCHEDULE, report.getTriggerMode())) { taskList = noticeService.searchMessageSchedule(testResult.getTestId()); - successContext = "定时任务通知:" + report.getName() + "执行成功" + "请点击下面链接进入测试报告页面" + url; - failedContext = "定时任务通知:" + report.getName() + "执行失败" + "请点击下面链接进入测试报告页面" + url; + successContext = "Api定时任务通知:'" + report.getName() + "'执行成功" + "\n" + "请点击下面链接进入测试报告页面" + "\n" + url; + failedContext = "Api定时任务通知:'" + report.getName() + "'执行失败" + "\n" + "请点击下面链接进入测试报告页面" + "\n" + url; } String finalSuccessContext = successContext; String finalFailedContext = failedContext; diff --git a/backend/src/main/java/io/metersphere/base/domain/MessageTask.java b/backend/src/main/java/io/metersphere/base/domain/MessageTask.java index 4cd0f6414c..286452e5ed 100644 --- a/backend/src/main/java/io/metersphere/base/domain/MessageTask.java +++ b/backend/src/main/java/io/metersphere/base/domain/MessageTask.java @@ -26,5 +26,7 @@ public class MessageTask implements Serializable { private String testId; + private Long createTime; + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/MessageTaskExample.java b/backend/src/main/java/io/metersphere/base/domain/MessageTaskExample.java index b3d4c40f81..fa4f63c284 100644 --- a/backend/src/main/java/io/metersphere/base/domain/MessageTaskExample.java +++ b/backend/src/main/java/io/metersphere/base/domain/MessageTaskExample.java @@ -793,6 +793,66 @@ public class MessageTaskExample { addCriterion("test_id not between", value1, value2, "testId"); return (Criteria) this; } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } } public static class Criteria extends GeneratedCriteria { diff --git a/backend/src/main/java/io/metersphere/base/mapper/MessageTaskMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/MessageTaskMapper.xml index b1bc62303a..c3d7a6ae5e 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/MessageTaskMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/MessageTaskMapper.xml @@ -2,16 +2,17 @@ - - - - - - - - - + + + + + + + + + + @@ -73,7 +74,7 @@ id, `type`, event, user_id, task_type, webhook, identification, is_set, organization_id, - test_id + test_id, create_time @@ -221,6 +228,9 @@ test_id = #{record.testId,jdbcType=VARCHAR}, + + create_time = #{record.createTime,jdbcType=BIGINT}, + @@ -237,7 +247,8 @@ identification = #{record.identification,jdbcType=VARCHAR}, is_set = #{record.isSet,jdbcType=BIT}, organization_id = #{record.organizationId,jdbcType=VARCHAR}, - test_id = #{record.testId,jdbcType=VARCHAR} + test_id = #{record.testId,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT} @@ -272,6 +283,9 @@ test_id = #{testId,jdbcType=VARCHAR}, + + create_time = #{createTime,jdbcType=BIGINT}, + where id = #{id,jdbcType=VARCHAR} @@ -285,7 +299,8 @@ identification = #{identification,jdbcType=VARCHAR}, is_set = #{isSet,jdbcType=BIT}, organization_id = #{organizationId,jdbcType=VARCHAR}, - test_id = #{testId,jdbcType=VARCHAR} + test_id = #{testId,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT} where id = #{id,jdbcType=VARCHAR} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtMessageMapper.java b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtMessageMapper.java new file mode 100644 index 0000000000..f3714f646f --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtMessageMapper.java @@ -0,0 +1,12 @@ +package io.metersphere.base.mapper.ext; + +import io.metersphere.base.domain.MessageTask; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +public interface ExtMessageMapper { + List searchMessageByTestId(@Param("testId") String testId); + + List searchMessageByOrganizationId(@Param("organizationId") String organizationId); +} diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtMessageMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtMessageMapper.xml new file mode 100644 index 0000000000..f53c48c594 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtMessageMapper.xml @@ -0,0 +1,23 @@ + + + + + + + \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/config/ShiroConfig.java b/backend/src/main/java/io/metersphere/config/ShiroConfig.java index b64a53dc34..88abf6d940 100644 --- a/backend/src/main/java/io/metersphere/config/ShiroConfig.java +++ b/backend/src/main/java/io/metersphere/config/ShiroConfig.java @@ -43,7 +43,7 @@ public class ShiroConfig implements EnvironmentAware { shiroFilterFactoryBean.getFilters().put("apikey", new ApiKeyFilter()); Map filterChainDefinitionMap = shiroFilterFactoryBean.getFilterChainDefinitionMap(); ShiroUtils.loadBaseFilterChain(filterChainDefinitionMap); - filterChainDefinitionMap.put("/**", "apikey"); + filterChainDefinitionMap.put("/**", "apikey, authc"); return shiroFilterFactoryBean; } diff --git a/backend/src/main/java/io/metersphere/notice/domain/MessageDetail.java b/backend/src/main/java/io/metersphere/notice/domain/MessageDetail.java index e3ed51a172..9f4c94ca5f 100644 --- a/backend/src/main/java/io/metersphere/notice/domain/MessageDetail.java +++ b/backend/src/main/java/io/metersphere/notice/domain/MessageDetail.java @@ -16,4 +16,5 @@ public class MessageDetail { private String organizationId; private Boolean isSet; private String testId; + private Long createTime; } diff --git a/backend/src/main/java/io/metersphere/notice/service/MailService.java b/backend/src/main/java/io/metersphere/notice/service/MailService.java index 86416020a2..d750768e89 100644 --- a/backend/src/main/java/io/metersphere/notice/service/MailService.java +++ b/backend/src/main/java/io/metersphere/notice/service/MailService.java @@ -52,7 +52,6 @@ public class MailService { List userIds = new ArrayList<>(); BaseSystemConfigDTO baseSystemConfigDTO = systemParameterService.getBaseInfo(); Map context = new HashMap<>(); - context.put("title", "Performance" + Translator.get("timing_task_result_notification")); context.put("testName", loadTestReport.getName()); context.put("id", loadTestReport.getId()); context.put("type", "performance"); @@ -103,7 +102,7 @@ public class MailService { helper.setSubject("MeterSphere平台" + Translator.get("task_notification")); } if (StringUtils.equals(type, NoticeConstants.SCHEDULE)) { - helper.setSubject("MeterSphere平台" + Translator.get("timing_task_notification")); + helper.setSubject("MeterSphere平台" + Translator.get("task_notification_")); } String[] users; List emails = new ArrayList<>(); diff --git a/backend/src/main/java/io/metersphere/notice/service/NoticeService.java b/backend/src/main/java/io/metersphere/notice/service/NoticeService.java index 24ee9ed8fc..43e37fda9c 100644 --- a/backend/src/main/java/io/metersphere/notice/service/NoticeService.java +++ b/backend/src/main/java/io/metersphere/notice/service/NoticeService.java @@ -3,6 +3,7 @@ package io.metersphere.notice.service; import io.metersphere.base.domain.MessageTask; import io.metersphere.base.domain.MessageTaskExample; import io.metersphere.base.mapper.MessageTaskMapper; +import io.metersphere.base.mapper.ext.ExtMessageMapper; import io.metersphere.commons.constants.NoticeConstants; import io.metersphere.commons.user.SessionUser; import io.metersphere.commons.utils.SessionUtils; @@ -21,10 +22,14 @@ import java.util.stream.Collectors; public class NoticeService { @Resource private MessageTaskMapper messageTaskMapper; + @Resource + private ExtMessageMapper extMessageMapper; + public void saveMessageTask(MessageRequest messageRequest) { SessionUser user = SessionUtils.getUser(); String orgId = user.getLastOrganizationId(); + long time = System.currentTimeMillis(); messageRequest.getMessageDetail().forEach(list -> { MessageTaskExample example = new MessageTaskExample(); example.createCriteria().andIdentificationEqualTo(list.getIdentification()); @@ -44,6 +49,7 @@ public class NoticeService { message.setIsSet(list.getIsSet()); message.setOrganizationId(orgId); message.setTestId(list.getTestId()); + message.setCreateTime(time); messageTaskMapper.insert(message); }); } else { @@ -60,6 +66,7 @@ public class NoticeService { message.setIsSet(list.getIsSet()); message.setOrganizationId(orgId); message.setTestId(list.getTestId()); + message.setCreateTime(time); messageTaskMapper.insert(message); }); } @@ -68,9 +75,7 @@ public class NoticeService { } public List searchMessageSchedule(String testId) { - MessageTaskExample example = new MessageTaskExample(); - example.createCriteria().andTestIdEqualTo(testId); - List messageTaskLists = messageTaskMapper.selectByExample(example); + List messageTaskLists = extMessageMapper.searchMessageByTestId(testId); List scheduleMessageTask = new ArrayList<>(); Map> MessageTaskMap = messageTaskLists.stream().collect(Collectors.groupingBy(e -> e.getIdentification())); MessageTaskMap.forEach((k, v) -> { @@ -84,22 +89,22 @@ public class NoticeService { messageDetail.setIdentification(m.getIdentification()); messageDetail.setType(m.getType()); messageDetail.setIsSet(m.getIsSet()); + messageDetail.setCreateTime(m.getCreateTime()); } messageDetail.setUserIds(new ArrayList(userIds)); scheduleMessageTask.add(messageDetail); }); + scheduleMessageTask.sort(Comparator.comparing(MessageDetail::getCreateTime).reversed()); return scheduleMessageTask; } public MessageSettingDetail searchMessage() { SessionUser user = SessionUtils.getUser(); String orgId = user.getLastOrganizationId(); - MessageTaskExample messageTaskExample = new MessageTaskExample(); - messageTaskExample.createCriteria().andOrganizationIdEqualTo(orgId); List messageTaskLists = new ArrayList<>(); MessageSettingDetail messageSettingDetail = new MessageSettingDetail(); List MessageDetailList = new ArrayList<>(); - messageTaskLists = messageTaskMapper.selectByExample(messageTaskExample); + messageTaskLists = extMessageMapper.searchMessageByOrganizationId(orgId); Map> MessageTaskMap = messageTaskLists.stream().collect(Collectors.groupingBy(e -> fetchGroupKey(e))); MessageTaskMap.forEach((k, v) -> { Set userIds = new HashSet(); @@ -112,14 +117,19 @@ public class NoticeService { messageDetail.setIdentification(m.getIdentification()); messageDetail.setType(m.getType()); messageDetail.setIsSet(m.getIsSet()); + messageDetail.setCreateTime(m.getCreateTime()); } messageDetail.setUserIds(new ArrayList(userIds)); MessageDetailList.add(messageDetail); }); List jenkinsTask = MessageDetailList.stream().filter(a -> a.getTaskType().equals(NoticeConstants.JENKINS_TASK)).collect(Collectors.toList()); + jenkinsTask.sort(Comparator.comparing(MessageDetail::getCreateTime).reversed()); List testCasePlanTask = MessageDetailList.stream().filter(a -> a.getTaskType().equals(NoticeConstants.TEST_PLAN_TASK)).collect(Collectors.toList()); + testCasePlanTask.sort(Comparator.comparing(MessageDetail::getCreateTime).reversed()); List reviewTask = MessageDetailList.stream().filter(a -> a.getTaskType().equals(NoticeConstants.REVIEW_TASK)).collect(Collectors.toList()); + reviewTask.sort(Comparator.comparing(MessageDetail::getCreateTime).reversed()); List defectTask = MessageDetailList.stream().filter(a -> a.getTaskType().equals(NoticeConstants.DEFECT_TASK)).collect(Collectors.toList()); + defectTask.sort(Comparator.comparing(MessageDetail::getCreateTime).reversed()); messageSettingDetail.setJenkinsTask(jenkinsTask); messageSettingDetail.setTestCasePlanTask(testCasePlanTask); messageSettingDetail.setReviewTask(reviewTask); diff --git a/backend/src/main/java/io/metersphere/performance/engine/docker/DockerTestEngine.java b/backend/src/main/java/io/metersphere/performance/engine/docker/DockerTestEngine.java index ade042112a..9a642bacc8 100644 --- a/backend/src/main/java/io/metersphere/performance/engine/docker/DockerTestEngine.java +++ b/backend/src/main/java/io/metersphere/performance/engine/docker/DockerTestEngine.java @@ -32,7 +32,6 @@ public class DockerTestEngine extends AbstractEngine { super.init(loadTest); this.restTemplate = (RestTemplate) CommonBeanFactory.getBean("restTemplate"); this.restTemplateWithTimeOut = (RestTemplate) CommonBeanFactory.getBean("restTemplateWithTimeOut"); - // todo 初始化操作 } @Override @@ -60,7 +59,6 @@ public class DockerTestEngine extends AbstractEngine { } private void runTest(TestResource resource, long realThreadNum, int resourceIndex) { - // todo 运行测试 EngineContext context = null; try { context = EngineFactory.createContext(loadTest, resource.getId(), realThreadNum, this.getStartTime(), this.getReportId(), resourceIndex); @@ -99,7 +97,6 @@ public class DockerTestEngine extends AbstractEngine { @Override public void stop() { - // TODO 停止运行测试 String testId = loadTest.getId(); this.resourceList.forEach(r -> { NodeDTO node = JSON.parseObject(r.getConfiguration(), NodeDTO.class); diff --git a/backend/src/main/java/io/metersphere/performance/notice/PerformanceNoticeTask.java b/backend/src/main/java/io/metersphere/performance/notice/PerformanceNoticeTask.java index b4b4d85e76..3eeb70d0f9 100644 --- a/backend/src/main/java/io/metersphere/performance/notice/PerformanceNoticeTask.java +++ b/backend/src/main/java/io/metersphere/performance/notice/PerformanceNoticeTask.java @@ -73,11 +73,11 @@ public class PerformanceNoticeTask { if (StringUtils.equals(NoticeConstants.API, loadTestReport.getTriggerMode())) { MessageSettingDetail messageSettingDetail = noticeService.searchMessage(); taskList = messageSettingDetail.getJenkinsTask(); - successContext = "jenkins性能测试任务通知" + loadTestReport.getName() + "执行成功" + "请点击下面链接进入测试报告页面" + url; + successContext = "LoadJenkins任务通知:" + loadTestReport.getName() + "执行成功" + "\n" + "请点击下面链接进入测试报告页面" + "\n" + url; } if (StringUtils.equals(NoticeConstants.SCHEDULE, loadTestReport.getTriggerMode())) { - taskList = noticeService.searchMessageSchedule(loadTestReport.getId()); - successContext = "定时任务性能测试任务通知" + loadTestReport.getName() + "执行成功" + "请点击下面链接进入测试报告页面" + url; + taskList = noticeService.searchMessageSchedule(loadTestReport.getTestId()); + successContext = "Load定时任务通知:" + loadTestReport.getName() + "执行成功" + "\n" + "请点击下面链接进入测试报告页面" + "\n" + url; } String finalSuccessContext = successContext; taskList.forEach(r -> { @@ -112,11 +112,11 @@ public class PerformanceNoticeTask { if (StringUtils.equals(NoticeConstants.API, loadTestReport.getTriggerMode())) { MessageSettingDetail messageSettingDetail = noticeService.searchMessage(); taskList = messageSettingDetail.getJenkinsTask(); - failedContext = "jenkins性能测试任务通知" + loadTestReport.getName() + "执行失败" + "请点击下面链接进入测试报告页面" + url; + failedContext = "LoadJenkins任务通知:" + loadTestReport.getName() + "执行失败" + "\n" + "请点击下面链接进入测试报告页面" + "\n" + url; } if (StringUtils.equals(NoticeConstants.SCHEDULE, loadTestReport.getTriggerMode())) { - taskList = noticeService.searchMessageSchedule(loadTestReport.getId()); - failedContext = "定时任务性能测试任务通知" + loadTestReport.getName() + "执行失败" + "请点击下面链接进入测试报告页面" + url; + taskList = noticeService.searchMessageSchedule(loadTestReport.getTestId()); + failedContext = "Load定时任务通知:" + loadTestReport.getName() + "执行失败" + "\n" + "请点击下面链接进入测试报告页面" + "\n" + url; } String finalFailedContext = failedContext; taskList.forEach(r -> { diff --git a/backend/src/main/java/io/metersphere/performance/service/PerformanceTestService.java b/backend/src/main/java/io/metersphere/performance/service/PerformanceTestService.java index 8e3884dfe6..09c997b495 100644 --- a/backend/src/main/java/io/metersphere/performance/service/PerformanceTestService.java +++ b/backend/src/main/java/io/metersphere/performance/service/PerformanceTestService.java @@ -20,8 +20,6 @@ import io.metersphere.dto.ScheduleDao; import io.metersphere.i18n.Translator; import io.metersphere.job.sechedule.PerformanceTestJob; import io.metersphere.notice.domain.NoticeDetail; -import io.metersphere.notice.service.MailService; -import io.metersphere.notice.service.NoticeService; import io.metersphere.performance.engine.Engine; import io.metersphere.performance.engine.EngineFactory; import io.metersphere.performance.notice.PerformanceNoticeTask; @@ -78,10 +76,6 @@ public class PerformanceTestService { @Resource private TestCaseService testCaseService; @Resource - private NoticeService noticeService; - @Resource - private MailService mailService; - @Resource private PerformanceNoticeTask performanceNoticeTask; public List list(QueryTestPlanRequest request) { @@ -239,6 +233,9 @@ public class PerformanceTestService { if (StringUtils.equals(NoticeConstants.API, loadTestReport.getTriggerMode()) || StringUtils.equals(NoticeConstants.SCHEDULE, loadTestReport.getTriggerMode())) { performanceNoticeTask.registerNoticeTask(loadTestReport); } + /*if (StringUtils.equals(NoticeConstants.API, loadTestReport.getTriggerMode()) || StringUtils.equals(NoticeConstants.SCHEDULE, "SCHEDULE")) { + performanceNoticeTask.registerNoticeTask(loadTestReport); + }*/ return engine.getReportId(); } @@ -281,7 +278,6 @@ public class PerformanceTestService { testReport.setUserId(SessionUtils.getUser().getId()); } // 启动测试 - List noticeList = null; try { engine.start(); // 启动正常修改状态 starting @@ -307,6 +303,9 @@ public class PerformanceTestService { reportResult.setReportValue("Ready"); // 初始化一个 result_status, 这个值用在data-streaming中 loadTestReportResultMapper.insertSelective(reportResult); } catch (MSException e) { + // 启动失败之后清理任务 + engine.stop(); + LogUtil.error(e); loadTest.setStatus(PerformanceTestStatus.Error.name()); loadTest.setDescription(e.getMessage()); diff --git a/backend/src/main/resources/db/migration/V38__modify_message_task_test_id.sql b/backend/src/main/resources/db/migration/V38__modify_message_task_test_id.sql index 02501a3de9..0ad779a39c 100644 --- a/backend/src/main/resources/db/migration/V38__modify_message_task_test_id.sql +++ b/backend/src/main/resources/db/migration/V38__modify_message_task_test_id.sql @@ -1,2 +1,2 @@ -alter table message_task - add test_id varchar(255) null; \ No newline at end of file +ALTER TABLE message_task + ADD test_id varchar(50) NULL; \ No newline at end of file diff --git a/backend/src/main/resources/db/migration/V39__modify_message_task_create_time.sql b/backend/src/main/resources/db/migration/V39__modify_message_task_create_time.sql new file mode 100644 index 0000000000..3235c4246d --- /dev/null +++ b/backend/src/main/resources/db/migration/V39__modify_message_task_create_time.sql @@ -0,0 +1,2 @@ +alter table message_task + add create_time bigint(13) null; \ No newline at end of file diff --git a/backend/src/main/resources/i18n/messages_en_US.properties b/backend/src/main/resources/i18n/messages_en_US.properties index 3f568e58ac..9c54d7b580 100644 --- a/backend/src/main/resources/i18n/messages_en_US.properties +++ b/backend/src/main/resources/i18n/messages_en_US.properties @@ -151,7 +151,6 @@ quota_max_threads_excess_workspace=The maximum number of concurrent threads exce quota_max_threads_excess_organization=The maximum number of concurrent threads exceeds the organization quota quota_duration_excess_workspace=The stress test duration exceeds the work space quota quota_duration_excess_organization=The stress test duration exceeds the organization quota -email_subject=Metersphere timing task result notification import_xmind_count_error=The number of use cases imported into the mind map cannot exceed 500 import_xmind_not_found=Test case not found license_valid_license_error=Authorization authentication failed @@ -168,7 +167,7 @@ upload_content_is_null=Imported content is empty test_plan_notification=Test plan notification task_defect_notification=Task defect notification task_notification=Jenkins Task notification -timing_task_notification=Timing task result notification +task_notification_=Timing task result notification diff --git a/backend/src/main/resources/i18n/messages_zh_CN.properties b/backend/src/main/resources/i18n/messages_zh_CN.properties index dc6f199266..e321dcbcf3 100644 --- a/backend/src/main/resources/i18n/messages_zh_CN.properties +++ b/backend/src/main/resources/i18n/messages_zh_CN.properties @@ -151,7 +151,6 @@ quota_max_threads_excess_workspace=最大并发数超过工作空间限额 quota_max_threads_excess_organization=最大并发数超过组织限额 quota_duration_excess_workspace=压测时长超过工作空间限额 quota_duration_excess_organization=压测时长超过组织限额 -email_subject=MeterSphere定时任务结果通知 import_xmind_count_error=思维导图导入用例数量不能超过 500 条 license_valid_license_error=授权认证失败 import_xmind_not_found=未找到测试用例 @@ -169,4 +168,4 @@ upload_content_is_null=导入内容为空 test_plan_notification=测试计划通知 task_defect_notification=缺陷任务通知 task_notification=jenkins任务通知 -timing_task_notification=定时任务结果通知 \ No newline at end of file +task_notification_=定时任务结果通知 \ No newline at end of file diff --git a/backend/src/main/resources/i18n/messages_zh_TW.properties b/backend/src/main/resources/i18n/messages_zh_TW.properties index fad439a2bf..a1f7c77210 100644 --- a/backend/src/main/resources/i18n/messages_zh_TW.properties +++ b/backend/src/main/resources/i18n/messages_zh_TW.properties @@ -153,7 +153,6 @@ quota_duration_excess_workspace=壓測時長超過工作空間限額 quota_duration_excess_organization=壓測時長超過組織限額 license_valid_license_error=授權驗證失敗 license_valid_license_code=授權碼已經存在 -email_subject=MeterSphere定時任務結果通知 import_xmind_count_error=思維導圖導入用例數量不能超過 500 條 import_xmind_not_found=未找到测试用例 @@ -170,5 +169,5 @@ upload_content_is_null=導入內容為空 test_plan_notification=測試計畫通知 task_defect_notification=缺陷任務通知 task_notification=jenkins任務通知 -timing_task_notification=定時任務通知 +task_notification_=定時任務通知 diff --git a/backend/src/main/resources/mail/ApiSuccessfulNotification.html b/backend/src/main/resources/mail/ApiSuccessfulNotification.html index c951c6b7ab..6512d5089f 100644 --- a/backend/src/main/resources/mail/ApiSuccessfulNotification.html +++ b/backend/src/main/resources/mail/ApiSuccessfulNotification.html @@ -4,10 +4,7 @@ MeterSphere - -
-

${title}

-
+

尊敬的用户:

您好: diff --git a/frontend/package.json b/frontend/package.json index 1b15b96a2d..6a709fd88a 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -36,7 +36,8 @@ "yan-progress": "^1.0.3", "nprogress": "^0.2.0", "el-table-infinite-scroll": "^1.0.10", - "vue-pdf": "^4.2.0" + "vue-pdf": "^4.2.0", + "diffable-html": "^4.0.0" }, "devDependencies": { "@vue/cli-plugin-babel": "^4.1.0", @@ -63,7 +64,8 @@ "no-console": "off", "no-unused-vars": "off", "no-unused-expressions": "off", - "no-unused-labels": "off" + "no-unused-labels": "off", + "no-useless-escape": "off" }, "parserOptions": { "parser": "babel-eslint" diff --git a/frontend/src/business/components/common/components/MsCodeEdit.vue b/frontend/src/business/components/common/components/MsCodeEdit.vue index 02d6c870fe..afbe57255c 100644 --- a/frontend/src/business/components/common/components/MsCodeEdit.vue +++ b/frontend/src/business/components/common/components/MsCodeEdit.vue @@ -3,6 +3,9 @@