|
|
@ -1,5 +1,6 @@
|
|
|
|
package com.xxl.job.admin.controller;
|
|
|
|
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.XxlJobGroup;
|
|
|
|
import com.xxl.job.admin.core.model.XxlJobRegistry;
|
|
|
|
import com.xxl.job.admin.core.model.XxlJobRegistry;
|
|
|
|
import com.xxl.job.admin.core.util.I18nUtil;
|
|
|
|
import com.xxl.job.admin.core.util.I18nUtil;
|
|
|
@ -35,12 +36,14 @@ public class JobGroupController {
|
|
|
|
private XxlJobRegistryDao xxlJobRegistryDao;
|
|
|
|
private XxlJobRegistryDao xxlJobRegistryDao;
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping
|
|
|
|
@RequestMapping
|
|
|
|
|
|
|
|
@PermissionLimit(adminuser = true)
|
|
|
|
public String index(Model model) {
|
|
|
|
public String index(Model model) {
|
|
|
|
return "jobgroup/jobgroup.index";
|
|
|
|
return "jobgroup/jobgroup.index";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping("/pageList")
|
|
|
|
@RequestMapping("/pageList")
|
|
|
|
@ResponseBody
|
|
|
|
@ResponseBody
|
|
|
|
|
|
|
|
@PermissionLimit(adminuser = true)
|
|
|
|
public Map<String, Object> pageList(HttpServletRequest request,
|
|
|
|
public Map<String, Object> pageList(HttpServletRequest request,
|
|
|
|
@RequestParam(required = false, defaultValue = "0") int start,
|
|
|
|
@RequestParam(required = false, defaultValue = "0") int start,
|
|
|
|
@RequestParam(required = false, defaultValue = "10") int length,
|
|
|
|
@RequestParam(required = false, defaultValue = "10") int length,
|
|
|
@ -60,6 +63,7 @@ public class JobGroupController {
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping("/save")
|
|
|
|
@RequestMapping("/save")
|
|
|
|
@ResponseBody
|
|
|
|
@ResponseBody
|
|
|
|
|
|
|
|
@PermissionLimit(adminuser = true)
|
|
|
|
public ReturnT<String> save(XxlJobGroup xxlJobGroup) {
|
|
|
|
public ReturnT<String> save(XxlJobGroup xxlJobGroup) {
|
|
|
|
|
|
|
|
|
|
|
|
// valid
|
|
|
|
// valid
|
|
|
@ -103,6 +107,7 @@ public class JobGroupController {
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping("/update")
|
|
|
|
@RequestMapping("/update")
|
|
|
|
@ResponseBody
|
|
|
|
@ResponseBody
|
|
|
|
|
|
|
|
@PermissionLimit(adminuser = true)
|
|
|
|
public ReturnT<String> update(XxlJobGroup xxlJobGroup) {
|
|
|
|
public ReturnT<String> update(XxlJobGroup xxlJobGroup) {
|
|
|
|
// valid
|
|
|
|
// valid
|
|
|
|
if (xxlJobGroup.getAppname() == null || xxlJobGroup.getAppname().trim().length() == 0) {
|
|
|
|
if (xxlJobGroup.getAppname() == null || xxlJobGroup.getAppname().trim().length() == 0) {
|
|
|
@ -171,6 +176,7 @@ public class JobGroupController {
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping("/remove")
|
|
|
|
@RequestMapping("/remove")
|
|
|
|
@ResponseBody
|
|
|
|
@ResponseBody
|
|
|
|
|
|
|
|
@PermissionLimit(adminuser = true)
|
|
|
|
public ReturnT<String> remove(int id) {
|
|
|
|
public ReturnT<String> remove(int id) {
|
|
|
|
|
|
|
|
|
|
|
|
// valid
|
|
|
|
// valid
|
|
|
@ -190,6 +196,7 @@ public class JobGroupController {
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping("/loadById")
|
|
|
|
@RequestMapping("/loadById")
|
|
|
|
@ResponseBody
|
|
|
|
@ResponseBody
|
|
|
|
|
|
|
|
@PermissionLimit(adminuser = true)
|
|
|
|
public ReturnT<XxlJobGroup> loadById(int id) {
|
|
|
|
public ReturnT<XxlJobGroup> loadById(int id) {
|
|
|
|
XxlJobGroup jobGroup = xxlJobGroupDao.load(id);
|
|
|
|
XxlJobGroup jobGroup = xxlJobGroupDao.load(id);
|
|
|
|
return jobGroup != null ? new ReturnT<XxlJobGroup>(jobGroup) : new ReturnT<XxlJobGroup>(ReturnT.FAIL_CODE, null);
|
|
|
|
return jobGroup != null ? new ReturnT<XxlJobGroup>(jobGroup) : new ReturnT<XxlJobGroup>(ReturnT.FAIL_CODE, null);
|
|
|
|