Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
X
XXL-JOB
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
靳帅
XXL-JOB
Commits
c2f3a827
提交
c2f3a827
authored
1月 19, 2018
作者:
xuxueli
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
任务日志界面操作国际化迁移完成
上级
844f51c5
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
162 行增加
和
132 行删除
+162
-132
JobLogController.java
...n/java/com/xxl/job/admin/controller/JobLogController.java
+2
-0
message.properties
xxl-job-admin/src/main/resources/i18n/message.properties
+40
-3
joblog.index.ftl
.../src/main/webapp/WEB-INF/template/joblog/joblog.index.ftl
+41
-41
index.js
xxl-job-admin/src/main/webapp/static/js/index.js
+4
-7
joblog.index.1.js
xxl-job-admin/src/main/webapp/static/js/joblog.index.1.js
+75
-81
没有找到文件。
xxl-job-admin/src/main/java/com/xxl/job/admin/controller/JobLogController.java
浏览文件 @
c2f3a827
...
...
@@ -10,6 +10,7 @@ import com.xxl.job.admin.dao.XxlJobLogDao;
import
com.xxl.job.core.biz.ExecutorBiz
;
import
com.xxl.job.core.biz.model.LogResult
;
import
com.xxl.job.core.biz.model.ReturnT
;
import
com.xxl.job.core.glue.GlueTypeEnum
;
import
com.xxl.job.core.rpc.netcom.NetComClientProxy
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.time.DateUtils
;
...
...
@@ -50,6 +51,7 @@ public class JobLogController {
// 执行器列表
List
<
XxlJobGroup
>
jobGroupList
=
xxlJobGroupDao
.
findAll
();
model
.
addAttribute
(
"JobGroupList"
,
jobGroupList
);
model
.
addAttribute
(
"GlueTypeEnum"
,
GlueTypeEnum
.
values
());
// 任务
if
(
jobId
>
0
)
{
...
...
xxl-job-admin/src/main/resources/i18n/message.properties
浏览文件 @
c2f3a827
...
...
@@ -18,14 +18,21 @@ system_add_suc=新增成功
system_add_fail
=
新增失败
system_update_suc
=
更新成功
system_update_fail
=
更新失败
system_all
=
全部
system_api_error
=
接口异常
system_show
=
查看
system_empty
=
无
system_opt_suc
=
操作成功
system_opt_fail
=
操作失败
## daterangepicker
daterangepicker_ranges_recent_hour
=
最近一小时
daterangepicker_ranges_today
=
今日
daterangepicker_ranges_yesterday
=
昨日
daterangepicker_ranges_this_month
=
本月
daterangepicker_ranges_last_month
=
上个月
daterangepicker_ranges_recent_week
=
最近
1
周
daterangepicker_ranges_recent_month
=
最近
1
月
daterangepicker_ranges_recent_week
=
最近
一
周
daterangepicker_ranges_recent_month
=
最近
一
月
daterangepicker_custom_name
=
自定义
daterangepicker_custom_starttime
=
起始时间
daterangepicker_custom_endtime
=
结束时间
...
...
@@ -87,13 +94,14 @@ job_dashboard_rate_report_fail_count=失败调度次数
## job info
jobinfo_name
=
任务管理
jobinfo_job
=
任务
jobinfo_field_add
=
新增任务
jobinfo_field_update
=
更新任务
jobinfo_field_id
=
任务ID
jobinfo_field_jobgroup
=
执行器
jobinfo_field_jobdesc
=
任务描述
jobinfo_field_gluetype
=
运行模式
jobinfo_field_executorparam
=
执行
参数
jobinfo_field_executorparam
=
任务
参数
jobinfo_field_author
=
负责人
jobinfo_field_alarmemail
=
报警邮件
jobinfo_field_alarmemail_placeholder
=
请输入报警邮件,多个邮件地址则逗号分隔
...
...
@@ -114,6 +122,35 @@ jobinfo_opt_del=删除
## job log
joblog_name
=
调度日志
joblog_status
=
状态
joblog_status_all
=
全部
joblog_status_suc
=
成功
joblog_status_fail
=
失败
joblog_status_running
=
进行中
joblog_field_triggerTime
=
调度时间
joblog_field_triggerCode
=
调度结果
joblog_field_triggerMsg
=
调度备注
joblog_field_handleTime
=
执行时间
joblog_field_handleCode
=
执行结果
joblog_field_handleMsg
=
执行备注
joblog_field_executorAddress
=
执行器地址
joblog_clean
=
清理
joblog_clean_log
=
日志清理
joblog_clean_type
=
清理方式
joblog_clean_type_1
=
清理一个月之前日志数据
joblog_clean_type_2
=
清理三个月之前日志数据
joblog_clean_type_3
=
清理六个月之前日志数据
joblog_clean_type_4
=
清理一年之前日志数据
joblog_clean_type_5
=
清理一千条以前日志数据
joblog_clean_type_6
=
清理一万条以前日志数据
joblog_clean_type_7
=
清理三万条以前日志数据
joblog_clean_type_8
=
清理十万条以前日志数据
joblog_clean_type_9
=
清理所有日志数据
joblog_handleCode_200
=
成功
joblog_handleCode_500
=
失败
joblog_handleCode_501
=
失败重试
joblog_rolling_log
=
执行日志
joblog_kill_log
=
终止任务
## job group
jobgroup_name
=
执行器管理
...
...
xxl-job-admin/src/main/webapp/WEB-INF/template/joblog/joblog.index.ftl
浏览文件 @
c2f3a827
...
...
@@ -21,12 +21,6 @@
<!-- Content Header (Page header) -->
<section
class=
"content-header"
>
<h1>
${I18n.joblog_name}
</h1>
<!--
<ol class="breadcrumb">
<li><a><i class="fa fa-dashboard"></i>调度日志</a></li>
<li class="active">调度管理</li>
</ol>
-->
</section>
<!-- Main content -->
...
...
@@ -34,9 +28,9 @@
<div
class=
"row"
>
<div
class=
"col-xs-2"
>
<div
class=
"input-group"
>
<span
class=
"input-group-addon"
>
执行器
</span>
<span
class=
"input-group-addon"
>
${I18n.jobinfo_field_jobgroup}
</span>
<select
class=
"form-control"
id=
"jobGroup"
paramVal=
"<#if jobInfo?exists>${jobInfo.jobGroup}</#if>"
>
<option
value=
"0"
>
全部
</option>
<option
value=
"0"
>
${I18n.system_all}
</option>
<
#
list
JobGroupList
as
group
>
<option
value=
"${group.id}"
>
${group.title}
</option>
</
#
list>
...
...
@@ -45,21 +39,21 @@
</div>
<div
class=
"col-xs-2"
>
<div
class=
"input-group"
>
<span
class=
"input-group-addon"
>
任务
</span>
<span
class=
"input-group-addon"
>
${I18n.jobinfo_job}
</span>
<select
class=
"form-control"
id=
"jobId"
paramVal=
"<#if jobInfo?exists>${jobInfo.id}</#if>"
>
<option
value=
"0"
>
全部
</option>
<option
value=
"0"
>
${I18n.system_all}
</option>
</select>
</div>
</div>
<div
class=
"col-xs-2"
>
<div
class=
"input-group"
>
<span
class=
"input-group-addon"
>
状态
</span>
<span
class=
"input-group-addon"
>
${I18n.joblog_status}
</span>
<select
class=
"form-control"
id=
"logStatus"
>
<option
value=
"-1"
>
全部
</option>
<option
value=
"1"
>
成功
</option>
<option
value=
"2"
>
失败
</option>
<option
value=
"3"
>
进行中
</option>
<option
value=
"-1"
>
${I18n.joblog_status_all}
</option>
<option
value=
"1"
>
${I18n.joblog_status_suc}
</option>
<option
value=
"2"
>
${I18n.joblog_status_fail}
</option>
<option
value=
"3"
>
${I18n.joblog_status_running}
</option>
</select>
</div>
</div>
...
...
@@ -74,11 +68,11 @@
</div>
<div
class=
"col-xs-1"
>
<button
class=
"btn btn-block btn-info"
id=
"searchBtn"
>
搜索
</button>
<button
class=
"btn btn-block btn-info"
id=
"searchBtn"
>
${I18n.system_search}
</button>
</div>
<div
class=
"col-xs-1"
>
<button
class=
"btn btn-block btn-nomal"
id=
"clearLog"
>
清理
</button>
<button
class=
"btn btn-block btn-nomal"
id=
"clearLog"
>
${I18n.joblog_clean}
</button>
</div>
</div>
...
...
@@ -90,18 +84,18 @@
<table
id=
"joblog_list"
class=
"table table-bordered table-striped display"
width=
"100%"
>
<thead>
<tr>
<th
name=
"jobId"
>
任务ID
</th>
<th
name=
"jobGroup"
>
执行器ID
</th>
<th
name=
"jobId"
>
${I18n.jobinfo_field_id}
</th>
<th
name=
"jobGroup"
>
jobGroup
</th>
<
#
--
<
th
name=
"executorAddress"
>
执行器地址
</th>
<th
name=
"glueType"
>
运行模式
</th>
<th
name=
"executorParam"
>
任务参数
</th>
-->
<th
name=
"triggerTime"
>
调度时间
</th>
<th
name=
"triggerCode"
>
调度结果
</th>
<th
name=
"triggerMsg"
>
调度备注
</th>
<th
name=
"handleTime"
>
执行时间
</th>
<th
name=
"handleCode"
>
执行结果
</th>
<th
name=
"handleMsg"
>
执行备注
</th>
<th
name=
"handleMsg"
>
操作
</th>
<th
name=
"triggerTime"
>
${I18n.joblog_field_triggerTime}
</th>
<th
name=
"triggerCode"
>
${I18n.joblog_field_triggerCode}
</th>
<th
name=
"triggerMsg"
>
${I18n.joblog_field_triggerMsg}
</th>
<th
name=
"handleTime"
>
${I18n.joblog_field_handleTime}
</th>
<th
name=
"handleCode"
>
${I18n.joblog_field_handleCode}
</th>
<th
name=
"handleMsg"
>
${I18n.joblog_field_handleMsg}
</th>
<th
name=
"handleMsg"
>
${I18n.system_opt}
</th>
</tr>
</thead>
<tbody></tbody>
...
...
@@ -122,12 +116,12 @@
<div
class=
"modal-dialog"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<h4
class=
"modal-title"
>
日志清理
</h4>
<h4
class=
"modal-title"
>
${I18n.joblog_clean_log}
</h4>
</div>
<div
class=
"modal-body"
>
<form
class=
"form-horizontal form"
role=
"form"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
"
>
执行器
:
</label>
<label
class=
"col-sm-3 control-label"
"
>
${I18n.jobinfo_field_jobgroup}
:
</label>
<div
class=
"col-sm-9"
>
<input
type=
"text"
class=
"form-control jobGroupText"
readonly
>
<input
type=
"hidden"
name=
"jobGroup"
>
...
...
@@ -135,7 +129,7 @@
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
"
>
任务
:
</label>
<label
class=
"col-sm-3 control-label"
"
>
${I18n.jobinfo_job}
:
</label>
<div
class=
"col-sm-9"
>
<input
type=
"text"
class=
"form-control jobIdText"
readonly
>
<input
type=
"hidden"
name=
"jobId"
>
...
...
@@ -143,18 +137,18 @@
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
"
>
清理类型
:
</label>
<label
class=
"col-sm-3 control-label"
"
>
${I18n.joblog_clean_type}
:
</label>
<div
class=
"col-sm-9"
>
<select
class=
"form-control"
name=
"type"
>
<option
value=
"1"
>
清理一个月之前日志数据
</option>
<option
value=
"2"
>
清理三个月之前日志数据
</option>
<option
value=
"3"
>
清理六个月之前日志数据
</option>
<option
value=
"4"
>
清理一年之前日志数据
</option>
<option
value=
"5"
>
清理一千条以前日志数据
</option>
<option
value=
"6"
>
清理一万条以前日志数据
</option>
<option
value=
"7"
>
清理三万条以前日志数据
</option>
<option
value=
"8"
>
清理十万条以前日志数据
</option>
<option
value=
"9"
>
清理所有日志数据
</option>
<option
value=
"1"
>
${I18n.joblog_clean_type_1}
</option>
<option
value=
"2"
>
${I18n.joblog_clean_type_2}
</option>
<option
value=
"3"
>
${I18n.joblog_clean_type_3}
</option>
<option
value=
"4"
>
${I18n.joblog_clean_type_4}
</option>
<option
value=
"5"
>
${I18n.joblog_clean_type_5}
</option>
<option
value=
"6"
>
${I18n.joblog_clean_type_6}
</option>
<option
value=
"7"
>
${I18n.joblog_clean_type_7}
</option>
<option
value=
"8"
>
${I18n.joblog_clean_type_8}
</option>
<option
value=
"9"
>
${I18n.joblog_clean_type_9}
</option>
</select>
</div>
</div>
...
...
@@ -162,8 +156,8 @@
<hr>
<div
class=
"form-group"
>
<div
class=
"col-sm-offset-3 col-sm-6"
>
<button
type=
"button"
class=
"btn btn-primary ok"
>
确定
</button>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
取消
</button>
<button
type=
"button"
class=
"btn btn-primary ok"
>
${I18n.system_ok}
</button>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
${I18n.system_cancel}
</button>
</div>
</div>
</form>
...
...
@@ -173,6 +167,12 @@
</div>
<
@
netCommon
.
commonScript
/>
<script>
var
GlueTypeEnum
=
{};
<
#
list
GlueTypeEnum
as
item
>
GlueTypeEnum
[
'${item}'
]
=
'${item.desc}'
;
<
/#list>
</script>
<!-- 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>
...
...
xxl-job-admin/src/main/webapp/static/js/index.js
浏览文件 @
c2f3a827
...
...
@@ -4,16 +4,13 @@
$
(
function
()
{
// filter Time
var
_startDate
=
moment
().
subtract
(
1
,
'months'
);
// default,recent_month
var
_endDate
=
moment
();
var
rangesConf
=
{};
rangesConf
[
I18n
.
daterangepicker_ranges_today
]
=
[
moment
().
startOf
(
'day'
),
moment
().
endOf
(
'day'
)];
rangesConf
[
I18n
.
daterangepicker_ranges_yesterday
]
=
[
moment
().
subtract
(
1
,
'days'
).
startOf
(
'day'
),
moment
().
subtract
(
1
,
'days'
).
endOf
(
'day'
)];
rangesConf
[
I18n
.
daterangepicker_ranges_this_month
]
=
[
moment
().
startOf
(
'month'
),
moment
().
endOf
(
'month'
)];
rangesConf
[
I18n
.
daterangepicker_ranges_last_month
]
=
[
moment
().
subtract
(
1
,
'months'
).
startOf
(
'month'
),
moment
().
subtract
(
1
,
'months'
).
endOf
(
'month'
)];
rangesConf
[
I18n
.
daterangepicker_ranges_recent_week
]
=
[
moment
().
subtract
(
1
,
'weeks'
),
moment
()];
rangesConf
[
I18n
.
daterangepicker_ranges_recent_month
]
=
[
_startDate
,
_endDate
];
rangesConf
[
I18n
.
daterangepicker_ranges_recent_month
]
=
[
moment
().
subtract
(
1
,
'months'
),
moment
()
];
$
(
'#filterTime'
).
daterangepicker
({
autoApply
:
false
,
...
...
@@ -36,12 +33,12 @@ $(function () {
monthNames
:
I18n
.
daterangepicker_custom_monthnames
.
split
(
','
)
,
// '一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'
firstDay
:
1
},
startDate
:
_startDate
,
endDate
:
_endDate
startDate
:
rangesConf
[
I18n
.
daterangepicker_ranges_recent_month
][
0
]
,
endDate
:
rangesConf
[
I18n
.
daterangepicker_ranges_recent_month
][
1
]
},
function
(
start
,
end
,
label
)
{
freshChartDate
(
start
,
end
);
});
freshChartDate
(
_startDate
,
_endDate
);
freshChartDate
(
rangesConf
[
I18n
.
daterangepicker_ranges_recent_month
][
0
],
rangesConf
[
I18n
.
daterangepicker_ranges_recent_month
][
1
]
);
/**
* fresh Chart Date
...
...
xxl-job-admin/src/main/webapp/static/js/joblog.index.1.js
浏览文件 @
c2f3a827
...
...
@@ -11,7 +11,7 @@ $(function() {
dataType
:
"json"
,
success
:
function
(
data
){
if
(
data
.
code
==
200
)
{
$
(
"#jobId"
).
html
(
'<option value="0" >全部</option>'
);
$
(
"#jobId"
).
html
(
'<option value="0" >'
+
I18n
.
system_all
+
'</option>'
);
$
.
each
(
data
.
content
,
function
(
n
,
value
)
{
$
(
"#jobId"
).
append
(
'<option value="'
+
value
.
id
+
'" >'
+
value
.
jobDesc
+
'</option>'
);
});
...
...
@@ -20,8 +20,8 @@ $(function() {
}
}
else
{
layer
.
open
({
title
:
'系统提示'
,
content
:
(
data
.
msg
||
"接口异常"
),
title
:
I18n
.
system_tips
,
content
:
(
data
.
msg
||
I18n
.
system_api_error
),
icon
:
'2'
});
}
...
...
@@ -34,6 +34,15 @@ $(function() {
}
// filter Time
var
rangesConf
=
{};
rangesConf
[
I18n
.
daterangepicker_ranges_recent_hour
]
=
[
moment
().
subtract
(
1
,
'hours'
),
moment
()];
rangesConf
[
I18n
.
daterangepicker_ranges_today
]
=
[
moment
().
startOf
(
'day'
),
moment
().
endOf
(
'day'
)];
rangesConf
[
I18n
.
daterangepicker_ranges_yesterday
]
=
[
moment
().
subtract
(
1
,
'days'
).
startOf
(
'day'
),
moment
().
subtract
(
1
,
'days'
).
endOf
(
'day'
)];
rangesConf
[
I18n
.
daterangepicker_ranges_this_month
]
=
[
moment
().
startOf
(
'month'
),
moment
().
endOf
(
'month'
)];
rangesConf
[
I18n
.
daterangepicker_ranges_last_month
]
=
[
moment
().
subtract
(
1
,
'months'
).
startOf
(
'month'
),
moment
().
subtract
(
1
,
'months'
).
endOf
(
'month'
)];
rangesConf
[
I18n
.
daterangepicker_ranges_recent_week
]
=
[
moment
().
subtract
(
1
,
'weeks'
),
moment
()];
rangesConf
[
I18n
.
daterangepicker_ranges_recent_month
]
=
[
moment
().
subtract
(
1
,
'months'
),
moment
()];
$
(
'#filterTime'
).
daterangepicker
({
autoApply
:
false
,
singleDatePicker
:
false
,
...
...
@@ -42,29 +51,21 @@ $(function() {
timePickerIncrement
:
10
,
// 时间的增量,单位为分钟
timePicker24Hour
:
true
,
opens
:
'left'
,
//日期选择框的弹出位置
ranges
:
{
'最近1小时'
:
[
moment
().
subtract
(
1
,
'hours'
),
moment
()],
'今日'
:
[
moment
().
startOf
(
'day'
),
moment
().
endOf
(
'day'
)],
'昨日'
:
[
moment
().
subtract
(
1
,
'days'
).
startOf
(
'day'
),
moment
().
subtract
(
1
,
'days'
).
endOf
(
'day'
)],
'最近7日'
:
[
moment
().
subtract
(
6
,
'days'
),
moment
()],
'最近30日'
:
[
moment
().
subtract
(
29
,
'days'
),
moment
()],
'本月'
:
[
moment
().
startOf
(
'month'
),
moment
().
endOf
(
'month'
)],
'上个月'
:
[
moment
().
subtract
(
1
,
'month'
).
startOf
(
'month'
),
moment
().
subtract
(
1
,
'month'
).
endOf
(
'month'
)]
},
ranges
:
rangesConf
,
locale
:
{
format
:
'YYYY-MM-DD HH:mm:ss'
,
separator
:
' - '
,
customRangeLabel
:
'自定义'
,
applyLabel
:
'确定'
,
cancelLabel
:
'取消'
,
fromLabel
:
'起始时间'
,
toLabel
:
'结束时间'
,
daysOfWeek
:
[
'日'
,
'一'
,
'二'
,
'三'
,
'四'
,
'五'
,
'六'
],
monthNames
:
[
'一月'
,
'二月'
,
'三月'
,
'四月'
,
'五月'
,
'六月'
,
'七月'
,
'八月'
,
'九月'
,
'十月'
,
'十一月'
,
'十二月'
],
firstDay
:
1
,
startDate
:
moment
().
startOf
(
'day'
)
,
endDate
:
moment
().
endOf
(
'day'
)
}
customRangeLabel
:
I18n
.
daterangepicker_custom_name
,
applyLabel
:
I18n
.
system_ok
,
cancelLabel
:
I18n
.
system_cancel
,
fromLabel
:
I18n
.
daterangepicker_custom_starttime
,
toLabel
:
I18n
.
daterangepicker_custom_endtime
,
daysOfWeek
:
I18n
.
daterangepicker_custom_daysofweek
.
split
(
','
)
,
// '日', '一', '二', '三', '四', '五', '六'
monthNames
:
I18n
.
daterangepicker_custom_monthnames
.
split
(
','
)
,
// '一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'
firstDay
:
1
}
,
startDate
:
rangesConf
[
I18n
.
daterangepicker_ranges_today
][
0
],
endDate
:
rangesConf
[
I18n
.
daterangepicker_ranges_today
][
1
]
});
// init date tables
...
...
@@ -94,23 +95,16 @@ $(function() {
"visible"
:
true
,
"width"
:
'10%'
,
"render"
:
function
(
data
,
type
,
row
)
{
var
glueTypeTitle
=
row
.
glueType
;
if
(
'GLUE_GROOVY'
==
row
.
glueType
)
{
glueTypeTitle
=
"GLUE模式(Java)"
;
}
else
if
(
'GLUE_SHELL'
==
row
.
glueType
)
{
glueTypeTitle
=
"GLUE模式(Shell)"
;
}
else
if
(
'GLUE_PYTHON'
==
row
.
glueType
)
{
glueTypeTitle
=
"GLUE模式(Python)"
;
}
else
if
(
'GLUE_NODEJS'
==
row
.
glueType
)
{
glueTypeTitle
=
"GLUE模式(Nodejs)"
;
}
else
if
(
'BEAN'
==
row
.
glueType
)
{
glueTypeTitle
=
"BEAN模式:"
+
row
.
executorHandler
;
}
var
glueTypeTitle
=
GlueTypeEnum
[
row
.
glueType
];
if
(
row
.
executorHandler
)
{
glueTypeTitle
=
glueTypeTitle
+
":"
+
row
.
executorHandler
;
}
var
temp
=
''
;
temp
+=
'执行器地址
:'
+
(
row
.
executorAddress
?
row
.
executorAddress
:
''
);
temp
+=
'<br>
运行模式
:'
+
glueTypeTitle
;
temp
+=
'<br>
任务参数
:'
+
row
.
executorParam
;
temp
+=
I18n
.
joblog_field_executorAddress
+
'
:'
+
(
row
.
executorAddress
?
row
.
executorAddress
:
''
);
temp
+=
'<br>
'
+
I18n
.
jobinfo_field_gluetype
+
'
:'
+
glueTypeTitle
;
temp
+=
'<br>
'
+
I18n
.
jobinfo_field_executorparam
+
'
:'
+
row
.
executorParam
;
return
'<a class="logTips" href="javascript:;" >'
+
row
.
jobId
+
'<span style="display:none;">'
+
temp
+
'</span></a>'
;
}
...
...
@@ -129,9 +123,9 @@ $(function() {
"render"
:
function
(
data
,
type
,
row
)
{
var
html
=
data
;
if
(
data
==
200
)
{
html
=
'<span style="color: green">
成功
</span>'
;
html
=
'<span style="color: green">
'
+
I18n
.
system_success
+
'
</span>'
;
}
else
if
(
data
==
500
)
{
html
=
'<span style="color: red">
失败
</span>'
;
html
=
'<span style="color: red">
'
+
I18n
.
system_fail
+
'
</span>'
;
}
else
if
(
data
==
0
)
{
html
=
''
;
}
...
...
@@ -142,7 +136,7 @@ $(function() {
"data"
:
'triggerMsg'
,
"width"
:
'12%'
,
"render"
:
function
(
data
,
type
,
row
)
{
return
data
?
'<a class="logTips" href="javascript:;" >
查看<span style="display:none;">'
+
data
+
'</span></a>'
:
"无"
;
return
data
?
'<a class="logTips" href="javascript:;" >
'
+
I18n
.
system_show
+
'<span style="display:none;">'
+
data
+
'</span></a>'
:
I18n
.
system_empty
;
}
},
{
...
...
@@ -158,11 +152,11 @@ $(function() {
"render"
:
function
(
data
,
type
,
row
)
{
var
html
=
data
;
if
(
data
==
200
)
{
html
=
'<span style="color: green">
成功
</span>'
;
html
=
'<span style="color: green">
'
+
I18n
.
joblog_handleCode_200
+
'
</span>'
;
}
else
if
(
data
==
500
)
{
html
=
'<span style="color: red">
失败
</span>'
;
html
=
'<span style="color: red">
'
+
I18n
.
joblog_handleCode_500
+
'
</span>'
;
}
else
if
(
data
==
501
)
{
html
=
'<span style="color: red">
失败重试
</span>'
;
html
=
'<span style="color: red">
'
+
I18n
.
joblog_handleCode_501
+
'
</span>'
;
}
else
if
(
data
==
0
)
{
html
=
''
;
}
...
...
@@ -173,7 +167,7 @@ $(function() {
"data"
:
'handleMsg'
,
"width"
:
'12%'
,
"render"
:
function
(
data
,
type
,
row
)
{
return
data
?
'<a class="logTips" href="javascript:;" >
查看<span style="display:none;">'
+
data
+
'</span></a>'
:
"无"
;
return
data
?
'<a class="logTips" href="javascript:;" >
'
+
I18n
.
system_show
+
'<span style="display:none;">'
+
data
+
'</span></a>'
:
I18n
.
system_empty
;
}
},
{
...
...
@@ -184,9 +178,9 @@ $(function() {
// better support expression or string, not function
return
function
()
{
if
(
row
.
triggerCode
==
200
){
var
temp
=
'<a href="javascript:;" class="logDetail" _id="'
+
row
.
id
+
'">
执行日志
</a>'
;
var
temp
=
'<a href="javascript:;" class="logDetail" _id="'
+
row
.
id
+
'">
'
+
I18n
.
joblog_rolling_log
+
'
</a>'
;
if
(
row
.
handleCode
==
0
){
temp
+=
'<br><a href="javascript:;" class="logKill" _id="'
+
row
.
id
+
'" style="color: red;" >
终止任务
</a>'
;
temp
+=
'<br><a href="javascript:;" class="logKill" _id="'
+
row
.
id
+
'" style="color: red;" >
'
+
I18n
.
joblog_kill_log
+
'
</a>'
;
}
return
temp
;
}
...
...
@@ -195,30 +189,30 @@ $(function() {
}
}
],
"language"
:
{
"sProcessing"
:
"处理中..."
,
"sLengthMenu"
:
"每页 _MENU_ 条记录"
,
"sZeroRecords"
:
"没有匹配结果"
,
"sInfo"
:
"第 _PAGE_ 页 ( 总共 _PAGES_ 页,_TOTAL_ 条记录 )"
,
"sInfoEmpty"
:
"无记录"
,
"sInfoFiltered"
:
"(由 _MAX_ 项结果过滤)"
,
"sInfoPostFix"
:
""
,
"sSearch"
:
"搜索:"
,
"sUrl"
:
""
,
"sEmptyTable"
:
"表中数据为空"
,
"sLoadingRecords"
:
"载入中..."
,
"sInfoThousands"
:
","
,
"oPaginate"
:
{
"sFirst"
:
"首页"
,
"sPrevious"
:
"上页"
,
"sNext"
:
"下页"
,
"sLast"
:
"末页"
},
"oAria"
:
{
"sSortAscending"
:
": 以升序排列此列"
,
"sSortDescending"
:
": 以降序排列此列"
}
}
"language"
:
{
"sProcessing"
:
I18n
.
dataTable_sProcessing
,
"sLengthMenu"
:
I18n
.
dataTable_sLengthMenu
,
"sZeroRecords"
:
I18n
.
dataTable_sZeroRecords
,
"sInfo"
:
I18n
.
dataTable_sInfo
,
"sInfoEmpty"
:
I18n
.
dataTable_sInfoEmpty
,
"sInfoFiltered"
:
I18n
.
dataTable_sInfoFiltered
,
"sInfoPostFix"
:
""
,
"sSearch"
:
I18n
.
dataTable_sSearch
,
"sUrl"
:
""
,
"sEmptyTable"
:
I18n
.
dataTable_sEmptyTable
,
"sLoadingRecords"
:
I18n
.
dataTable_sLoadingRecords
,
"sInfoThousands"
:
","
,
"oPaginate"
:
{
"sFirst"
:
I18n
.
dataTable_sFirst
,
"sPrevious"
:
I18n
.
dataTable_sPrevious
,
"sNext"
:
I18n
.
dataTable_sNext
,
"sLast"
:
I18n
.
dataTable_sLast
},
"oAria"
:
{
"sSortAscending"
:
I18n
.
dataTable_sSortAscending
,
"sSortDescending"
:
I18n
.
dataTable_sSortDescending
}
}
});
// logTips alert
...
...
@@ -246,7 +240,7 @@ $(function() {
$
(
'#joblog_list'
).
on
(
'click'
,
'.logKill'
,
function
(){
var
_id
=
$
(
this
).
attr
(
'_id'
);
layer
.
confirm
(
'确认主动终止任务?'
,
{
icon
:
3
,
title
:
'系统提示'
},
function
(
index
){
layer
.
confirm
(
(
I18n
.
system_ok
+
I18n
.
joblog_kill_log
+
'?'
),
{
icon
:
3
,
title
:
I18n
.
system_tips
},
function
(
index
){
layer
.
close
(
index
);
$
.
ajax
({
...
...
@@ -257,8 +251,8 @@ $(function() {
success
:
function
(
data
){
if
(
data
.
code
==
200
)
{
layer
.
open
({
title
:
'系统提示'
,
content
:
'操作成功'
,
title
:
I18n
.
system_tips
,
content
:
I18n
.
system_opt_suc
,
icon
:
'1'
,
end
:
function
(
layero
,
index
){
logTable
.
fnDraw
();
...
...
@@ -266,8 +260,8 @@ $(function() {
});
}
else
{
layer
.
open
({
title
:
'系统提示'
,
content
:
(
data
.
msg
||
"操作失败"
),
title
:
I18n
.
system_tips
,
content
:
(
data
.
msg
||
I18n
.
system_opt_fail
),
icon
:
'2'
});
}
...
...
@@ -302,8 +296,8 @@ $(function() {
if
(
data
.
code
==
"200"
)
{
$
(
'#clearLogModal'
).
modal
(
'hide'
);
layer
.
open
({
title
:
'系统提示'
,
content
:
'日志清理成功'
,
title
:
I18n
.
system_tips
,
content
:
(
I18n
.
joblog_clean_log
+
I18n
.
system_success
)
,
icon
:
'1'
,
end
:
function
(
layero
,
index
){
logTable
.
fnDraw
();
...
...
@@ -311,8 +305,8 @@ $(function() {
});
}
else
{
layer
.
open
({
title
:
'系统提示'
,
content
:
(
data
.
msg
||
"日志清理失败"
),
title
:
I18n
.
system_tips
,
content
:
(
data
.
msg
||
(
I18n
.
joblog_clean_log
+
I18n
.
system_fail
)
),
icon
:
'2'
});
}
...
...
@@ -335,7 +329,7 @@ var ComAlertTec = {
'<div class="modal-body"><div class="alert" style="color:#fff;"></div></div>'
+
'<div class="modal-footer">'
+
'<div class="text-center" >'
+
'<button type="button" class="btn btn-info ok" data-dismiss="modal" >
确认
</button>'
+
'<button type="button" class="btn btn-info ok" data-dismiss="modal" >
'
+
I18n
.
system_ok
+
'
</button>'
+
'</div>'
+
'</div>'
+
'</div>'
+
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论