Parcourir la source

任务日志界面操作国际化迁移完成

xuxueli il y a 8 ans
Parent
révision
c2f3a827b0

+ 2 - 0
xxl-job-admin/src/main/java/com/xxl/job/admin/controller/JobLogController.java Voir le fichier

@@ -10,6 +10,7 @@ import com.xxl.job.admin.dao.XxlJobLogDao;
10 10
 import com.xxl.job.core.biz.ExecutorBiz;
11 11
 import com.xxl.job.core.biz.model.LogResult;
12 12
 import com.xxl.job.core.biz.model.ReturnT;
13
+import com.xxl.job.core.glue.GlueTypeEnum;
13 14
 import com.xxl.job.core.rpc.netcom.NetComClientProxy;
14 15
 import org.apache.commons.lang3.StringUtils;
15 16
 import org.apache.commons.lang3.time.DateUtils;
@@ -50,6 +51,7 @@ public class JobLogController {
50 51
 		// 执行器列表
51 52
 		List<XxlJobGroup> jobGroupList =  xxlJobGroupDao.findAll();
52 53
 		model.addAttribute("JobGroupList", jobGroupList);
54
+		model.addAttribute("GlueTypeEnum", GlueTypeEnum.values());
53 55
 
54 56
 		// 任务
55 57
 		if (jobId > 0) {

+ 40 - 3
xxl-job-admin/src/main/resources/i18n/message.properties Voir le fichier

@@ -18,14 +18,21 @@ system_add_suc=新增成功
18 18
 system_add_fail=新增失败
19 19
 system_update_suc=更新成功
20 20
 system_update_fail=更新失败
21
+system_all=全部
22
+system_api_error=接口异常
23
+system_show=查看
24
+system_empty=无
25
+system_opt_suc=操作成功
26
+system_opt_fail=操作失败
21 27
 
22 28
 ## daterangepicker
29
+daterangepicker_ranges_recent_hour=最近一小时
23 30
 daterangepicker_ranges_today=今日
24 31
 daterangepicker_ranges_yesterday=昨日
25 32
 daterangepicker_ranges_this_month=本月
26 33
 daterangepicker_ranges_last_month=上个月
27
-daterangepicker_ranges_recent_week=最近1
28
-daterangepicker_ranges_recent_month=最近1
34
+daterangepicker_ranges_recent_week=最近
35
+daterangepicker_ranges_recent_month=最近
29 36
 daterangepicker_custom_name=自定义
30 37
 daterangepicker_custom_starttime=起始时间
31 38
 daterangepicker_custom_endtime=结束时间
@@ -87,13 +94,14 @@ job_dashboard_rate_report_fail_count=失败调度次数
87 94
 
88 95
 ## job info
89 96
 jobinfo_name=任务管理
97
+jobinfo_job=任务
90 98
 jobinfo_field_add=新增任务
91 99
 jobinfo_field_update=更新任务
92 100
 jobinfo_field_id=任务ID
93 101
 jobinfo_field_jobgroup=执行器
94 102
 jobinfo_field_jobdesc=任务描述
95 103
 jobinfo_field_gluetype=运行模式
96
-jobinfo_field_executorparam=执行参数
104
+jobinfo_field_executorparam=任务参数
97 105
 jobinfo_field_author=负责人
98 106
 jobinfo_field_alarmemail=报警邮件
99 107
 jobinfo_field_alarmemail_placeholder=请输入报警邮件,多个邮件地址则逗号分隔
@@ -114,6 +122,35 @@ jobinfo_opt_del=删除
114 122
 
115 123
 ## job log
116 124
 joblog_name=调度日志
125
+joblog_status=状态
126
+joblog_status_all=全部
127
+joblog_status_suc=成功
128
+joblog_status_fail=失败
129
+joblog_status_running=进行中
130
+joblog_field_triggerTime=调度时间
131
+joblog_field_triggerCode=调度结果
132
+joblog_field_triggerMsg=调度备注
133
+joblog_field_handleTime=执行时间
134
+joblog_field_handleCode=执行结果
135
+joblog_field_handleMsg=执行备注
136
+joblog_field_executorAddress=执行器地址
137
+joblog_clean=清理
138
+joblog_clean_log=日志清理
139
+joblog_clean_type=清理方式
140
+joblog_clean_type_1=清理一个月之前日志数据
141
+joblog_clean_type_2=清理三个月之前日志数据
142
+joblog_clean_type_3=清理六个月之前日志数据
143
+joblog_clean_type_4=清理一年之前日志数据
144
+joblog_clean_type_5=清理一千条以前日志数据
145
+joblog_clean_type_6=清理一万条以前日志数据
146
+joblog_clean_type_7=清理三万条以前日志数据
147
+joblog_clean_type_8=清理十万条以前日志数据
148
+joblog_clean_type_9=清理所有日志数据
149
+joblog_handleCode_200=成功
150
+joblog_handleCode_500=失败
151
+joblog_handleCode_501=失败重试
152
+joblog_rolling_log=执行日志
153
+joblog_kill_log=终止任务
117 154
 
118 155
 ## job group
119 156
 jobgroup_name=执行器管理

+ 41 - 41
xxl-job-admin/src/main/webapp/WEB-INF/template/joblog/joblog.index.ftl Voir le fichier

@@ -21,12 +21,6 @@
21 21
 		<!-- Content Header (Page header) -->
22 22
 		<section class="content-header">
23 23
 			<h1>${I18n.joblog_name}</h1>
24
-			<!--
25
-			<ol class="breadcrumb">
26
-				<li><a><i class="fa fa-dashboard"></i>调度日志</a></li>
27
-				<li class="active">调度管理</li>
28
-			</ol>
29
-			-->
30 24
 		</section>
31 25
 		
32 26
 		<!-- Main content -->
@@ -34,9 +28,9 @@
34 28
 	    	<div class="row">
35 29
 	    		<div class="col-xs-2">
36 30
  					<div class="input-group">
37
-	                	<span class="input-group-addon">执行器</span>
31
+	                	<span class="input-group-addon">${I18n.jobinfo_field_jobgroup}</span>
38 32
                 		<select class="form-control" id="jobGroup"  paramVal="<#if jobInfo?exists>${jobInfo.jobGroup}</#if>" >
39
-                            <option value="0" >全部</option>
33
+                            <option value="0" >${I18n.system_all}</option>
40 34
                 			<#list JobGroupList as group>
41 35
                 				<option value="${group.id}" >${group.title}</option>
42 36
                 			</#list>
@@ -45,21 +39,21 @@
45 39
 	            </div>
46 40
 	            <div class="col-xs-2">
47 41
 	              	<div class="input-group">
48
-	                	<span class="input-group-addon">任务</span>
42
+	                	<span class="input-group-addon">${I18n.jobinfo_job}</span>
49 43
                         <select class="form-control" id="jobId" paramVal="<#if jobInfo?exists>${jobInfo.id}</#if>" >
50
-                            <option value="0" >全部</option>
44
+                            <option value="0" >${I18n.system_all}</option>
51 45
 						</select>
52 46
 	              	</div>
53 47
 	            </div>
54 48
 
55 49
                 <div class="col-xs-2">
56 50
                     <div class="input-group">
57
-                        <span class="input-group-addon">状态</span>
51
+                        <span class="input-group-addon">${I18n.joblog_status}</span>
58 52
                         <select class="form-control" id="logStatus" >
59
-                            <option value="-1" >全部</option>
60
-                            <option value="1" >成功</option>
61
-                            <option value="2" >失败</option>
62
-                            <option value="3" >进行中</option>
53
+                            <option value="-1" >${I18n.joblog_status_all}</option>
54
+                            <option value="1" >${I18n.joblog_status_suc}</option>
55
+                            <option value="2" >${I18n.joblog_status_fail}</option>
56
+                            <option value="3" >${I18n.joblog_status_running}</option>
63 57
                         </select>
64 58
                     </div>
65 59
                 </div>
@@ -74,11 +68,11 @@
74 68
 	            </div>
75 69
 
76 70
                 <div class="col-xs-1">
77
-                    <button class="btn btn-block btn-info" id="searchBtn">搜索</button>
71
+                    <button class="btn btn-block btn-info" id="searchBtn">${I18n.system_search}</button>
78 72
                 </div>
79 73
 
80 74
 	            <div class="col-xs-1">
81
-                    <button class="btn btn-block btn-nomal" id="clearLog">清理</button>
75
+                    <button class="btn btn-block btn-nomal" id="clearLog">${I18n.joblog_clean}</button>
82 76
 	            </div>
83 77
           	</div>
84 78
 			
@@ -90,18 +84,18 @@
90 84
 			              	<table id="joblog_list" class="table table-bordered table-striped display" width="100%" >
91 85
 				                <thead>
92 86
 					            	<tr>
93
-                                        <th name="jobId" >任务ID</th>
94
-                                        <th name="jobGroup" >执行器ID</th>
87
+                                        <th name="jobId" >${I18n.jobinfo_field_id}</th>
88
+                                        <th name="jobGroup" >jobGroup</th>
95 89
 										<#--<th name="executorAddress" >执行器地址</th>
96 90
 										<th name="glueType" >运行模式</th>
97 91
                                       	<th name="executorParam" >任务参数</th>-->
98
-                                        <th name="triggerTime" >调度时间</th>
99
-                                        <th name="triggerCode" >调度结果</th>
100
-                                        <th name="triggerMsg" >调度备注</th>
101
-					                  	<th name="handleTime" >执行时间</th>
102
-					                  	<th name="handleCode" >执行结果</th>
103
-					                  	<th name="handleMsg" >执行备注</th>
104
-					                  	<th name="handleMsg" >操作</th>
92
+                                        <th name="triggerTime" >${I18n.joblog_field_triggerTime}</th>
93
+                                        <th name="triggerCode" >${I18n.joblog_field_triggerCode}</th>
94
+                                        <th name="triggerMsg" >${I18n.joblog_field_triggerMsg}</th>
95
+					                  	<th name="handleTime" >${I18n.joblog_field_handleTime}</th>
96
+					                  	<th name="handleCode" >${I18n.joblog_field_handleCode}</th>
97
+					                  	<th name="handleMsg" >${I18n.joblog_field_handleMsg}</th>
98
+					                  	<th name="handleMsg" >${I18n.system_opt}</th>
105 99
 					                </tr>
106 100
 				                </thead>
107 101
 				                <tbody></tbody>
@@ -122,12 +116,12 @@
122 116
     <div class="modal-dialog">
123 117
         <div class="modal-content">
124 118
             <div class="modal-header">
125
-                <h4 class="modal-title" >日志清理</h4>
119
+                <h4 class="modal-title" >${I18n.joblog_clean_log}</h4>
126 120
             </div>
127 121
             <div class="modal-body">
128 122
                 <form class="form-horizontal form" role="form" >
129 123
                     <div class="form-group">
130
-                        <label class="col-sm-3 control-label"">执行器:</label>
124
+                        <label class="col-sm-3 control-label"">${I18n.jobinfo_field_jobgroup}:</label>
131 125
                         <div class="col-sm-9">
132 126
                             <input type="text" class="form-control jobGroupText" readonly >
133 127
 							<input type="hidden" name="jobGroup" >
@@ -135,7 +129,7 @@
135 129
                     </div>
136 130
 
137 131
                     <div class="form-group">
138
-                        <label class="col-sm-3 control-label"">任务:</label>
132
+                        <label class="col-sm-3 control-label"">${I18n.jobinfo_job}:</label>
139 133
                         <div class="col-sm-9">
140 134
                             <input type="text" class="form-control jobIdText" readonly >
141 135
                             <input type="hidden" name="jobId" >
@@ -143,18 +137,18 @@
143 137
                     </div>
144 138
 
145 139
                     <div class="form-group">
146
-                        <label class="col-sm-3 control-label"">清理类型:</label>
140
+                        <label class="col-sm-3 control-label"">${I18n.joblog_clean_type}:</label>
147 141
                         <div class="col-sm-9">
148 142
                             <select class="form-control" name="type" >
149
-                                <option value="1" >清理一个月之前日志数据</option>
150
-                                <option value="2" >清理三个月之前日志数据</option>
151
-                                <option value="3" >清理六个月之前日志数据</option>
152
-                                <option value="4" >清理一年之前日志数据</option>
153
-                                <option value="5" >清理一千条以前日志数据</option>
154
-                                <option value="6" >清理一万条以前日志数据</option>
155
-                                <option value="7" >清理三万条以前日志数据</option>
156
-                                <option value="8" >清理十万条以前日志数据</option>
157
-                                <option value="9" >清理所有日志数据</option>
143
+                                <option value="1" >${I18n.joblog_clean_type_1}</option>
144
+                                <option value="2" >${I18n.joblog_clean_type_2}</option>
145
+                                <option value="3" >${I18n.joblog_clean_type_3}</option>
146
+                                <option value="4" >${I18n.joblog_clean_type_4}</option>
147
+                                <option value="5" >${I18n.joblog_clean_type_5}</option>
148
+                                <option value="6" >${I18n.joblog_clean_type_6}</option>
149
+                                <option value="7" >${I18n.joblog_clean_type_7}</option>
150
+                                <option value="8" >${I18n.joblog_clean_type_8}</option>
151
+                                <option value="9" >${I18n.joblog_clean_type_9}</option>
158 152
                             </select>
159 153
                         </div>
160 154
                     </div>
@@ -162,8 +156,8 @@
162 156
                     <hr>
163 157
                     <div class="form-group">
164 158
                         <div class="col-sm-offset-3 col-sm-6">
165
-                            <button type="button" class="btn btn-primary ok" >确定</button>
166
-                            <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
159
+                            <button type="button" class="btn btn-primary ok" >${I18n.system_ok}</button>
160
+                            <button type="button" class="btn btn-default" data-dismiss="modal">${I18n.system_cancel}</button>
167 161
                         </div>
168 162
                     </div>
169 163
                 </form>
@@ -173,6 +167,12 @@
173 167
 </div>
174 168
 
175 169
 <@netCommon.commonScript />
170
+<script>
171
+    var GlueTypeEnum = {};
172
+    <#list GlueTypeEnum as item>
173
+    GlueTypeEnum['${item}'] = '${item.desc}';
174
+    </#list>
175
+</script>
176 176
 <!-- DataTables -->
177 177
 <script src="${request.contextPath}/static/adminlte/plugins/datatables/jquery.dataTables.min.js"></script>
178 178
 <script src="${request.contextPath}/static/adminlte/plugins/datatables/dataTables.bootstrap.min.js"></script>

+ 4 - 7
xxl-job-admin/src/main/webapp/static/js/index.js Voir le fichier

@@ -4,16 +4,13 @@
4 4
 $(function () {
5 5
 
6 6
     // filter Time
7
-    var _startDate = moment().subtract(1, 'months');    // default,recent_month
8
-    var _endDate = moment();
9
-
10 7
     var rangesConf = {};
11 8
     rangesConf[I18n.daterangepicker_ranges_today] = [moment().startOf('day'), moment().endOf('day')];
12 9
     rangesConf[I18n.daterangepicker_ranges_yesterday] = [moment().subtract(1, 'days').startOf('day'), moment().subtract(1, 'days').endOf('day')];
13 10
     rangesConf[I18n.daterangepicker_ranges_this_month] = [moment().startOf('month'), moment().endOf('month')];
14 11
     rangesConf[I18n.daterangepicker_ranges_last_month] = [moment().subtract(1, 'months').startOf('month'), moment().subtract(1, 'months').endOf('month')];
15 12
     rangesConf[I18n.daterangepicker_ranges_recent_week] = [moment().subtract(1, 'weeks'), moment()];
16
-    rangesConf[I18n.daterangepicker_ranges_recent_month] = [_startDate, _endDate];
13
+    rangesConf[I18n.daterangepicker_ranges_recent_month] = [moment().subtract(1, 'months'), moment()];
17 14
 
18 15
     $('#filterTime').daterangepicker({
19 16
         autoApply:false,
@@ -36,12 +33,12 @@ $(function () {
36 33
             monthNames : I18n.daterangepicker_custom_monthnames.split(',') ,        // '一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'
37 34
             firstDay : 1
38 35
         },
39
-        startDate:_startDate,
40
-        endDate: _endDate
36
+        startDate: rangesConf[I18n.daterangepicker_ranges_recent_month][0] ,
37
+        endDate: rangesConf[I18n.daterangepicker_ranges_recent_month][1]
41 38
     }, function (start, end, label) {
42 39
         freshChartDate(start, end);
43 40
     });
44
-    freshChartDate(_startDate, _endDate);
41
+    freshChartDate(rangesConf[I18n.daterangepicker_ranges_recent_month][0], rangesConf[I18n.daterangepicker_ranges_recent_month][1]);
45 42
 
46 43
     /**
47 44
      * fresh Chart Date

+ 75 - 81
xxl-job-admin/src/main/webapp/static/js/joblog.index.1.js Voir le fichier

@@ -11,7 +11,7 @@ $(function() {
11 11
 			dataType : "json",
12 12
 			success : function(data){
13 13
 				if (data.code == 200) {
14
-					$("#jobId").html('<option value="0" >全部</option>');
14
+					$("#jobId").html( '<option value="0" >'+ I18n.system_all +'</option>' );
15 15
 					$.each(data.content, function (n, value) {
16 16
                         $("#jobId").append('<option value="' + value.id + '" >' + value.jobDesc + '</option>');
17 17
                     });
@@ -20,8 +20,8 @@ $(function() {
20 20
                     }
21 21
 				} else {
22 22
 					layer.open({
23
-						title: '系统提示',
24
-						content: (data.msg || "接口异常"),
23
+						title: I18n.system_tips ,
24
+						content: (data.msg || I18n.system_api_error ),
25 25
 						icon: '2'
26 26
 					});
27 27
 				}
@@ -34,6 +34,15 @@ $(function() {
34 34
 	}
35 35
 
36 36
 	// filter Time
37
+    var rangesConf = {};
38
+    rangesConf[I18n.daterangepicker_ranges_recent_hour] = [moment().subtract(1, 'hours'), moment()];
39
+    rangesConf[I18n.daterangepicker_ranges_today] = [moment().startOf('day'), moment().endOf('day')];
40
+    rangesConf[I18n.daterangepicker_ranges_yesterday] = [moment().subtract(1, 'days').startOf('day'), moment().subtract(1, 'days').endOf('day')];
41
+    rangesConf[I18n.daterangepicker_ranges_this_month] = [moment().startOf('month'), moment().endOf('month')];
42
+    rangesConf[I18n.daterangepicker_ranges_last_month] = [moment().subtract(1, 'months').startOf('month'), moment().subtract(1, 'months').endOf('month')];
43
+    rangesConf[I18n.daterangepicker_ranges_recent_week] = [moment().subtract(1, 'weeks'), moment()];
44
+    rangesConf[I18n.daterangepicker_ranges_recent_month] = [moment().subtract(1, 'months'), moment()];
45
+
37 46
 	$('#filterTime').daterangepicker({
38 47
         autoApply:false,
39 48
         singleDatePicker:false,
@@ -42,29 +51,21 @@ $(function() {
42 51
 		timePickerIncrement: 10, 	// 时间的增量,单位为分钟
43 52
         timePicker24Hour : true,
44 53
         opens : 'left', //日期选择框的弹出位置
45
-		ranges: {
46
-			'最近1小时': [moment().subtract(1, 'hours'), moment()],
47
-			'今日': [moment().startOf('day'), moment().endOf('day')],
48
-			'昨日': [moment().subtract(1, 'days').startOf('day'), moment().subtract(1, 'days').endOf('day')],
49
-			'最近7日': [moment().subtract(6, 'days'), moment()],
50
-			'最近30日': [moment().subtract(29, 'days'), moment()],
51
-			'本月': [moment().startOf('month'), moment().endOf('month')],
52
-			'上个月': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
53
-		},
54
+		ranges: rangesConf,
54 55
         locale : {
55 56
             format: 'YYYY-MM-DD HH:mm:ss',
56 57
             separator : ' - ',
57
-        	customRangeLabel : '自定义',
58
-            applyLabel : '确定',
59
-            cancelLabel : '取消',
60
-            fromLabel : '起始时间',
61
-            toLabel : '结束时间',
62
-            daysOfWeek : [ '日', '一', '二', '三', '四', '五', '六' ],
63
-            monthNames : [ '一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月' ],
64
-            firstDay : 1,
65
-            startDate: moment().startOf('day'),
66
-            endDate: moment().endOf('day')
67
-        }
58
+            customRangeLabel : I18n.daterangepicker_custom_name ,
59
+            applyLabel : I18n.system_ok ,
60
+            cancelLabel : I18n.system_cancel ,
61
+            fromLabel : I18n.daterangepicker_custom_starttime ,
62
+            toLabel : I18n.daterangepicker_custom_endtime ,
63
+            daysOfWeek : I18n.daterangepicker_custom_daysofweek.split(',') ,        // '日', '一', '二', '三', '四', '五', '六'
64
+            monthNames : I18n.daterangepicker_custom_monthnames.split(',') ,        // '一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'
65
+            firstDay : 1
66
+        },
67
+        startDate: rangesConf[I18n.daterangepicker_ranges_today][0],
68
+        endDate: rangesConf[I18n.daterangepicker_ranges_today][1]
68 69
 	});
69 70
 
70 71
 	// init date tables
@@ -94,23 +95,16 @@ $(function() {
94 95
 						"visible" : true,
95 96
                         "width":'10%',
96 97
 						"render": function ( data, type, row ) {
97
-							var glueTypeTitle = row.glueType;
98
-							if ('GLUE_GROOVY'==row.glueType) {
99
-								glueTypeTitle = "GLUE模式(Java)";
100
-							} else if ('GLUE_SHELL'==row.glueType) {
101
-								glueTypeTitle = "GLUE模式(Shell)";
102
-							} else if ('GLUE_PYTHON'==row.glueType) {
103
-								glueTypeTitle = "GLUE模式(Python)";
104
-							}else if ('GLUE_NODEJS'==row.glueType) {
105
-								glueTypeTitle = "GLUE模式(Nodejs)";
106
-							} else if ('BEAN'==row.glueType) {
107
-								glueTypeTitle = "BEAN模式:" + row.executorHandler;
108
-							}
98
+
99
+                            var glueTypeTitle = GlueTypeEnum[row.glueType];
100
+                            if (row.executorHandler) {
101
+                                glueTypeTitle = glueTypeTitle +":" + row.executorHandler;
102
+                            }
109 103
 
110 104
 							var temp = '';
111
-							temp += '执行器地址:' + (row.executorAddress?row.executorAddress:'');
112
-							temp += '<br>运行模式:' + glueTypeTitle;
113
-							temp += '<br>任务参数:' + row.executorParam;
105
+							temp += I18n.joblog_field_executorAddress + ':' + (row.executorAddress?row.executorAddress:'');
106
+							temp += '<br>'+ I18n.jobinfo_field_gluetype +':' + glueTypeTitle;
107
+							temp += '<br>'+ I18n.jobinfo_field_executorparam +':' + row.executorParam;
114 108
 
115 109
 							return '<a class="logTips" href="javascript:;" >'+ row.jobId +'<span style="display:none;">'+ temp +'</span></a>';
116 110
 						}
@@ -129,9 +123,9 @@ $(function() {
129 123
 						"render": function ( data, type, row ) {
130 124
 							var html = data;
131 125
 							if (data == 200) {
132
-								html = '<span style="color: green">成功</span>';
126
+								html = '<span style="color: green">'+ I18n.system_success +'</span>';
133 127
 							} else if (data == 500) {
134
-								html = '<span style="color: red">失败</span>';
128
+								html = '<span style="color: red">'+ I18n.system_fail +'</span>';
135 129
 							} else if (data == 0) {
136 130
                                 html = '';
137 131
 							}
@@ -142,7 +136,7 @@ $(function() {
142 136
 						"data": 'triggerMsg',
143 137
                         "width":'12%',
144 138
 						"render": function ( data, type, row ) {
145
-							return data?'<a class="logTips" href="javascript:;" >查看<span style="display:none;">'+ data +'</span></a>':"无";
139
+							return data?'<a class="logTips" href="javascript:;" >'+ I18n.system_show +'<span style="display:none;">'+ data +'</span></a>':I18n.system_empty;
146 140
 						}
147 141
 					},
148 142
 	                { 
@@ -158,11 +152,11 @@ $(function() {
158 152
 						"render": function ( data, type, row ) {
159 153
                             var html = data;
160 154
                             if (data == 200) {
161
-                                html = '<span style="color: green">成功</span>';
155
+                                html = '<span style="color: green">'+ I18n.joblog_handleCode_200 +'</span>';
162 156
                             } else if (data == 500) {
163
-                                html = '<span style="color: red">失败</span>';
157
+                                html = '<span style="color: red">'+ I18n.joblog_handleCode_500 +'</span>';
164 158
                             } else if (data == 501) {
165
-                                html = '<span style="color: red">失败重试</span>';
159
+                                html = '<span style="color: red">'+ I18n.joblog_handleCode_501 +'</span>';
166 160
                             } else if (data == 0) {
167 161
                                 html = '';
168 162
                             }
@@ -173,7 +167,7 @@ $(function() {
173 167
 	                	"data": 'handleMsg',
174 168
                         "width":'12%',
175 169
 	                	"render": function ( data, type, row ) {
176
-	                		return data?'<a class="logTips" href="javascript:;" >查看<span style="display:none;">'+ data +'</span></a>':"无";
170
+	                		return data?'<a class="logTips" href="javascript:;" >'+ I18n.system_show +'<span style="display:none;">'+ data +'</span></a>':I18n.system_empty;
177 171
 	                	}
178 172
 	                },
179 173
 	                {
@@ -184,9 +178,9 @@ $(function() {
184 178
 	                		// better support expression or string, not function
185 179
 	                		return function () {
186 180
 		                		if (row.triggerCode == 200){
187
-		                			var temp = '<a href="javascript:;" class="logDetail" _id="'+ row.id +'">执行日志</a>';
181
+		                			var temp = '<a href="javascript:;" class="logDetail" _id="'+ row.id +'">'+ I18n.joblog_rolling_log +'</a>';
188 182
 		                			if(row.handleCode == 0){
189
-		                				temp += '<br><a href="javascript:;" class="logKill" _id="'+ row.id +'" style="color: red;" >终止任务</a>';
183
+		                				temp += '<br><a href="javascript:;" class="logKill" _id="'+ row.id +'" style="color: red;" >'+ I18n.joblog_kill_log +'</a>';
190 184
 		                			}
191 185
 		                			return temp;
192 186
 		                		}
@@ -195,30 +189,30 @@ $(function() {
195 189
 	                	}
196 190
 	                }
197 191
 	            ],
198
-		"language" : {
199
-			"sProcessing" : "处理中...",
200
-			"sLengthMenu" : "每页 _MENU_ 条记录",
201
-			"sZeroRecords" : "没有匹配结果",
202
-			"sInfo" : "第 _PAGE_ 页 ( 总共 _PAGES_ 页,_TOTAL_ 条记录 )",
203
-			"sInfoEmpty" : "无记录",
204
-			"sInfoFiltered" : "(由 _MAX_ 项结果过滤)",
205
-			"sInfoPostFix" : "",
206
-			"sSearch" : "搜索:",
207
-			"sUrl" : "",
208
-			"sEmptyTable" : "表中数据为空",
209
-			"sLoadingRecords" : "载入中...",
210
-			"sInfoThousands" : ",",
211
-			"oPaginate" : {
212
-				"sFirst" : "首页",
213
-				"sPrevious" : "上页",
214
-				"sNext" : "下页",
215
-				"sLast" : "末页"
216
-			},
217
-			"oAria" : {
218
-				"sSortAscending" : ": 以升序排列此列",
219
-				"sSortDescending" : ": 以降序排列此列"
220
-			}
221
-		}
192
+        "language" : {
193
+            "sProcessing" : I18n.dataTable_sProcessing ,
194
+            "sLengthMenu" : I18n.dataTable_sLengthMenu ,
195
+            "sZeroRecords" : I18n.dataTable_sZeroRecords ,
196
+            "sInfo" : I18n.dataTable_sInfo ,
197
+            "sInfoEmpty" : I18n.dataTable_sInfoEmpty ,
198
+            "sInfoFiltered" : I18n.dataTable_sInfoFiltered ,
199
+            "sInfoPostFix" : "",
200
+            "sSearch" : I18n.dataTable_sSearch ,
201
+            "sUrl" : "",
202
+            "sEmptyTable" : I18n.dataTable_sEmptyTable ,
203
+            "sLoadingRecords" : I18n.dataTable_sLoadingRecords ,
204
+            "sInfoThousands" : ",",
205
+            "oPaginate" : {
206
+                "sFirst" : I18n.dataTable_sFirst ,
207
+                "sPrevious" : I18n.dataTable_sPrevious ,
208
+                "sNext" : I18n.dataTable_sNext ,
209
+                "sLast" : I18n.dataTable_sLast
210
+            },
211
+            "oAria" : {
212
+                "sSortAscending" : I18n.dataTable_sSortAscending ,
213
+                "sSortDescending" : I18n.dataTable_sSortDescending
214
+            }
215
+        }
222 216
 	});
223 217
 	
224 218
 	// logTips alert
@@ -246,7 +240,7 @@ $(function() {
246 240
 	$('#joblog_list').on('click', '.logKill', function(){
247 241
 		var _id = $(this).attr('_id');
248 242
 
249
-        layer.confirm('确认主动终止任务?', {icon: 3, title:'系统提示'}, function(index){
243
+        layer.confirm( (I18n.system_ok + I18n.joblog_kill_log + '?'), {icon: 3, title: I18n.system_tips }, function(index){
250 244
             layer.close(index);
251 245
 
252 246
             $.ajax({
@@ -257,8 +251,8 @@ $(function() {
257 251
                 success : function(data){
258 252
                     if (data.code == 200) {
259 253
                         layer.open({
260
-                            title: '系统提示',
261
-                            content: '操作成功',
254
+                            title: I18n.system_tips,
255
+                            content: I18n.system_opt_suc ,
262 256
                             icon: '1',
263 257
                             end: function(layero, index){
264 258
                                 logTable.fnDraw();
@@ -266,8 +260,8 @@ $(function() {
266 260
                         });
267 261
                     } else {
268 262
                         layer.open({
269
-                            title: '系统提示',
270
-                            content: (data.msg || "操作失败"),
263
+                            title: I18n.system_tips,
264
+                            content: (data.msg || I18n.system_opt_fail ),
271 265
                             icon: '2'
272 266
                         });
273 267
                     }
@@ -302,8 +296,8 @@ $(function() {
302 296
 			if (data.code == "200") {
303 297
 				$('#clearLogModal').modal('hide');
304 298
 				layer.open({
305
-					title: '系统提示',
306
-					content: '日志清理成功',
299
+					title: I18n.system_tips ,
300
+					content: (I18n.joblog_clean_log + I18n.system_success) ,
307 301
 					icon: '1',
308 302
 					end: function(layero, index){
309 303
 						logTable.fnDraw();
@@ -311,8 +305,8 @@ $(function() {
311 305
 				});
312 306
 			} else {
313 307
 				layer.open({
314
-					title: '系统提示',
315
-					content: (data.msg || "日志清理失败"),
308
+					title: I18n.system_tips ,
309
+					content: (data.msg || (I18n.joblog_clean_log + I18n.system_fail) ),
316 310
 					icon: '2'
317 311
 				});
318 312
 			}
@@ -335,7 +329,7 @@ var ComAlertTec = {
335 329
 			'<div class="modal-body"><div class="alert" style="color:#fff;"></div></div>' +
336 330
 			'<div class="modal-footer">' +
337 331
 			'<div class="text-center" >' +
338
-			'<button type="button" class="btn btn-info ok" data-dismiss="modal" >确认</button>' +
332
+			'<button type="button" class="btn btn-info ok" data-dismiss="modal" >'+ I18n.system_ok +'</button>' +
339 333
 			'</div>' +
340 334
 			'</div>' +
341 335
 			'</div>' +