浏览代码

任务日志展示优化

xuxueli 8 年前
父节点
当前提交
9330dcb020

+ 1 - 1
xxl-job-admin/src/main/webapp/WEB-INF/template/jobinfo/jobinfo.index.ftl 查看文件

@@ -59,7 +59,7 @@
59 59
 			<div class="row">
60 60
 				<div class="col-xs-12">
61 61
 					<div class="box">
62
-			            <div class="box-header">
62
+			            <div class="box-header hide">
63 63
 			            	<h3 class="box-title">调度列表</h3>
64 64
 			            </div>
65 65
 			            <div class="box-body" >

+ 5 - 3
xxl-job-admin/src/main/webapp/WEB-INF/template/joblog/joblog.index.ftl 查看文件

@@ -80,12 +80,14 @@
80 80
 					                	<th name="id" >id</th>
81 81
                                         <th name="jobGroup" >执行器ID</th>
82 82
 					                	<th name="jobId" >任务ID</th>
83
+                                        <th name="JobKey" >JobKey</th>
84
+										<#--<th name="executorAddress" >执行器地址</th>
85
+										<th name="glueType" >运行模式</th>
86
+                                      	<th name="executorParam" >任务参数</th>-->
87
+                                        <th name="JobInfo" >任务信息</th>
83 88
                                         <th name="triggerTime" >调度时间</th>
84 89
                                         <th name="triggerCode" >调度结果</th>
85 90
                                         <th name="triggerMsg" >调度备注</th>
86
-					                  	<th name="executorAddress" >执行器地址</th>
87
-                                        <th name="glueType" >运行模式</th>
88
-					                  	<th name="executorParam" >任务参数</th>
89 91
 					                  	<th name="handleTime" >执行时间</th>
90 92
 					                  	<th name="handleCode" >执行结果</th>
91 93
 					                  	<th name="handleMsg" >执行备注</th>

+ 50 - 19
xxl-job-admin/src/main/webapp/static/js/joblog.index.1.js 查看文件

@@ -92,6 +92,56 @@ $(function() {
92 92
 					{ "data": 'jobGroup', "visible" : false},
93 93
 	                { "data": 'jobId', "visible" : false},
94 94
 					{
95
+						"data": 'JobKey',
96
+						"visible" : true,
97
+						"render": function ( data, type, row ) {
98
+							var jobKey = row.jobGroup + "_" + row.jobId;
99
+							return jobKey;
100
+						}
101
+					},
102
+					// { "data": 'executorAddress', "visible" : true},
103
+					// {
104
+					// 	"data": 'glueType',
105
+					//  	"visible" : true,
106
+					// 	"render": function ( data, type, row ) {
107
+					// 		if ('GLUE_GROOVY'==row.glueType) {
108
+					// 			return "GLUE模式(Java)";
109
+					// 		} else if ('GLUE_SHELL'==row.glueType) {
110
+					// 		 	return "GLUE模式(Shell)";
111
+					// 		} else if ('GLUE_PYTHON'==row.glueType) {
112
+					// 			return "GLUE模式(Python)";
113
+					// 		} else if ('BEAN'==row.glueType) {
114
+					// 		 	return "BEAN模式:" + row.executorHandler;
115
+					// 		}
116
+					// 		return row.executorHandler;
117
+					// 	 }
118
+					// },
119
+					// { "data": 'executorParam', "visible" : true},
120
+					{
121
+						"data": 'JobInfo',
122
+						"visible" : true,
123
+						"render": function ( data, type, row ) {
124
+
125
+							var glueTypeTitle = row.glueType;
126
+							if ('GLUE_GROOVY'==row.glueType) {
127
+								glueTypeTitle = "GLUE模式(Java)";
128
+							} else if ('GLUE_SHELL'==row.glueType) {
129
+								glueTypeTitle = "GLUE模式(Shell)";
130
+							} else if ('GLUE_PYTHON'==row.glueType) {
131
+								glueTypeTitle = "GLUE模式(Python)";
132
+							} else if ('BEAN'==row.glueType) {
133
+								glueTypeTitle = "BEAN模式:" + row.executorHandler;
134
+							}
135
+
136
+							var temp = '';
137
+							temp += '执行器地址:' + row.executorAddress;
138
+							temp += '<br>运行模式:' + glueTypeTitle;
139
+							temp += '<br>任务参数:' + row.executorParam;
140
+
141
+							return temp;
142
+						}
143
+					},
144
+					{
95 145
 						"data": 'triggerTime',
96 146
 						"render": function ( data, type, row ) {
97 147
 							return data?moment(new Date(data)).format("YYYY-MM-DD HH:mm:ss"):"";
@@ -110,25 +160,6 @@ $(function() {
110 160
 							return data?'<a class="logTips" href="javascript:;" >查看<span style="display:none;">'+ data +'</span></a>':"无";
111 161
 						}
112 162
 					},
113
-	                { "data": 'executorAddress', "visible" : true},
114
-					{
115
-						"data": 'glueType',
116
-						"visible" : true,
117
-						"render": function ( data, type, row ) {
118
-							if ('GLUE_GROOVY'==row.glueType) {
119
-								return "GLUE模式(Java)";
120
-							} else if ('GLUE_SHELL'==row.glueType) {
121
-								return "GLUE模式(Shell)";
122
-							} else if ('GLUE_PYTHON'==row.glueType) {
123
-								return "GLUE模式(Python)";
124
-							} else if ('BEAN'==row.glueType) {
125
-								return "BEAN模式:" + row.executorHandler;
126
-							}
127
-							return row.executorHandler;
128
-						}
129
-					},
130
-	                { "data": 'executorParam', "visible" : true},
131
-
132 163
 	                { 
133 164
 	                	"data": 'handleTime',
134 165
 	                	"render": function ( data, type, row ) {