From 248053ee8e27c4de27adce0ea67dda8be2a1b197 Mon Sep 17 00:00:00 2001 From: skyjilygao Date: Wed, 17 Jul 2024 18:29:20 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat:=E6=97=A5=E5=BF=97=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E2=80=9D=E6=89=A7=E8=A1=8C=E5=99=A8=E2=80=9C?= =?UTF-8?q?=E5=88=97=EF=BC=8C=E5=B9=B6=E5=A2=9E=E5=8A=A0=E8=B7=B3=E8=BD=AC?= =?UTF-8?q?=E5=88=B0=E7=9B=B8=E5=BA=94=E6=89=A7=E8=A1=8C=E5=99=A8=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E5=88=97=E8=A1=A8=E3=80=82=E6=96=B9=E4=BE=BF=E6=9B=B4?= =?UTF-8?q?=E5=BF=AB=E6=89=BE=E5=88=B0=E4=BB=BB=E5=8A=A1=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/static/js/joblog.index.1.js | 244 ++++++++++-------- .../templates/joblog/joblog.index.ftl | 2 +- 2 files changed, 132 insertions(+), 114 deletions(-) diff --git a/xxl-job-admin/src/main/resources/static/js/joblog.index.1.js b/xxl-job-admin/src/main/resources/static/js/joblog.index.1.js index e0fc3f20ba..d67a96a126 100644 --- a/xxl-job-admin/src/main/resources/static/js/joblog.index.1.js +++ b/xxl-job-admin/src/main/resources/static/js/joblog.index.1.js @@ -92,126 +92,137 @@ $(function() { "ordering": false, //"scrollX": false, "columns": [ - { - "data": 'jobId', - "visible" : true, - "width":'10%', - "render": function ( data, type, row ) { + { + "data": 'jobId', + "visible" : true, + "width":'5%', + "render": function ( data, type, row ) { - var jobhandler = ''; - if (row.executorHandler) { - jobhandler = "
JobHandler:" + row.executorHandler; - } + var jobhandler = ''; + if (row.executorHandler) { + jobhandler = "
JobHandler:" + row.executorHandler; + } - var temp = ''; - temp += I18n.joblog_field_executorAddress + ':' + (row.executorAddress?row.executorAddress:''); - temp += jobhandler; - temp += '
'+ I18n.jobinfo_field_executorparam +':' + row.executorParam; + var temp = ''; + temp += I18n.joblog_field_executorAddress + ':' + (row.executorAddress?row.executorAddress:''); + temp += jobhandler; + temp += '
'+ I18n.jobinfo_field_executorparam +':' + row.executorParam; - return ''+ row.jobId +''+ temp +''; - } - }, - { "data": 'jobGroup', "visible" : false}, - { - "data": 'triggerTime', - "width":'20%', - "render": function ( data, type, row ) { - return data?moment(data).format("YYYY-MM-DD HH:mm:ss"):""; - } - }, - { - "data": 'triggerCode', - "width":'10%', - "render": function ( data, type, row ) { - var html = data; - if (data == 200) { - html = ''+ I18n.system_success +''; - } else if (data == 500) { - html = ''+ I18n.system_fail +''; - } else if (data == 0) { - html = ''; - } - return html; - } - }, - { - "data": 'triggerMsg', - "width":'10%', - "render": function ( data, type, row ) { - return data?''+ I18n.system_show +''+ data +'':I18n.system_empty; - } - }, - { - "data": 'handleTime', - "width":'20%', - "render": function ( data, type, row ) { - return data?moment(data).format("YYYY-MM-DD HH:mm:ss"):""; - } - }, - { - "data": 'handleCode', - "width":'10%', - "render": function ( data, type, row ) { - var html = data; - if (data == 200) { - html = ''+ I18n.joblog_handleCode_200 +''; - } else if (data == 500) { - html = ''+ I18n.joblog_handleCode_500 +''; - } else if (data == 502) { - html = ''+ I18n.joblog_handleCode_502 +''; - } else if (data == 0) { - html = ''; - } - return html; - } - }, - { - "data": 'handleMsg', - "width":'10%', - "render": function ( data, type, row ) { - return data?''+ I18n.system_show +''+ data +'':I18n.system_empty; - } - }, - { - "data": 'handleMsg' , - "bSortable": false, - "width":'10%', - "render": function ( data, type, row ) { - // better support expression or string, not function - return function () { - if (row.triggerCode == 200 || row.handleCode != 0){ + return ''+ row.jobId +''+ temp +''; + } + }, + { + "data": 'jobGroup', + "visible": true, + "width":'5%', + "render": function(data, type, row) { + return function() { + var temp = '' + + row.jobGroup + ''; + return temp; + } + } + }, + { + "data": 'triggerTime', + "width":'20%', + "render": function ( data, type, row ) { + return data?moment(data).format("YYYY-MM-DD HH:mm:ss"):""; + } + }, + { + "data": 'triggerCode', + "width":'10%', + "render": function ( data, type, row ) { + var html = data; + if (data == 200) { + html = ''+ I18n.system_success +''; + } else if (data == 500) { + html = ''+ I18n.system_fail +''; + } else if (data == 0) { + html = ''; + } + return html; + } + }, + { + "data": 'triggerMsg', + "width":'10%', + "render": function ( data, type, row ) { + return data?''+ I18n.system_show +''+ data +'':I18n.system_empty; + } + }, + { + "data": 'handleTime', + "width":'20%', + "render": function ( data, type, row ) { + return data?moment(data).format("YYYY-MM-DD HH:mm:ss"):""; + } + }, + { + "data": 'handleCode', + "width":'10%', + "render": function ( data, type, row ) { + var html = data; + if (data == 200) { + html = ''+ I18n.joblog_handleCode_200 +''; + } else if (data == 500) { + html = ''+ I18n.joblog_handleCode_500 +''; + } else if (data == 502) { + html = ''+ I18n.joblog_handleCode_502 +''; + } else if (data == 0) { + html = ''; + } + return html; + } + }, + { + "data": 'handleMsg', + "width":'10%', + "render": function ( data, type, row ) { + return data?''+ I18n.system_show +''+ data +'':I18n.system_empty; + } + }, + { + "data": 'handleMsg' , + "bSortable": false, + "width":'10%', + "render": function ( data, type, row ) { + // better support expression or string, not function + return function () { + if (row.triggerCode == 200 || row.handleCode != 0){ - /*var temp = ''+ I18n.joblog_rolling_log +''; - if(row.handleCode == 0){ - temp += '
'+ I18n.joblog_kill_log +''; - }*/ - //return temp; + /*var temp = ''+ I18n.joblog_rolling_log +''; + if(row.handleCode == 0){ + temp += '
'+ I18n.joblog_kill_log +''; + }*/ + //return temp; - var logKillDiv = ''; - if(row.handleCode == 0){ - logKillDiv = '
  • \n' + - '
  • '+ I18n.joblog_kill_log +'
  • \n'; - } + var logKillDiv = ''; + if(row.handleCode == 0){ + logKillDiv = '
  • \n' + + '
  • '+ I18n.joblog_kill_log +'
  • \n'; + } - var html = '
    \n' + - ' \n' + - ' \n' + - ' \n' + - '
    '; + var html = '
    \n' + + ' \n' + + ' \n' + + ' \n' + + '
    '; - return html; - } - return null; - } - } - } - ], + return html; + } + return null; + } + } + } + ], "language" : { "sProcessing" : I18n.dataTable_sProcessing , "sLengthMenu" : I18n.dataTable_sLengthMenu , @@ -254,6 +265,13 @@ $(function() { logTable.fnDraw(); }); + // toJobGroup look + $('#joblog_list').on('click', '.toJobGroup', function() { + var _id = $(this).attr('_jobGroupId'); + window.location.href = base_url + '/jobinfo?jobGroup=' + _id; + return; + }); + // logDetail look $('#joblog_list').on('click', '.logDetail', function(){ var _id = $(this).attr('_id'); diff --git a/xxl-job-admin/src/main/resources/templates/joblog/joblog.index.ftl b/xxl-job-admin/src/main/resources/templates/joblog/joblog.index.ftl index a2e983de89..a6b3614911 100644 --- a/xxl-job-admin/src/main/resources/templates/joblog/joblog.index.ftl +++ b/xxl-job-admin/src/main/resources/templates/joblog/joblog.index.ftl @@ -87,7 +87,7 @@ ${I18n.jobinfo_field_id} - jobGroup + ${I18n.jobinfo_field_jobgroup} <#--执行器地址 运行模式 任务参数--> From 9f6c880022999ce7163b123f5d0f81f48188cfad Mon Sep 17 00:00:00 2001 From: skyjilygao Date: Thu, 18 Jul 2024 16:10:52 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat:=E6=89=A7=E8=A1=8C=E5=99=A8=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E4=B8=AD=EF=BC=8C=E6=AF=8F=E6=9D=A1AppName=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E8=B6=85=E9=93=BE=E6=8E=A5=E8=B7=B3=E8=BD=AC=E5=88=B0?= =?UTF-8?q?=E8=AF=A5=E6=89=A7=E8=A1=8C=E5=99=A8=E6=89=80=E5=B1=9E=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/static/js/jobgroup.index.1.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xxl-job-admin/src/main/resources/static/js/jobgroup.index.1.js b/xxl-job-admin/src/main/resources/static/js/jobgroup.index.1.js index 0e5b23565f..f9fed442ea 100644 --- a/xxl-job-admin/src/main/resources/static/js/jobgroup.index.1.js +++ b/xxl-job-admin/src/main/resources/static/js/jobgroup.index.1.js @@ -28,7 +28,10 @@ $(function() { { "data": 'appname', "visible" : true, - "width":'30%' + "width":'30%', + "render": function ( data, type, row ) { + return '['+row.id+'] '+row.appname+''; + } }, { "data": 'title',