| | |
| | | package com.xxl.job.admin.controller; |
| | | |
| | | import com.xxl.job.admin.core.complete.XxlJobCompleter; |
| | | import com.xxl.job.admin.core.exception.XxlJobException; |
| | | import com.xxl.job.admin.core.complete.XxlJobCompleter; |
| | | import com.xxl.job.admin.core.model.XxlJobGroup; |
| | | import com.xxl.job.admin.core.model.XxlJobInfo; |
| | | import com.xxl.job.admin.core.model.XxlJobLog; |
| | |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import jakarta.annotation.Resource; |
| | | import jakarta.servlet.http.HttpServletRequest; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | |
| | | throw new XxlJobException(I18nUtil.getString("jobgroup_empty")); |
| | | } |
| | | |
| | | model.addAttribute("JobGroupList" , jobGroupList); |
| | | model.addAttribute("JobGroupList", jobGroupList); |
| | | |
| | | // 任务 |
| | | if (jobId > 0) { |
| | |
| | | throw new RuntimeException(I18nUtil.getString("jobinfo_field_id") + I18nUtil.getString("system_unvalid")); |
| | | } |
| | | |
| | | model.addAttribute("jobInfo" , jobInfo); |
| | | model.addAttribute("jobInfo", jobInfo); |
| | | |
| | | // valid permission |
| | | JobInfoController.validPermission(request, jobInfo.getJobGroup()); |
| | |
| | | |
| | | // package result |
| | | Map<String, Object> maps = new HashMap<String, Object>(); |
| | | maps.put("recordsTotal" , list_count); // 总记录数 |
| | | maps.put("recordsFiltered" , list_count); // 过滤后的总记录数 |
| | | maps.put("data" , list); // 分页列表 |
| | | maps.put("recordsTotal", list_count); // 总记录数 |
| | | maps.put("recordsFiltered", list_count); // 过滤后的总记录数 |
| | | maps.put("data", list); // 分页列表 |
| | | return maps; |
| | | } |
| | | |
| | |
| | | throw new RuntimeException(I18nUtil.getString("joblog_logid_unvalid")); |
| | | } |
| | | |
| | | 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()); |
| | | 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"; |
| | | } |
| | | |