|
|
|
@ -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;
|
|
|
|
@ -34,12 +35,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<String, Object> pageList(HttpServletRequest request,
|
|
|
|
|
@RequestParam(required = false, defaultValue = "0") int start,
|
|
|
|
|
@RequestParam(required = false, defaultValue = "10") int length,
|
|
|
|
@ -59,6 +62,7 @@ public class JobGroupController {
|
|
|
|
|
|
|
|
|
|
@RequestMapping("/save")
|
|
|
|
|
@ResponseBody
|
|
|
|
|
@PermissionLimit(adminuser = true)
|
|
|
|
|
public ReturnT<String> save(XxlJobGroup xxlJobGroup){
|
|
|
|
|
|
|
|
|
|
// valid
|
|
|
|
@ -102,6 +106,7 @@ public class JobGroupController {
|
|
|
|
|
|
|
|
|
|
@RequestMapping("/update")
|
|
|
|
|
@ResponseBody
|
|
|
|
|
@PermissionLimit(adminuser = true)
|
|
|
|
|
public ReturnT<String> update(XxlJobGroup xxlJobGroup){
|
|
|
|
|
// valid
|
|
|
|
|
if (xxlJobGroup.getAppname()==null || xxlJobGroup.getAppname().trim().length()==0) {
|
|
|
|
@ -170,6 +175,7 @@ public class JobGroupController {
|
|
|
|
|
|
|
|
|
|
@RequestMapping("/remove")
|
|
|
|
|
@ResponseBody
|
|
|
|
|
@PermissionLimit(adminuser = true)
|
|
|
|
|
public ReturnT<String> remove(int id){
|
|
|
|
|
|
|
|
|
|
// valid
|
|
|
|
@ -189,6 +195,7 @@ public class JobGroupController {
|
|
|
|
|
|
|
|
|
|
@RequestMapping("/loadById")
|
|
|
|
|
@ResponseBody
|
|
|
|
|
@PermissionLimit(adminuser = true)
|
|
|
|
|
public ReturnT<XxlJobGroup> loadById(int id){
|
|
|
|
|
XxlJobGroup jobGroup = xxlJobGroupDao.load(id);
|
|
|
|
|
return jobGroup!=null?new ReturnT<XxlJobGroup>(jobGroup):new ReturnT<XxlJobGroup>(ReturnT.FAIL_CODE, null);
|
|
|
|
|