|
|
@ -11,7 +11,7 @@ $(function() {
|
|
|
|
dataType : "json",
|
|
|
|
dataType : "json",
|
|
|
|
success : function(data){
|
|
|
|
success : function(data){
|
|
|
|
if (data.code == 200) {
|
|
|
|
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) {
|
|
|
|
$.each(data.content, function (n, value) {
|
|
|
|
$("#jobId").append('<option value="' + value.id + '" >' + value.jobDesc + '</option>');
|
|
|
|
$("#jobId").append('<option value="' + value.id + '" >' + value.jobDesc + '</option>');
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -20,8 +20,8 @@ $(function() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
layer.open({
|
|
|
|
layer.open({
|
|
|
|
title: '系统提示',
|
|
|
|
title: I18n.system_tips ,
|
|
|
|
content: (data.msg || "接口异常"),
|
|
|
|
content: (data.msg || I18n.system_api_error ),
|
|
|
|
icon: '2'
|
|
|
|
icon: '2'
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -34,6 +34,15 @@ $(function() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// filter Time
|
|
|
|
// 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({
|
|
|
|
$('#filterTime').daterangepicker({
|
|
|
|
autoApply:false,
|
|
|
|
autoApply:false,
|
|
|
|
singleDatePicker:false,
|
|
|
|
singleDatePicker:false,
|
|
|
@ -42,29 +51,21 @@ $(function() {
|
|
|
|
timePickerIncrement: 10, // 时间的增量,单位为分钟
|
|
|
|
timePickerIncrement: 10, // 时间的增量,单位为分钟
|
|
|
|
timePicker24Hour : true,
|
|
|
|
timePicker24Hour : true,
|
|
|
|
opens : 'left', //日期选择框的弹出位置
|
|
|
|
opens : 'left', //日期选择框的弹出位置
|
|
|
|
ranges: {
|
|
|
|
ranges: rangesConf,
|
|
|
|
'最近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')]
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
locale : {
|
|
|
|
locale : {
|
|
|
|
format: 'YYYY-MM-DD HH:mm:ss',
|
|
|
|
format: 'YYYY-MM-DD HH:mm:ss',
|
|
|
|
separator : ' - ',
|
|
|
|
separator : ' - ',
|
|
|
|
customRangeLabel : '自定义',
|
|
|
|
customRangeLabel : I18n.daterangepicker_custom_name ,
|
|
|
|
applyLabel : '确定',
|
|
|
|
applyLabel : I18n.system_ok ,
|
|
|
|
cancelLabel : '取消',
|
|
|
|
cancelLabel : I18n.system_cancel ,
|
|
|
|
fromLabel : '起始时间',
|
|
|
|
fromLabel : I18n.daterangepicker_custom_starttime ,
|
|
|
|
toLabel : '结束时间',
|
|
|
|
toLabel : I18n.daterangepicker_custom_endtime ,
|
|
|
|
daysOfWeek : [ '日', '一', '二', '三', '四', '五', '六' ],
|
|
|
|
daysOfWeek : I18n.daterangepicker_custom_daysofweek.split(',') , // '日', '一', '二', '三', '四', '五', '六'
|
|
|
|
monthNames : [ '一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月' ],
|
|
|
|
monthNames : I18n.daterangepicker_custom_monthnames.split(',') , // '一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'
|
|
|
|
firstDay : 1,
|
|
|
|
firstDay : 1
|
|
|
|
startDate: moment().startOf('day'),
|
|
|
|
},
|
|
|
|
endDate: moment().endOf('day')
|
|
|
|
startDate: rangesConf[I18n.daterangepicker_ranges_today][0],
|
|
|
|
}
|
|
|
|
endDate: rangesConf[I18n.daterangepicker_ranges_today][1]
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
// init date tables
|
|
|
|
// init date tables
|
|
|
@ -94,23 +95,16 @@ $(function() {
|
|
|
|
"visible" : true,
|
|
|
|
"visible" : true,
|
|
|
|
"width":'10%',
|
|
|
|
"width":'10%',
|
|
|
|
"render": function ( data, type, row ) {
|
|
|
|
"render": function ( data, type, row ) {
|
|
|
|
var glueTypeTitle = row.glueType;
|
|
|
|
|
|
|
|
if ('GLUE_GROOVY'==row.glueType) {
|
|
|
|
var glueTypeTitle = GlueTypeEnum[row.glueType];
|
|
|
|
glueTypeTitle = "GLUE模式(Java)";
|
|
|
|
if (row.executorHandler) {
|
|
|
|
} else if ('GLUE_SHELL'==row.glueType) {
|
|
|
|
glueTypeTitle = glueTypeTitle +":" + row.executorHandler;
|
|
|
|
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 temp = '';
|
|
|
|
var temp = '';
|
|
|
|
temp += '执行器地址:' + (row.executorAddress?row.executorAddress:'');
|
|
|
|
temp += I18n.joblog_field_executorAddress + ':' + (row.executorAddress?row.executorAddress:'');
|
|
|
|
temp += '<br>运行模式:' + glueTypeTitle;
|
|
|
|
temp += '<br>'+ I18n.jobinfo_field_gluetype +':' + glueTypeTitle;
|
|
|
|
temp += '<br>任务参数:' + row.executorParam;
|
|
|
|
temp += '<br>'+ I18n.jobinfo_field_executorparam +':' + row.executorParam;
|
|
|
|
|
|
|
|
|
|
|
|
return '<a class="logTips" href="javascript:;" >'+ row.jobId +'<span style="display:none;">'+ temp +'</span></a>';
|
|
|
|
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 ) {
|
|
|
|
"render": function ( data, type, row ) {
|
|
|
|
var html = data;
|
|
|
|
var html = data;
|
|
|
|
if (data == 200) {
|
|
|
|
if (data == 200) {
|
|
|
|
html = '<span style="color: green">成功</span>';
|
|
|
|
html = '<span style="color: green">'+ I18n.system_success +'</span>';
|
|
|
|
} else if (data == 500) {
|
|
|
|
} else if (data == 500) {
|
|
|
|
html = '<span style="color: red">失败</span>';
|
|
|
|
html = '<span style="color: red">'+ I18n.system_fail +'</span>';
|
|
|
|
} else if (data == 0) {
|
|
|
|
} else if (data == 0) {
|
|
|
|
html = '';
|
|
|
|
html = '';
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -142,7 +136,7 @@ $(function() {
|
|
|
|
"data": 'triggerMsg',
|
|
|
|
"data": 'triggerMsg',
|
|
|
|
"width":'12%',
|
|
|
|
"width":'12%',
|
|
|
|
"render": function ( data, type, row ) {
|
|
|
|
"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 ) {
|
|
|
|
"render": function ( data, type, row ) {
|
|
|
|
var html = data;
|
|
|
|
var html = data;
|
|
|
|
if (data == 200) {
|
|
|
|
if (data == 200) {
|
|
|
|
html = '<span style="color: green">成功</span>';
|
|
|
|
html = '<span style="color: green">'+ I18n.joblog_handleCode_200 +'</span>';
|
|
|
|
} else if (data == 500) {
|
|
|
|
} else if (data == 500) {
|
|
|
|
html = '<span style="color: red">失败</span>';
|
|
|
|
html = '<span style="color: red">'+ I18n.joblog_handleCode_500 +'</span>';
|
|
|
|
} else if (data == 501) {
|
|
|
|
} else if (data == 501) {
|
|
|
|
html = '<span style="color: red">失败重试</span>';
|
|
|
|
html = '<span style="color: red">'+ I18n.joblog_handleCode_501 +'</span>';
|
|
|
|
} else if (data == 0) {
|
|
|
|
} else if (data == 0) {
|
|
|
|
html = '';
|
|
|
|
html = '';
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -173,7 +167,7 @@ $(function() {
|
|
|
|
"data": 'handleMsg',
|
|
|
|
"data": 'handleMsg',
|
|
|
|
"width":'12%',
|
|
|
|
"width":'12%',
|
|
|
|
"render": function ( data, type, row ) {
|
|
|
|
"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
|
|
|
|
// better support expression or string, not function
|
|
|
|
return function () {
|
|
|
|
return function () {
|
|
|
|
if (row.triggerCode == 200){
|
|
|
|
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){
|
|
|
|
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;
|
|
|
|
return temp;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -196,27 +190,27 @@ $(function() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
],
|
|
|
|
"language" : {
|
|
|
|
"language" : {
|
|
|
|
"sProcessing" : "处理中...",
|
|
|
|
"sProcessing" : I18n.dataTable_sProcessing ,
|
|
|
|
"sLengthMenu" : "每页 _MENU_ 条记录",
|
|
|
|
"sLengthMenu" : I18n.dataTable_sLengthMenu ,
|
|
|
|
"sZeroRecords" : "没有匹配结果",
|
|
|
|
"sZeroRecords" : I18n.dataTable_sZeroRecords ,
|
|
|
|
"sInfo" : "第 _PAGE_ 页 ( 总共 _PAGES_ 页,_TOTAL_ 条记录 )",
|
|
|
|
"sInfo" : I18n.dataTable_sInfo ,
|
|
|
|
"sInfoEmpty" : "无记录",
|
|
|
|
"sInfoEmpty" : I18n.dataTable_sInfoEmpty ,
|
|
|
|
"sInfoFiltered" : "(由 _MAX_ 项结果过滤)",
|
|
|
|
"sInfoFiltered" : I18n.dataTable_sInfoFiltered ,
|
|
|
|
"sInfoPostFix" : "",
|
|
|
|
"sInfoPostFix" : "",
|
|
|
|
"sSearch" : "搜索:",
|
|
|
|
"sSearch" : I18n.dataTable_sSearch ,
|
|
|
|
"sUrl" : "",
|
|
|
|
"sUrl" : "",
|
|
|
|
"sEmptyTable" : "表中数据为空",
|
|
|
|
"sEmptyTable" : I18n.dataTable_sEmptyTable ,
|
|
|
|
"sLoadingRecords" : "载入中...",
|
|
|
|
"sLoadingRecords" : I18n.dataTable_sLoadingRecords ,
|
|
|
|
"sInfoThousands" : ",",
|
|
|
|
"sInfoThousands" : ",",
|
|
|
|
"oPaginate" : {
|
|
|
|
"oPaginate" : {
|
|
|
|
"sFirst" : "首页",
|
|
|
|
"sFirst" : I18n.dataTable_sFirst ,
|
|
|
|
"sPrevious" : "上页",
|
|
|
|
"sPrevious" : I18n.dataTable_sPrevious ,
|
|
|
|
"sNext" : "下页",
|
|
|
|
"sNext" : I18n.dataTable_sNext ,
|
|
|
|
"sLast" : "末页"
|
|
|
|
"sLast" : I18n.dataTable_sLast
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"oAria" : {
|
|
|
|
"oAria" : {
|
|
|
|
"sSortAscending" : ": 以升序排列此列",
|
|
|
|
"sSortAscending" : I18n.dataTable_sSortAscending ,
|
|
|
|
"sSortDescending" : ": 以降序排列此列"
|
|
|
|
"sSortDescending" : I18n.dataTable_sSortDescending
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -246,7 +240,7 @@ $(function() {
|
|
|
|
$('#joblog_list').on('click', '.logKill', function(){
|
|
|
|
$('#joblog_list').on('click', '.logKill', function(){
|
|
|
|
var _id = $(this).attr('_id');
|
|
|
|
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);
|
|
|
|
layer.close(index);
|
|
|
|
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
$.ajax({
|
|
|
@ -257,8 +251,8 @@ $(function() {
|
|
|
|
success : function(data){
|
|
|
|
success : function(data){
|
|
|
|
if (data.code == 200) {
|
|
|
|
if (data.code == 200) {
|
|
|
|
layer.open({
|
|
|
|
layer.open({
|
|
|
|
title: '系统提示',
|
|
|
|
title: I18n.system_tips,
|
|
|
|
content: '操作成功',
|
|
|
|
content: I18n.system_opt_suc ,
|
|
|
|
icon: '1',
|
|
|
|
icon: '1',
|
|
|
|
end: function(layero, index){
|
|
|
|
end: function(layero, index){
|
|
|
|
logTable.fnDraw();
|
|
|
|
logTable.fnDraw();
|
|
|
@ -266,8 +260,8 @@ $(function() {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
layer.open({
|
|
|
|
layer.open({
|
|
|
|
title: '系统提示',
|
|
|
|
title: I18n.system_tips,
|
|
|
|
content: (data.msg || "操作失败"),
|
|
|
|
content: (data.msg || I18n.system_opt_fail ),
|
|
|
|
icon: '2'
|
|
|
|
icon: '2'
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -302,8 +296,8 @@ $(function() {
|
|
|
|
if (data.code == "200") {
|
|
|
|
if (data.code == "200") {
|
|
|
|
$('#clearLogModal').modal('hide');
|
|
|
|
$('#clearLogModal').modal('hide');
|
|
|
|
layer.open({
|
|
|
|
layer.open({
|
|
|
|
title: '系统提示',
|
|
|
|
title: I18n.system_tips ,
|
|
|
|
content: '日志清理成功',
|
|
|
|
content: (I18n.joblog_clean_log + I18n.system_success) ,
|
|
|
|
icon: '1',
|
|
|
|
icon: '1',
|
|
|
|
end: function(layero, index){
|
|
|
|
end: function(layero, index){
|
|
|
|
logTable.fnDraw();
|
|
|
|
logTable.fnDraw();
|
|
|
@ -311,8 +305,8 @@ $(function() {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
layer.open({
|
|
|
|
layer.open({
|
|
|
|
title: '系统提示',
|
|
|
|
title: I18n.system_tips ,
|
|
|
|
content: (data.msg || "日志清理失败"),
|
|
|
|
content: (data.msg || (I18n.joblog_clean_log + I18n.system_fail) ),
|
|
|
|
icon: '2'
|
|
|
|
icon: '2'
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -335,7 +329,7 @@ var ComAlertTec = {
|
|
|
|
'<div class="modal-body"><div class="alert" style="color:#fff;"></div></div>' +
|
|
|
|
'<div class="modal-body"><div class="alert" style="color:#fff;"></div></div>' +
|
|
|
|
'<div class="modal-footer">' +
|
|
|
|
'<div class="modal-footer">' +
|
|
|
|
'<div class="text-center" >' +
|
|
|
|
'<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>' +
|
|
|
|
'</div>' +
|
|
|
|
'</div>' +
|
|
|
|
'</div>' +
|
|
|
|