Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
X
XXL-JOB
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
靳帅
XXL-JOB
Commits
0169d537
提交
0169d537
authored
1月 22, 2018
作者:
xuxueli
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
调度报表新增"运行中"中状态项,数据加载SQL优化
上级
8f80395a
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
54 行增加
和
51 行删除
+54
-51
XXL-JOB官方文档.md
doc/XXL-JOB官方文档.md
+3
-1
I18nUtil.java
...n/src/main/java/com/xxl/job/admin/core/util/I18nUtil.java
+1
-1
XxlJobLogDao.java
...min/src/main/java/com/xxl/job/admin/dao/XxlJobLogDao.java
+1
-2
XxlJobServiceImpl.java
...ava/com/xxl/job/admin/service/impl/XxlJobServiceImpl.java
+17
-19
message.properties
xxl-job-admin/src/main/resources/i18n/message.properties
+0
-4
message_en.properties
xxl-job-admin/src/main/resources/i18n/message_en.properties
+0
-4
XxlJobLogMapper.xml
...min/src/main/resources/mybatis-mapper/XxlJobLogMapper.xml
+8
-7
index.js
xxl-job-admin/src/main/webapp/static/js/index.js
+23
-12
XxlJobLogDaoTest.java
...src/test/java/com/xxl/job/admin/dao/XxlJobLogDaoTest.java
+1
-1
没有找到文件。
doc/XXL-JOB官方文档.md
浏览文件 @
0169d537
...
@@ -1144,6 +1144,8 @@ Tips: 历史版本(V1.3.x)目前已经Release至稳定版本, 进入维护阶段
...
@@ -1144,6 +1144,8 @@ Tips: 历史版本(V1.3.x)目前已经Release至稳定版本, 进入维护阶段
-
1、修复打包部署时资源文件乱码问题;
-
1、修复打包部署时资源文件乱码问题;
-
2、修复新版本chrome滚动到顶部失效问题;
-
2、修复新版本chrome滚动到顶部失效问题;
-
3、国际化:调度中心实现国际化,支持中文、英文两种语言,默认为中文。
-
3、国际化:调度中心实现国际化,支持中文、英文两种语言,默认为中文。
-
4、调度报表新增"运行中"中状态项,数据加载SQL优化;
-
5、调度报表缓存优化,修复大数据量执行日志加载缓慢的问题;
### TODO LIST
### TODO LIST
-
1、任务权限管理:执行器为粒度分配权限,核心操作校验权限;
-
1、任务权限管理:执行器为粒度分配权限,核心操作校验权限;
...
@@ -1161,7 +1163,7 @@ Tips: 历史版本(V1.3.x)目前已经Release至稳定版本, 进入维护阶段
...
@@ -1161,7 +1163,7 @@ Tips: 历史版本(V1.3.x)目前已经Release至稳定版本, 进入维护阶段
-
13、任务依赖增强,新增任务类型 "流程任务",流程节点可挂载普通类型任务,承担任务依赖功能。现有子任务模型取消;需要考虑任务依赖死循环问题;
-
13、任务依赖增强,新增任务类型 "流程任务",流程节点可挂载普通类型任务,承担任务依赖功能。现有子任务模型取消;需要考虑任务依赖死循环问题;
-
14、分片任务某一分片失败,支持分片转移;
-
14、分片任务某一分片失败,支持分片转移;
-
15、调度中心触发任务后,先推送触发队列,异步触发,然后立即返回。降低quartz线程占用时长。
-
15、调度中心触发任务后,先推送触发队列,异步触发,然后立即返回。降低quartz线程占用时长。
-
16、调度报表加载速度慢问题;
## 七、其他
## 七、其他
...
...
xxl-job-admin/src/main/java/com/xxl/job/admin/core/util/I18nUtil.java
浏览文件 @
0169d537
...
@@ -28,7 +28,7 @@ public class I18nUtil {
...
@@ -28,7 +28,7 @@ public class I18nUtil {
public
static
Properties
loadI18nProp
(){
public
static
Properties
loadI18nProp
(){
if
(
prop
!=
null
&&
(
System
.
currentTimeMillis
()-
lastCacheTim
)<
60
*
1000
)
{
if
(
prop
!=
null
&&
(
System
.
currentTimeMillis
()-
lastCacheTim
)<
60
*
1000
)
{
return
prop
;
//
return prop;
}
}
try
{
try
{
// bild i18n prop
// bild i18n prop
...
...
xxl-job-admin/src/main/java/com/xxl/job/admin/dao/XxlJobLogDao.java
浏览文件 @
0169d537
...
@@ -41,8 +41,7 @@ public interface XxlJobLogDao {
...
@@ -41,8 +41,7 @@ public interface XxlJobLogDao {
public
int
triggerCountByHandleCode
(
@Param
(
"handleCode"
)
int
handleCode
);
public
int
triggerCountByHandleCode
(
@Param
(
"handleCode"
)
int
handleCode
);
public
List
<
Map
<
String
,
Object
>>
triggerCountByDay
(
@Param
(
"from"
)
Date
from
,
public
List
<
Map
<
String
,
Object
>>
triggerCountByDay
(
@Param
(
"from"
)
Date
from
,
@Param
(
"to"
)
Date
to
,
@Param
(
"to"
)
Date
to
);
@Param
(
"handleCode"
)
int
handleCode
);
public
int
clearLog
(
@Param
(
"jobGroup"
)
int
jobGroup
,
public
int
clearLog
(
@Param
(
"jobGroup"
)
int
jobGroup
,
@Param
(
"jobId"
)
int
jobId
,
@Param
(
"jobId"
)
int
jobId
,
...
...
xxl-job-admin/src/main/java/com/xxl/job/admin/service/impl/XxlJobServiceImpl.java
浏览文件 @
0169d537
...
@@ -323,35 +323,30 @@ public class XxlJobServiceImpl implements XxlJobService {
...
@@ -323,35 +323,30 @@ public class XxlJobServiceImpl implements XxlJobService {
@Override
@Override
public
ReturnT
<
Map
<
String
,
Object
>>
triggerChartDate
(
Date
startDate
,
Date
endDate
)
{
public
ReturnT
<
Map
<
String
,
Object
>>
triggerChartDate
(
Date
startDate
,
Date
endDate
)
{
List
<
String
>
triggerDayList
=
new
ArrayList
<
String
>();
List
<
String
>
triggerDayList
=
new
ArrayList
<
String
>();
List
<
Integer
>
triggerDayCountRunningList
=
new
ArrayList
<
Integer
>();
List
<
Integer
>
triggerDayCountSucList
=
new
ArrayList
<
Integer
>();
List
<
Integer
>
triggerDayCountSucList
=
new
ArrayList
<
Integer
>();
List
<
Integer
>
triggerDayCountFailList
=
new
ArrayList
<
Integer
>();
List
<
Integer
>
triggerDayCountFailList
=
new
ArrayList
<
Integer
>();
int
triggerCountRunningTotal
=
0
;
int
triggerCountSucTotal
=
0
;
int
triggerCountSucTotal
=
0
;
int
triggerCountFailTotal
=
0
;
int
triggerCountFailTotal
=
0
;
List
<
Map
<
String
,
Object
>>
triggerCountMapAll
=
xxlJobLogDao
.
triggerCountByDay
(
startDate
,
endDate
,
-
1
);
List
<
Map
<
String
,
Object
>>
triggerCountMapAll
=
xxlJobLogDao
.
triggerCountByDay
(
startDate
,
endDate
);
List
<
Map
<
String
,
Object
>>
triggerCountMapSuc
=
xxlJobLogDao
.
triggerCountByDay
(
startDate
,
endDate
,
ReturnT
.
SUCCESS_CODE
);
if
(
CollectionUtils
.
isNotEmpty
(
triggerCountMapAll
))
{
if
(
CollectionUtils
.
isNotEmpty
(
triggerCountMapAll
))
{
for
(
Map
<
String
,
Object
>
item:
triggerCountMapAll
)
{
for
(
Map
<
String
,
Object
>
item:
triggerCountMapAll
)
{
String
day
=
String
.
valueOf
(
item
.
get
(
"triggerDay"
));
String
day
=
String
.
valueOf
(
item
.
get
(
"triggerDay"
));
int
dayAllCount
=
Integer
.
valueOf
(
String
.
valueOf
(
item
.
get
(
"triggerCount"
)));
int
triggerDayCount
=
Integer
.
valueOf
(
String
.
valueOf
(
item
.
get
(
"triggerDayCount"
)));
int
daySucCount
=
0
;
int
triggerDayCountRunning
=
Integer
.
valueOf
(
String
.
valueOf
(
item
.
get
(
"triggerDayCountRunning"
)));
int
dayFailCount
=
dayAllCount
-
daySucCount
;
int
triggerDayCountSuc
=
Integer
.
valueOf
(
String
.
valueOf
(
item
.
get
(
"triggerDayCountSuc"
)));
int
triggerDayCountFail
=
triggerDayCount
-
triggerDayCountRunning
-
triggerDayCountSuc
;
if
(
CollectionUtils
.
isNotEmpty
(
triggerCountMapSuc
))
{
for
(
Map
<
String
,
Object
>
sucItem:
triggerCountMapSuc
)
{
String
daySuc
=
String
.
valueOf
(
sucItem
.
get
(
"triggerDay"
));
if
(
day
.
equals
(
daySuc
))
{
daySucCount
=
Integer
.
valueOf
(
String
.
valueOf
(
sucItem
.
get
(
"triggerCount"
)));
dayFailCount
=
dayAllCount
-
daySucCount
;
}
}
}
triggerDayList
.
add
(
day
);
triggerDayList
.
add
(
day
);
triggerDayCountSucList
.
add
(
daySucCount
);
triggerDayCountRunningList
.
add
(
triggerDayCountRunning
);
triggerDayCountFailList
.
add
(
dayFailCount
);
triggerDayCountSucList
.
add
(
triggerDayCountSuc
);
triggerCountSucTotal
+=
daySucCount
;
triggerDayCountFailList
.
add
(
triggerDayCountFail
);
triggerCountFailTotal
+=
dayFailCount
;
triggerCountRunningTotal
+=
triggerDayCountRunning
;
triggerCountSucTotal
+=
triggerDayCountSuc
;
triggerCountFailTotal
+=
triggerDayCountFail
;
}
}
}
else
{
}
else
{
for
(
int
i
=
4
;
i
>
-
1
;
i
--)
{
for
(
int
i
=
4
;
i
>
-
1
;
i
--)
{
...
@@ -363,8 +358,11 @@ public class XxlJobServiceImpl implements XxlJobService {
...
@@ -363,8 +358,11 @@ public class XxlJobServiceImpl implements XxlJobService {
Map
<
String
,
Object
>
result
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
result
=
new
HashMap
<
String
,
Object
>();
result
.
put
(
"triggerDayList"
,
triggerDayList
);
result
.
put
(
"triggerDayList"
,
triggerDayList
);
result
.
put
(
"triggerDayCountRunningList"
,
triggerDayCountRunningList
);
result
.
put
(
"triggerDayCountSucList"
,
triggerDayCountSucList
);
result
.
put
(
"triggerDayCountSucList"
,
triggerDayCountSucList
);
result
.
put
(
"triggerDayCountFailList"
,
triggerDayCountFailList
);
result
.
put
(
"triggerDayCountFailList"
,
triggerDayCountFailList
);
result
.
put
(
"triggerCountRunningTotal"
,
triggerCountRunningTotal
);
result
.
put
(
"triggerCountSucTotal"
,
triggerCountSucTotal
);
result
.
put
(
"triggerCountSucTotal"
,
triggerCountSucTotal
);
result
.
put
(
"triggerCountFailTotal"
,
triggerCountFailTotal
);
result
.
put
(
"triggerCountFailTotal"
,
triggerCountFailTotal
);
return
new
ReturnT
<
Map
<
String
,
Object
>>(
result
);
return
new
ReturnT
<
Map
<
String
,
Object
>>(
result
);
...
...
xxl-job-admin/src/main/resources/i18n/message.properties
浏览文件 @
0169d537
...
@@ -93,11 +93,7 @@ job_dashboard_jobgroup_num_tip=调度中心在线的执行器机器数量
...
@@ -93,11 +93,7 @@ job_dashboard_jobgroup_num_tip=调度中心在线的执行器机器数量
job_dashboard_report
=
调度报表
job_dashboard_report
=
调度报表
job_dashboard_report_loaddata_fail
=
调度报表数据加载异常
job_dashboard_report_loaddata_fail
=
调度报表数据加载异常
job_dashboard_date_report
=
日期分布图
job_dashboard_date_report
=
日期分布图
job_dashboard_date_report_suc_count
=
成功调度次数
job_dashboard_date_report_fail_count
=
失败调度次数
job_dashboard_rate_report
=
成功比例图
job_dashboard_rate_report
=
成功比例图
job_dashboard_rate_report_suc_count
=
成功调度次数
job_dashboard_rate_report_fail_count
=
失败调度次数
## job info
## job info
jobinfo_name
=
任务管理
jobinfo_name
=
任务管理
...
...
xxl-job-admin/src/main/resources/i18n/message_en.properties
浏览文件 @
0169d537
...
@@ -93,11 +93,7 @@ job_dashboard_jobgroup_num_tip=The number of online executor machines perceived
...
@@ -93,11 +93,7 @@ job_dashboard_jobgroup_num_tip=The number of online executor machines perceived
job_dashboard_report
=
Scheduling report
job_dashboard_report
=
Scheduling report
job_dashboard_report_loaddata_fail
=
Scheduling report load data error
job_dashboard_report_loaddata_fail
=
Scheduling report load data error
job_dashboard_date_report
=
Date distribution
job_dashboard_date_report
=
Date distribution
job_dashboard_date_report_suc_count
=
Successful scheduling number
job_dashboard_date_report_fail_count
=
Fail scheduling number
job_dashboard_rate_report
=
Percentage distribution
job_dashboard_rate_report
=
Percentage distribution
job_dashboard_rate_report_suc_count
=
Successful scheduling percentage
job_dashboard_rate_report_fail_count
=
Fail scheduling percentage
## job info
## job info
jobinfo_name
=
Job Manage
jobinfo_name
=
Job Manage
...
...
xxl-job-admin/src/main/resources/mybatis-mapper/XxlJobLogMapper.xml
浏览文件 @
0169d537
...
@@ -163,13 +163,14 @@
...
@@ -163,13 +163,14 @@
</select>
</select>
<select
id=
"triggerCountByDay"
resultType=
"java.util.Map"
>
<select
id=
"triggerCountByDay"
resultType=
"java.util.Map"
>
SELECT DATE_FORMAT(trigger_time,'%Y-%m-%d') triggerDay, COUNT(id) triggerCount
SELECT
FROM XXL_JOB_QRTZ_TRIGGER_LOG
DATE_FORMAT(trigger_time,'%Y-%m-%d') triggerDay,
WHERE trigger_time BETWEEN #{from} and #{to}
COUNT(handle_code) triggerDayCount,
<if
test=
"handleCode gt 0"
>
SUM(CASE WHEN handle_code = 0 then 1 else 0 end) as triggerDayCountRunning,
AND handle_code = #{handleCode}
SUM(CASE WHEN handle_code = 200 then 1 else 0 end) as triggerDayCountSuc
</if>
FROM XXL_JOB_QRTZ_TRIGGER_LOG
GROUP BY triggerDay;
WHERE trigger_time BETWEEN #{from} and #{to}
GROUP BY triggerDay;
</select>
</select>
<delete
id=
"clearLog"
>
<delete
id=
"clearLog"
>
...
...
xxl-job-admin/src/main/webapp/static/js/index.js
浏览文件 @
0169d537
...
@@ -89,7 +89,7 @@ $(function () {
...
@@ -89,7 +89,7 @@ $(function () {
}
}
},
},
legend
:
{
legend
:
{
data
:[
I18n
.
job
_dashboard_date_report_suc_count
,
I18n
.
job_dashboard_date_report_fail_count
]
data
:[
I18n
.
job
log_status_suc
,
I18n
.
joblog_status_fail
,
I18n
.
joblog_status_running
]
},
},
toolbox
:
{
toolbox
:
{
feature
:
{
feature
:
{
...
@@ -116,14 +116,14 @@ $(function () {
...
@@ -116,14 +116,14 @@ $(function () {
],
],
series
:
[
series
:
[
{
{
name
:
I18n
.
job
_dashboard_date_report_suc_count
,
name
:
I18n
.
job
log_status_suc
,
type
:
'line'
,
type
:
'line'
,
stack
:
'Total'
,
stack
:
'Total'
,
areaStyle
:
{
normal
:
{}},
areaStyle
:
{
normal
:
{}},
data
:
data
.
content
.
triggerDayCountSucList
data
:
data
.
content
.
triggerDayCountSucList
},
},
{
{
name
:
I18n
.
job
_dashboard_date_report_fail_count
,
name
:
I18n
.
job
log_status_fail
,
type
:
'line'
,
type
:
'line'
,
stack
:
'Total'
,
stack
:
'Total'
,
label
:
{
label
:
{
...
@@ -134,9 +134,16 @@ $(function () {
...
@@ -134,9 +134,16 @@ $(function () {
},
},
areaStyle
:
{
normal
:
{}},
areaStyle
:
{
normal
:
{}},
data
:
data
.
content
.
triggerDayCountFailList
data
:
data
.
content
.
triggerDayCountFailList
},
{
name
:
I18n
.
joblog_status_running
,
type
:
'line'
,
stack
:
'Total'
,
areaStyle
:
{
normal
:
{}},
data
:
data
.
content
.
triggerDayCountRunningList
}
}
],
],
color
:[
'#00A65A'
,
'#F39C12'
]
color
:[
'#00A65A'
,
'#
c23632'
,
'#
F39C12'
]
};
};
var
lineChart
=
echarts
.
init
(
document
.
getElementById
(
'lineChart'
));
var
lineChart
=
echarts
.
init
(
document
.
getElementById
(
'lineChart'
));
...
@@ -155,27 +162,31 @@ $(function () {
...
@@ -155,27 +162,31 @@ $(function () {
},
},
tooltip
:
{
tooltip
:
{
trigger
:
'item'
,
trigger
:
'item'
,
formatter
:
"{
a} <br/>{
b} : {c} ({d}%)"
formatter
:
"{b} : {c} ({d}%)"
},
},
legend
:
{
legend
:
{
orient
:
'vertical'
,
orient
:
'vertical'
,
left
:
'left'
,
left
:
'left'
,
data
:
[
I18n
.
job
_dashboard_rate_report_suc_count
,
I18n
.
job_dashboard_rate_report_fail_count
]
data
:
[
I18n
.
job
log_status_suc
,
I18n
.
joblog_status_fail
,
I18n
.
joblog_status_running
]
},
},
series
:
[
series
:
[
{
{
name
:
'分布比例'
,
//
name: '分布比例',
type
:
'pie'
,
type
:
'pie'
,
radius
:
'55%'
,
radius
:
'55%'
,
center
:
[
'50%'
,
'60%'
],
center
:
[
'50%'
,
'60%'
],
data
:[
data
:[
{
{
value
:
data
.
content
.
triggerCountSucTotal
,
name
:
I18n
.
joblog_status_suc
,
name
:
I18n
.
job_dashboard_rate_report_suc_count
value
:
data
.
content
.
triggerCountSucTotal
},
{
name
:
I18n
.
joblog_status_fail
,
value
:
data
.
content
.
triggerCountFailTotal
},
},
{
{
value
:
data
.
content
.
triggerCountFailTotal
,
name
:
I18n
.
joblog_status_running
,
name
:
I18n
.
job_dashboard_rate_report_fail_count
value
:
data
.
content
.
triggerCountRunningTotal
}
}
],
],
itemStyle
:
{
itemStyle
:
{
...
@@ -187,7 +198,7 @@ $(function () {
...
@@ -187,7 +198,7 @@ $(function () {
}
}
}
}
],
],
color
:[
'#00A65A'
,
'#F39C12'
]
color
:[
'#00A65A'
,
'#
c23632'
,
'#
F39C12'
]
};
};
var
pieChart
=
echarts
.
init
(
document
.
getElementById
(
'pieChart'
));
var
pieChart
=
echarts
.
init
(
document
.
getElementById
(
'pieChart'
));
pieChart
.
setOption
(
option
);
pieChart
.
setOption
(
option
);
...
...
xxl-job-admin/src/test/java/com/xxl/job/admin/dao/XxlJobLogDaoTest.java
浏览文件 @
0169d537
...
@@ -50,7 +50,7 @@ public class XxlJobLogDaoTest {
...
@@ -50,7 +50,7 @@ public class XxlJobLogDaoTest {
dto
=
xxlJobLogDao
.
load
(
log
.
getId
());
dto
=
xxlJobLogDao
.
load
(
log
.
getId
());
List
<
Map
<
String
,
Object
>>
list2
=
xxlJobLogDao
.
triggerCountByDay
(
DateUtils
.
addDays
(
new
Date
(),
30
),
new
Date
()
,
200
);
List
<
Map
<
String
,
Object
>>
list2
=
xxlJobLogDao
.
triggerCountByDay
(
DateUtils
.
addDays
(
new
Date
(),
30
),
new
Date
());
int
ret4
=
xxlJobLogDao
.
clearLog
(
1
,
1
,
new
Date
(),
100
);
int
ret4
=
xxlJobLogDao
.
clearLog
(
1
,
1
,
new
Date
(),
100
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论