任务列表页交互优化,更换执行器分组时自动刷新任务列表,新建任务时默认定位在当前执行器位置;

master
xuxueli 7 years ago
parent 02818b4d6b
commit e9566fcbbf
  1. 1
      doc/XXL-JOB官方文档.md
  2. 4
      xxl-job-admin/src/main/java/com/xxl/job/admin/controller/JobInfoController.java
  3. 4
      xxl-job-admin/src/main/webapp/WEB-INF/template/jobinfo/jobinfo.index.ftl
  4. 7
      xxl-job-admin/src/main/webapp/static/js/jobinfo.index.1.js

@ -904,6 +904,7 @@ Tips: 历史版本(V1.3.x)目前已经Release至稳定版本, 进入维护阶段
- 5、调度中心,DAO层代码精简优化并且新增测试用例覆盖;
- 6、调度中心API服务改为自研RPC形式,统一底层通讯模型;
- 7、新增调度中心API服务测试Demo,方便在调度中心API扩展和测试;
- 8、任务列表页交互优化,更换执行器分组时自动刷新任务列表,新建任务时默认定位在当前执行器位置;
#### TODO LIST
- 1、任务权限管理:执行器为粒度分配权限,核心操作校验权限;

@ -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<XxlJobGroup> jobGroupList = xxlJobGroupDao.findAll();
model.addAttribute("JobGroupList", jobGroupList);
model.addAttribute("jobGroup", jobGroup);
return "jobinfo/jobinfo.index";
}

@ -37,7 +37,7 @@
<span class="input-group-addon">执行器</span>
<select class="form-control" id="jobGroup" >
<#list JobGroupList as group>
<option value="${group.id}" >${group.title}</option>
<option value="${group.id}" <#if jobGroup==group.id>selected</#if> >${group.title}</option>
</#list>
</select>
</div>
@ -110,7 +110,7 @@
<div class="col-sm-4">
<select class="form-control" name="jobGroup" >
<#list JobGroupList as group>
<option value="${group.id}" >${group.title}</option>
<option value="${group.id}" <#if jobGroup==group.id>selected</#if> >${group.title}</option>
</#list>
</select>
</div>

@ -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;

Loading…
Cancel
Save