Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
aboota
xxl-job
提交
670f71e5
X
xxl-job
项目概览
aboota
/
xxl-job
与 Fork 源项目一致
从无法访问的项目Fork
通知
10
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
xxl-job
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
670f71e5
编写于
12月 28, 2015
作者:
X
xueli.xue
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
调度日志
上级
87ce1536
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
182 addition
and
14 deletion
+182
-14
xxl-job-admin/src/main/java/com/xxl/job/controller/IndexController.java
...src/main/java/com/xxl/job/controller/IndexController.java
+3
-10
xxl-job-admin/src/main/java/com/xxl/job/controller/JobController.java
...n/src/main/java/com/xxl/job/controller/JobController.java
+9
-0
xxl-job-admin/src/main/java/com/xxl/job/controller/JobLogController.java
...rc/main/java/com/xxl/job/controller/JobLogController.java
+31
-0
xxl-job-admin/src/main/java/com/xxl/job/core/model/mapper/XxlJobLogMapper.xml
...in/java/com/xxl/job/core/model/mapper/XxlJobLogMapper.xml
+1
-0
xxl-job-admin/src/main/webapp/WEB-INF/template/common/common.macro.ftl
.../src/main/webapp/WEB-INF/template/common/common.macro.ftl
+2
-1
xxl-job-admin/src/main/webapp/WEB-INF/template/help.ftl
xxl-job-admin/src/main/webapp/WEB-INF/template/help.ftl
+0
-0
xxl-job-admin/src/main/webapp/WEB-INF/template/job/index.ftl
xxl-job-admin/src/main/webapp/WEB-INF/template/job/index.ftl
+3
-3
xxl-job-admin/src/main/webapp/WEB-INF/template/joblog/index.ftl
...b-admin/src/main/webapp/WEB-INF/template/joblog/index.ftl
+89
-0
xxl-job-admin/src/main/webapp/static/js/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
;
import
java.util.List
;
import
java.util.Map
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.Model
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
com.xxl.job.core.util.DynamicSchedulerUtil
;
/**
* index controller
* @author xuxueli 2015-12-19 16:13:16
...
...
@@ -16,16 +11,14 @@ import com.xxl.job.core.util.DynamicSchedulerUtil;
@Controller
public
class
IndexController
{
@RequestMapping
(
""
)
@RequestMapping
(
"
/
"
)
public
String
index
(
Model
model
)
{
List
<
Map
<
String
,
Object
>>
jobList
=
DynamicSchedulerUtil
.
getJobList
();
model
.
addAttribute
(
"jobList"
,
jobList
);
return
"job/index"
;
return
"redirect:job"
;
}
@RequestMapping
(
"/help"
)
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;
import
java.io.UnsupportedEncodingException
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map.Entry
;
import
java.util.Set
;
...
...
@@ -13,6 +14,7 @@ import org.quartz.CronExpression;
import
org.quartz.Job
;
import
org.quartz.SchedulerException
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.Model
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
...
...
@@ -29,6 +31,13 @@ import com.xxl.job.service.job.HttpJobBean;
@RequestMapping
(
"/job"
)
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"
)
@ResponseBody
public
ReturnT
<
String
>
add
(
HttpServletRequest
request
)
{
...
...
xxl-job-admin/src/main/java/com/xxl/job/controller/JobLogController.java
浏览文件 @
670f71e5
package
com.xxl.job.controller
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
javax.annotation.Resource
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.Model
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
com.xxl.job.core.model.ReturnT
;
...
...
@@ -37,4 +42,30 @@ public class JobLogController {
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 @@
<if
test=
"jobName != null and jobName!=''"
>
WHERE t.job_name = #{jobName}
</if>
ORDER BY id DESC
LIMIT #{offset}, #{pagesize}
</select>
...
...
xxl-job-admin/src/main/webapp/WEB-INF/template/common/common.macro.ftl
浏览文件 @
670f71e5
...
...
@@ -64,7 +64,8 @@
<!-- sidebar menu: : style can be found in sidebar.less -->
<ul class="sidebar-menu">
<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>
</ul>
</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
文件已移动
xxl-job-admin/src/main/webapp/WEB-INF/template/job/index.ftl
浏览文件 @
670f71e5
...
...
@@ -19,10 +19,10 @@
<div
class=
"content-wrapper"
>
<!-- Content Header (Page header) -->
<section
class=
"content-header"
>
<h1>
调度
中心
<small>
调度管理
</small></h1>
<h1>
调度
管理
<small>
调度中心
</small></h1>
<ol
class=
"breadcrumb"
>
<li><a><i
class=
"fa fa-dashboard"
></i>
调度
中心
</a></li>
<li
class=
"active"
>
调度
管理
</li>
<li><a><i
class=
"fa fa-dashboard"
></i>
调度
管理
</a></li>
<li
class=
"active"
>
调度
中心
</li>
</ol>
</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
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录