update document

master
xuxueli 5 years ago
parent 9682df4719
commit ea1314fca8
  1. 3
      doc/XXL-JOB官方文档.md
  2. 33
      xxl-job-admin/src/main/java/com/xxl/job/admin/controller/JobInfoController.java
  3. 2
      xxl-job-admin/src/main/resources/static/js/jobinfo.index.1.js

@ -1547,7 +1547,8 @@ Tips: 历史版本(V1.3.x)目前已经Release至稳定版本, 进入维护阶段
- 9、任务触发组件加载顺序调整,避免小概率情况下组件随机加载顺序导致的I18N的NPE问题。
- 10、项目依赖升级至较新稳定版本,如spring、spring-boot、mybatis、slf4j、groovy等等;
- 11、JobThread自销毁优化,避免并发触发导致triggerQueue中任务丢失问题;
- 12、Cron在线生成工具;
- 12、Cron在线生成工具:任务新增、编辑框通过组件在线生成Cron表达式[ING,国际化待完善];
- 13、Cron执行时间查询:支持通过界面在线查看后续连续5次执行时间[ING,交互待完善];
- 13、[ING]xxl-rpc服务端线程优化,降低线程内存开销;
- 14、[ING]调度日志优化:支持设置日志保留天数,过期日志天维度记录报表,并清理;调度报表汇总实时数据和报表;
- 15、[ING]父子任务参数传递;流程任务等,透传动态参数;

@ -1,5 +1,6 @@
package com.xxl.job.admin.controller;
import com.xxl.job.admin.core.cron.CronExpression;
import com.xxl.job.admin.core.exception.XxlJobException;
import com.xxl.job.admin.core.model.XxlJobGroup;
import com.xxl.job.admin.core.model.XxlJobInfo;
@ -14,6 +15,7 @@ import com.xxl.job.admin.service.XxlJobService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.enums.ExecutorBlockStrategyEnum;
import com.xxl.job.core.glue.GlueTypeEnum;
import com.xxl.job.core.util.DateUtil;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
@ -22,10 +24,8 @@ import org.springframework.web.bind.annotation.ResponseBody;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.text.ParseException;
import java.util.*;
/**
* index controller
@ -141,5 +141,30 @@ public class JobInfoController {
JobTriggerPoolHelper.trigger(id, TriggerTypeEnum.MANUAL, -1, null, executorParam);
return ReturnT.SUCCESS;
}
@RequestMapping("/nextTriggerTime")
@ResponseBody
public ReturnT<List<String>> nextTriggerTime(String cron) {
List<String> result = new ArrayList<>();
try {
CronExpression cronExpression = new CronExpression(cron);
Date lastTime = new Date();
for (int i = 0; i < 5; i++) {
lastTime = cronExpression.getNextValidTimeAfter(lastTime);
if (lastTime != null) {
result.add(DateUtil.formatDateTime(lastTime));
} else {
break;
}
}
} catch (ParseException e) {
//
}
if (result!=null && result.size()>0) {
return new ReturnT<List<String>>(result);
} else {
return new ReturnT<List<String>>(ReturnT.FAIL_CODE, I18nUtil.getString("jobinfo_field_cron_unvalid"));
}
}
}

@ -136,8 +136,8 @@ $(function() {
' <li><a href="'+ logHref +'">'+ I18n.jobinfo_opt_log +'</a></li>\n' +
' <li><a href="javascript:void(0);" class="job_registryinfo" >' + I18n.jobinfo_opt_registryinfo + '</a></li>\n' +
' <li class="divider"></li>\n' +
start_stop_div +
codeBtn +
start_stop_div +
' <li><a href="javascript:void(0);" class="update" >'+ I18n.system_opt_edit +'</a></li>\n' +
' <li><a href="javascript:void(0);" class="job_operate" _type="job_del" >'+ I18n.system_opt_del +'</a></li>\n' +
' </ul>\n' +

Loading…
Cancel
Save