diff --git a/pom.xml b/pom.xml index 4bb4e881..06bb0a7d 100644 --- a/pom.xml +++ b/pom.xml @@ -33,7 +33,7 @@ 5.8.15 3.20.0 2.2.3 - 2.3.1 + 2.4.0 1.34.0 1.18.24 7.2 diff --git a/ruoyi-visual/ruoyi-xxl-job-admin/src/main/java/com/xxl/job/admin/controller/JobGroupController.java b/ruoyi-visual/ruoyi-xxl-job-admin/src/main/java/com/xxl/job/admin/controller/JobGroupController.java index 82ec2dee..5cbf8728 100644 --- a/ruoyi-visual/ruoyi-xxl-job-admin/src/main/java/com/xxl/job/admin/controller/JobGroupController.java +++ b/ruoyi-visual/ruoyi-xxl-job-admin/src/main/java/com/xxl/job/admin/controller/JobGroupController.java @@ -1,5 +1,6 @@ package com.xxl.job.admin.controller; +import com.xxl.job.admin.controller.annotation.PermissionLimit; import com.xxl.job.admin.core.model.XxlJobGroup; import com.xxl.job.admin.core.model.XxlJobRegistry; import com.xxl.job.admin.core.util.I18nUtil; @@ -35,12 +36,14 @@ public class JobGroupController { private XxlJobRegistryDao xxlJobRegistryDao; @RequestMapping + @PermissionLimit(adminuser = true) public String index(Model model) { return "jobgroup/jobgroup.index"; } @RequestMapping("/pageList") @ResponseBody + @PermissionLimit(adminuser = true) public Map pageList(HttpServletRequest request, @RequestParam(required = false, defaultValue = "0") int start, @RequestParam(required = false, defaultValue = "10") int length, @@ -60,6 +63,7 @@ public class JobGroupController { @RequestMapping("/save") @ResponseBody + @PermissionLimit(adminuser = true) public ReturnT save(XxlJobGroup xxlJobGroup) { // valid @@ -103,6 +107,7 @@ public class JobGroupController { @RequestMapping("/update") @ResponseBody + @PermissionLimit(adminuser = true) public ReturnT update(XxlJobGroup xxlJobGroup) { // valid if (xxlJobGroup.getAppname() == null || xxlJobGroup.getAppname().trim().length() == 0) { @@ -171,6 +176,7 @@ public class JobGroupController { @RequestMapping("/remove") @ResponseBody + @PermissionLimit(adminuser = true) public ReturnT remove(int id) { // valid @@ -190,6 +196,7 @@ public class JobGroupController { @RequestMapping("/loadById") @ResponseBody + @PermissionLimit(adminuser = true) public ReturnT loadById(int id) { XxlJobGroup jobGroup = xxlJobGroupDao.load(id); return jobGroup != null ? new ReturnT(jobGroup) : new ReturnT(ReturnT.FAIL_CODE, null); diff --git a/ruoyi-visual/ruoyi-xxl-job-admin/src/main/java/com/xxl/job/admin/controller/JobLogController.java b/ruoyi-visual/ruoyi-xxl-job-admin/src/main/java/com/xxl/job/admin/controller/JobLogController.java index 16b62399..d105a989 100644 --- a/ruoyi-visual/ruoyi-xxl-job-admin/src/main/java/com/xxl/job/admin/controller/JobLogController.java +++ b/ruoyi-visual/ruoyi-xxl-job-admin/src/main/java/com/xxl/job/admin/controller/JobLogController.java @@ -130,22 +130,26 @@ public class JobLogController { model.addAttribute("triggerCode", jobLog.getTriggerCode()); model.addAttribute("handleCode", jobLog.getHandleCode()); - model.addAttribute("executorAddress", jobLog.getExecutorAddress()); - model.addAttribute("triggerTime", jobLog.getTriggerTime().getTime()); model.addAttribute("logId", jobLog.getId()); return "joblog/joblog.detail"; } @RequestMapping("/logDetailCat") @ResponseBody - public ReturnT logDetailCat(String executorAddress, long triggerTime, long logId, int fromLineNum) { + public ReturnT logDetailCat(long logId, int fromLineNum) { try { - ExecutorBiz executorBiz = XxlJobScheduler.getExecutorBiz(executorAddress); - ReturnT logResult = executorBiz.log(new LogParam(triggerTime, logId, fromLineNum)); + // valid + XxlJobLog jobLog = xxlJobLogDao.load(logId); // todo, need to improve performance + if (jobLog == null) { + return new ReturnT(ReturnT.FAIL_CODE, I18nUtil.getString("joblog_logid_unvalid")); + } + + // log cat + ExecutorBiz executorBiz = XxlJobScheduler.getExecutorBiz(jobLog.getExecutorAddress()); + ReturnT logResult = executorBiz.log(new LogParam(jobLog.getTriggerTime().getTime(), logId, fromLineNum)); // is end if (logResult.getContent() != null && logResult.getContent().getFromLineNum() > logResult.getContent().getToLineNum()) { - XxlJobLog jobLog = xxlJobLogDao.load(logId); if (jobLog.getHandleCode() > 0) { logResult.getContent().setEnd(true); } diff --git a/ruoyi-visual/ruoyi-xxl-job-admin/src/main/resources/i18n/message_en.properties b/ruoyi-visual/ruoyi-xxl-job-admin/src/main/resources/i18n/message_en.properties index 8b3c8014..881bb8d6 100644 --- a/ruoyi-visual/ruoyi-xxl-job-admin/src/main/resources/i18n/message_en.properties +++ b/ruoyi-visual/ruoyi-xxl-job-admin/src/main/resources/i18n/message_en.properties @@ -1,6 +1,6 @@ admin_name=Scheduling Center admin_name_full=Distributed Task Scheduling Platform XXL-JOB -admin_version=2.3.1 +admin_version=2.4.0 admin_i18n=en ## system diff --git a/ruoyi-visual/ruoyi-xxl-job-admin/src/main/resources/i18n/message_zh_CN.properties b/ruoyi-visual/ruoyi-xxl-job-admin/src/main/resources/i18n/message_zh_CN.properties index b3860e49..5be17ffe 100644 --- a/ruoyi-visual/ruoyi-xxl-job-admin/src/main/resources/i18n/message_zh_CN.properties +++ b/ruoyi-visual/ruoyi-xxl-job-admin/src/main/resources/i18n/message_zh_CN.properties @@ -1,6 +1,6 @@ admin_name=任务调度中心 admin_name_full=分布式任务调度平台XXL-JOB -admin_version=2.3.1 +admin_version=2.4.0 admin_i18n= ## system diff --git a/ruoyi-visual/ruoyi-xxl-job-admin/src/main/resources/i18n/message_zh_TC.properties b/ruoyi-visual/ruoyi-xxl-job-admin/src/main/resources/i18n/message_zh_TC.properties index ca069b34..3250f1a9 100644 --- a/ruoyi-visual/ruoyi-xxl-job-admin/src/main/resources/i18n/message_zh_TC.properties +++ b/ruoyi-visual/ruoyi-xxl-job-admin/src/main/resources/i18n/message_zh_TC.properties @@ -1,6 +1,6 @@ admin_name=任務調度中心 admin_name_full=分布式任務調度平臺XXL-JOB -admin_version=2.3.1 +admin_version=2.4.0 admin_i18n= ## system diff --git a/ruoyi-visual/ruoyi-xxl-job-admin/src/main/resources/static/js/joblog.detail.1.js b/ruoyi-visual/ruoyi-xxl-job-admin/src/main/resources/static/js/joblog.detail.1.js index ddefd466..0638eee2 100644 --- a/ruoyi-visual/ruoyi-xxl-job-admin/src/main/resources/static/js/joblog.detail.1.js +++ b/ruoyi-visual/ruoyi-xxl-job-admin/src/main/resources/static/js/joblog.detail.1.js @@ -25,8 +25,6 @@ $(function() { async: false, // sync, make log ordered url : base_url + '/joblog/logDetailCat', data : { - "executorAddress":executorAddress, - "triggerTime":triggerTime, "logId":logId, "fromLineNum":fromLineNum }, diff --git a/ruoyi-visual/ruoyi-xxl-job-admin/src/main/resources/templates/joblog/joblog.detail.ftl b/ruoyi-visual/ruoyi-xxl-job-admin/src/main/resources/templates/joblog/joblog.detail.ftl index 3881cfa6..0ea69c76 100644 --- a/ruoyi-visual/ruoyi-xxl-job-admin/src/main/resources/templates/joblog/joblog.detail.ftl +++ b/ruoyi-visual/ruoyi-xxl-job-admin/src/main/resources/templates/joblog/joblog.detail.ftl @@ -62,11 +62,9 @@ // 参数 var triggerCode = '${triggerCode}'; var handleCode = '${handleCode}'; - var executorAddress = '${executorAddress!}'; - var triggerTime = '${triggerTime?c}'; var logId = '${logId}'; - \ No newline at end of file +