From e9566fcbbf47d1f684e8845cc379f0782d86a453 Mon Sep 17 00:00:00 2001 From: xuxueli <931591021@qq.com> Date: Fri, 28 Jul 2017 22:48:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E5=88=97=E8=A1=A8=E9=A1=B5?= =?UTF-8?q?=E4=BA=A4=E4=BA=92=E4=BC=98=E5=8C=96=EF=BC=8C=E6=9B=B4=E6=8D=A2?= =?UTF-8?q?=E6=89=A7=E8=A1=8C=E5=99=A8=E5=88=86=E7=BB=84=E6=97=B6=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=88=B7=E6=96=B0=E4=BB=BB=E5=8A=A1=E5=88=97=E8=A1=A8?= =?UTF-8?q?=EF=BC=8C=E6=96=B0=E5=BB=BA=E4=BB=BB=E5=8A=A1=E6=97=B6=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E5=AE=9A=E4=BD=8D=E5=9C=A8=E5=BD=93=E5=89=8D=E6=89=A7?= =?UTF-8?q?=E8=A1=8C=E5=99=A8=E4=BD=8D=E7=BD=AE=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/XXL-JOB官方文档.md | 1 + .../com/xxl/job/admin/controller/JobInfoController.java | 4 +++- .../main/webapp/WEB-INF/template/jobinfo/jobinfo.index.ftl | 4 ++-- xxl-job-admin/src/main/webapp/static/js/jobinfo.index.1.js | 7 +++++++ 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/doc/XXL-JOB官方文档.md b/doc/XXL-JOB官方文档.md index 85c2ac5e..5495dde9 100644 --- a/doc/XXL-JOB官方文档.md +++ b/doc/XXL-JOB官方文档.md @@ -904,6 +904,7 @@ Tips: 历史版本(V1.3.x)目前已经Release至稳定版本, 进入维护阶段 - 5、调度中心,DAO层代码精简优化并且新增测试用例覆盖; - 6、调度中心API服务改为自研RPC形式,统一底层通讯模型; - 7、新增调度中心API服务测试Demo,方便在调度中心API扩展和测试; +- 8、任务列表页交互优化,更换执行器分组时自动刷新任务列表,新建任务时默认定位在当前执行器位置; #### TODO LIST - 1、任务权限管理:执行器为粒度分配权限,核心操作校验权限; diff --git a/xxl-job-admin/src/main/java/com/xxl/job/admin/controller/JobInfoController.java b/xxl-job-admin/src/main/java/com/xxl/job/admin/controller/JobInfoController.java index ffac4a27..0962d397 100644 --- a/xxl-job-admin/src/main/java/com/xxl/job/admin/controller/JobInfoController.java +++ b/xxl-job-admin/src/main/java/com/xxl/job/admin/controller/JobInfoController.java @@ -33,7 +33,7 @@ public class JobInfoController { private XxlJobService xxlJobService; @RequestMapping - public String index(Model model) { + public String index(Model model, @RequestParam(required = false, defaultValue = "-1") int jobGroup) { // 枚举-字典 model.addAttribute("ExecutorRouteStrategyEnum", ExecutorRouteStrategyEnum.values()); // 路由策略-列表 @@ -44,6 +44,8 @@ public class JobInfoController { // 任务组 List jobGroupList = xxlJobGroupDao.findAll(); model.addAttribute("JobGroupList", jobGroupList); + model.addAttribute("jobGroup", jobGroup); + return "jobinfo/jobinfo.index"; } diff --git a/xxl-job-admin/src/main/webapp/WEB-INF/template/jobinfo/jobinfo.index.ftl b/xxl-job-admin/src/main/webapp/WEB-INF/template/jobinfo/jobinfo.index.ftl index 1389ae4b..cdf48c66 100644 --- a/xxl-job-admin/src/main/webapp/WEB-INF/template/jobinfo/jobinfo.index.ftl +++ b/xxl-job-admin/src/main/webapp/WEB-INF/template/jobinfo/jobinfo.index.ftl @@ -37,7 +37,7 @@ 执行器 @@ -110,7 +110,7 @@
diff --git a/xxl-job-admin/src/main/webapp/static/js/jobinfo.index.1.js b/xxl-job-admin/src/main/webapp/static/js/jobinfo.index.1.js index 72922944..6c72f6eb 100644 --- a/xxl-job-admin/src/main/webapp/static/js/jobinfo.index.1.js +++ b/xxl-job-admin/src/main/webapp/static/js/jobinfo.index.1.js @@ -167,6 +167,13 @@ $(function() { jobTable.fnDraw(); }); + // jobGroup change + $('#jobGroup').on('change', function(){ + //reload + var jobGroup = $('#jobGroup').val(); + window.location.href = base_url + "/jobinfo?jobGroup=" + jobGroup; + }); + // job operate $("#job_list").on('click', '.job_operate',function() { var typeName;