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

v1.8.2
xuxueli 7 years ago
parent 02818b4d6b
commit e9566fcbbf

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