Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
X
XXL-JOB
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
靳帅
XXL-JOB
Commits
670f71e5
提交
670f71e5
authored
12月 28, 2015
作者:
xueli.xue
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
调度日志
上级
87ce1536
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
182 行增加
和
14 行删除
+182
-14
IndexController.java
...src/main/java/com/xxl/job/controller/IndexController.java
+3
-10
JobController.java
...n/src/main/java/com/xxl/job/controller/JobController.java
+9
-0
JobLogController.java
...rc/main/java/com/xxl/job/controller/JobLogController.java
+31
-0
XxlJobLogMapper.xml
...in/java/com/xxl/job/core/model/mapper/XxlJobLogMapper.xml
+1
-0
common.macro.ftl
.../src/main/webapp/WEB-INF/template/common/common.macro.ftl
+2
-1
help.ftl
xxl-job-admin/src/main/webapp/WEB-INF/template/help.ftl
+0
-0
index.ftl
xxl-job-admin/src/main/webapp/WEB-INF/template/job/index.ftl
+3
-3
index.ftl
...b-admin/src/main/webapp/WEB-INF/template/joblog/index.ftl
+89
-0
joblog.index.1.js
xxl-job-admin/src/main/webapp/static/js/joblog.index.1.js
+44
-0
没有找到文件。
xxl-job-admin/src/main/java/com/xxl/job/controller/IndexController.java
浏览文件 @
670f71e5
package
com
.
xxl
.
job
.
controller
;
package
com
.
xxl
.
job
.
controller
;
import
java.util.List
;
import
java.util.Map
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.Model
;
import
org.springframework.ui.Model
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
com.xxl.job.core.util.DynamicSchedulerUtil
;
/**
/**
* index controller
* index controller
* @author xuxueli 2015-12-19 16:13:16
* @author xuxueli 2015-12-19 16:13:16
...
@@ -16,16 +11,14 @@ import com.xxl.job.core.util.DynamicSchedulerUtil;
...
@@ -16,16 +11,14 @@ import com.xxl.job.core.util.DynamicSchedulerUtil;
@Controller
@Controller
public
class
IndexController
{
public
class
IndexController
{
@RequestMapping
(
""
)
@RequestMapping
(
"
/
"
)
public
String
index
(
Model
model
)
{
public
String
index
(
Model
model
)
{
List
<
Map
<
String
,
Object
>>
jobList
=
DynamicSchedulerUtil
.
getJobList
();
return
"redirect:job"
;
model
.
addAttribute
(
"jobList"
,
jobList
);
return
"job/index"
;
}
}
@RequestMapping
(
"/help"
)
@RequestMapping
(
"/help"
)
public
String
help
(
Model
model
)
{
public
String
help
(
Model
model
)
{
return
"
job/
help"
;
return
"help"
;
}
}
}
}
xxl-job-admin/src/main/java/com/xxl/job/controller/JobController.java
浏览文件 @
670f71e5
...
@@ -2,6 +2,7 @@ package com.xxl.job.controller;
...
@@ -2,6 +2,7 @@ package com.xxl.job.controller;
import
java.io.UnsupportedEncodingException
;
import
java.io.UnsupportedEncodingException
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Map.Entry
;
import
java.util.Map.Entry
;
import
java.util.Set
;
import
java.util.Set
;
...
@@ -13,6 +14,7 @@ import org.quartz.CronExpression;
...
@@ -13,6 +14,7 @@ import org.quartz.CronExpression;
import
org.quartz.Job
;
import
org.quartz.Job
;
import
org.quartz.SchedulerException
;
import
org.quartz.SchedulerException
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.Model
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.ResponseBody
;
...
@@ -29,6 +31,13 @@ import com.xxl.job.service.job.HttpJobBean;
...
@@ -29,6 +31,13 @@ import com.xxl.job.service.job.HttpJobBean;
@RequestMapping
(
"/job"
)
@RequestMapping
(
"/job"
)
public
class
JobController
{
public
class
JobController
{
@RequestMapping
public
String
index
(
Model
model
)
{
List
<
Map
<
String
,
Object
>>
jobList
=
DynamicSchedulerUtil
.
getJobList
();
model
.
addAttribute
(
"jobList"
,
jobList
);
return
"job/index"
;
}
@RequestMapping
(
"/add"
)
@RequestMapping
(
"/add"
)
@ResponseBody
@ResponseBody
public
ReturnT
<
String
>
add
(
HttpServletRequest
request
)
{
public
ReturnT
<
String
>
add
(
HttpServletRequest
request
)
{
...
...
xxl-job-admin/src/main/java/com/xxl/job/controller/JobLogController.java
浏览文件 @
670f71e5
package
com
.
xxl
.
job
.
controller
;
package
com
.
xxl
.
job
.
controller
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.Model
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
com.xxl.job.core.model.ReturnT
;
import
com.xxl.job.core.model.ReturnT
;
...
@@ -37,4 +42,30 @@ public class JobLogController {
...
@@ -37,4 +42,30 @@ public class JobLogController {
return
ReturnT
.
FAIL
;
return
ReturnT
.
FAIL
;
}
}
@RequestMapping
(
"/"
)
public
String
index
(
Model
model
)
{
return
"joblog/index"
;
}
@RequestMapping
(
"/pageList"
)
@ResponseBody
public
Map
<
String
,
Object
>
pageList
(
@RequestParam
(
required
=
false
)
String
jobName
,
@RequestParam
(
required
=
false
,
defaultValue
=
"0"
)
int
start
,
@RequestParam
(
required
=
false
,
defaultValue
=
"10"
)
int
length
)
{
System
.
out
.
println
(
start
);
System
.
out
.
println
(
length
);
System
.
out
.
println
(
jobName
);
List
<
XxlJobLog
>
list
=
xxlJobLogDao
.
pageList
(
start
,
length
,
jobName
);
int
list_count
=
xxlJobLogDao
.
pageListCount
(
start
,
length
,
jobName
);
Map
<
String
,
Object
>
maps
=
new
HashMap
<
String
,
Object
>();
maps
.
put
(
"draw"
,
list_count
);
// 请求次数
maps
.
put
(
"recordsTotal"
,
list_count
);
// 总记录数
maps
.
put
(
"recordsFiltered"
,
list_count
);
// 过滤后的总记录数
maps
.
put
(
"data"
,
list
);
// 分页列表
return
maps
;
}
}
}
xxl-job-admin/src/main/java/com/xxl/job/core/model/mapper/XxlJobLogMapper.xml
浏览文件 @
670f71e5
...
@@ -81,6 +81,7 @@
...
@@ -81,6 +81,7 @@
<if
test=
"jobName != null and jobName!=''"
>
<if
test=
"jobName != null and jobName!=''"
>
WHERE t.job_name = #{jobName}
WHERE t.job_name = #{jobName}
</if>
</if>
ORDER BY id DESC
LIMIT #{offset}, #{pagesize}
LIMIT #{offset}, #{pagesize}
</select>
</select>
...
...
xxl-job-admin/src/main/webapp/WEB-INF/template/common/common.macro.ftl
浏览文件 @
670f71e5
...
@@ -64,7 +64,8 @@
...
@@ -64,7 +64,8 @@
<!-- sidebar menu: : style can be found in sidebar.less -->
<!-- sidebar menu: : style can be found in sidebar.less -->
<ul class="sidebar-menu">
<ul class="sidebar-menu">
<li class="header">常用模块</li>
<li class="header">常用模块</li>
<li class="nav-click" ><a href="${request.contextPath}//"><i class="fa fa-circle-o text-red"></i> <span>调度中心</span></a></li>
<li class="nav-click" ><a href="${request.contextPath}/job/"><i class="fa fa-circle-o text-red"></i> <span>调度管理</span></a></li>
<li class="nav-click" ><a href="${request.contextPath}/joblog/"><i class="fa fa-circle-o text-yellow"></i><span>调度日志</span></a></li>
<li class="nav-click" ><a href="${request.contextPath}/help"><i class="fa fa-circle-o text-yellow"></i><span>使用教程</span></a></li>
<li class="nav-click" ><a href="${request.contextPath}/help"><i class="fa fa-circle-o text-yellow"></i><span>使用教程</span></a></li>
</ul>
</ul>
</section>
</section>
...
...
xxl-job-admin/src/main/webapp/WEB-INF/template/
job/
help.ftl
→
xxl-job-admin/src/main/webapp/WEB-INF/template/help.ftl
浏览文件 @
670f71e5
File moved
xxl-job-admin/src/main/webapp/WEB-INF/template/job/index.ftl
浏览文件 @
670f71e5
...
@@ -19,10 +19,10 @@
...
@@ -19,10 +19,10 @@
<div
class=
"content-wrapper"
>
<div
class=
"content-wrapper"
>
<!-- Content Header (Page header) -->
<!-- Content Header (Page header) -->
<section
class=
"content-header"
>
<section
class=
"content-header"
>
<h1>
调度
中心
<small>
调度管理
</small></h1>
<h1>
调度
管理
<small>
调度中心
</small></h1>
<ol
class=
"breadcrumb"
>
<ol
class=
"breadcrumb"
>
<li><a><i
class=
"fa fa-dashboard"
></i>
调度
中心
</a></li>
<li><a><i
class=
"fa fa-dashboard"
></i>
调度
管理
</a></li>
<li
class=
"active"
>
调度
管理
</li>
<li
class=
"active"
>
调度
中心
</li>
</ol>
</ol>
</section>
</section>
...
...
xxl-job-admin/src/main/webapp/WEB-INF/template/joblog/index.ftl
0 → 100644
浏览文件 @
670f71e5
<!DOCTYPE html>
<html>
<head>
<title>
调度日志
</title>
<
#
import
"/
common
/
common
.
macro
.
ftl
"
as
netCommon
>
<
@
netCommon
.
commonStyle
/>
<!-- DataTables -->
<link
rel=
"stylesheet"
href=
"${request.contextPath}/static/adminlte/plugins/datatables/dataTables.bootstrap.css"
>
<!-- DataTables CSS -->
<link
rel=
"stylesheet"
type=
"text/css"
href=
"http://cdn.datatables.net/1.10.7/css/jquery.dataTables.css"
>
<!-- jQuery -->
<script
type=
"text/javascript"
charset=
"utf8"
src=
"http://code.jquery.com/jquery-1.10.2.min.js"
></script>
<!-- DataTables -->
<script
type=
"text/javascript"
charset=
"utf8"
src=
"http://cdn.datatables.net/1.10.7/js/jquery.dataTables.js"
></script>
</head>
<body
class=
"hold-transition skin-blue sidebar-mini"
>
<div
class=
"wrapper"
>
<!-- header -->
<
@
netCommon
.
commonHeader
/>
<!-- left -->
<
@
netCommon
.
commonLeft
/>
<!-- Content Wrapper. Contains page content -->
<div
class=
"content-wrapper"
>
<!-- Content Header (Page header) -->
<section
class=
"content-header"
>
<h1>
调度日志
<small>
调度中心
</small></h1>
<ol
class=
"breadcrumb"
>
<li><a><i
class=
"fa fa-dashboard"
></i>
调度日志
</a></li>
<li
class=
"active"
>
调度管理
</li>
</ol>
</section>
<!-- Main content -->
<section
class=
"content"
>
<div
class=
"row"
>
<div
class=
"col-xs-12"
>
<div
class=
"box"
>
<div
class=
"box-header"
>
<h3
class=
"box-title"
>
调度列表
</h3>
</div>
<div
class=
"box-body"
>
<table
id=
"joblog_list"
class=
"table table-bordered table-striped display"
>
<thead>
<tr>
<th>
id
</th>
<th>
jobName
</th>
<th>
jobCron
</th>
<th>
jobClass
</th>
<th>
handleTime
</th>
<th>
handleStatus
</th>
</tr>
</thead>
<tbody></tbody>
<tfoot>
<tr>
<th>
id
</th>
<th>
jobName
</th>
<th>
jobCron
</th>
<th>
jobClass
</th>
<th>
handleTime
</th>
<th>
handleStatus
</th>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
</section>
</div>
<!-- footer -->
<
@
netCommon
.
commonFooter
/>
<!-- control -->
<
@
netCommon
.
commonControl
/>
</div>
<
@
netCommon
.
commonScript
/>
<
@
netCommon
.
comAlert
/>
<!-- DataTables -->
<script
src=
"${request.contextPath}/static/adminlte/plugins/datatables/jquery.dataTables.min.js"
></script>
<script
src=
"${request.contextPath}/static/adminlte/plugins/datatables/dataTables.bootstrap.min.js"
></script>
<script>
var
base_url
=
'${request.contextPath}'
;
</script>
<script
src=
"${request.contextPath}/static/js/joblog.index.1.js"
></script>
</body>
</html>
xxl-job-admin/src/main/webapp/static/js/joblog.index.1.js
0 → 100644
浏览文件 @
670f71e5
$
(
function
()
{
// init date tables
$
(
"#joblog_list"
).
dataTable
({
"serverSide"
:
true
,
"ajax"
:
{
url
:
base_url
+
"/joblog/pageList"
},
"processing"
:
true
,
"deferRender"
:
true
,
"columns"
:
[
{
"data"
:
'id'
,
"bSortable"
:
false
,
"visible"
:
true
},
{
"data"
:
'jobName'
,
"bSortable"
:
false
},
{
"data"
:
'jobCron'
,
"bSortable"
:
false
},
{
"data"
:
'jobClass'
,
"bSortable"
:
false
},
{
"data"
:
'handleTime'
,
"bSortable"
:
false
},
{
"data"
:
'handleStatus'
,
"bSortable"
:
false
}
],
"language"
:
{
"sProcessing"
:
"处理中..."
,
"sLengthMenu"
:
"每页 _MENU_ 条记录"
,
"sZeroRecords"
:
"没有匹配结果"
,
"sInfo"
:
"第 _PAGE_ 页 ( 总共 _PAGES_ 页 )"
,
"sInfoEmpty"
:
"无记录"
,
"sInfoFiltered"
:
"(由 _MAX_ 项结果过滤)"
,
"sInfoPostFix"
:
""
,
"sSearch"
:
"搜索:"
,
"sUrl"
:
""
,
"sEmptyTable"
:
"表中数据为空"
,
"sLoadingRecords"
:
"载入中..."
,
"sInfoThousands"
:
","
,
"oPaginate"
:
{
"sFirst"
:
"首页"
,
"sPrevious"
:
"上页"
,
"sNext"
:
"下页"
,
"sLast"
:
"末页"
},
"oAria"
:
{
"sSortAscending"
:
": 以升序排列此列"
,
"sSortDescending"
:
": 以降序排列此列"
}
}
});
});
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论