소스 검색

交互优化

xueli.xue 9 년 전
부모
커밋
900c7e3bb1

BIN
doc/XXL-JOB1.3.x用户手册.docx 파일 보기


+ 4 - 3
xxl-job-admin/src/main/java/com/xxl/job/controller/JobInfoController.java 파일 보기

76
 	@ResponseBody
76
 	@ResponseBody
77
 	public ReturnT<String> add(String jobGroup, String jobName, String jobCron, String jobDesc,
77
 	public ReturnT<String> add(String jobGroup, String jobName, String jobCron, String jobDesc,
78
 			String handler_address, String handler_name, String handler_params, 
78
 			String handler_address, String handler_name, String handler_params, 
79
-			String author, String alarmEmail, int alarmThreshold, int glueSwitch) {
79
+			String author, String alarmEmail, int alarmThreshold, 
80
+			int glueSwitch, String glueSource, String glueRemark) {
80
 		
81
 		
81
 		// valid
82
 		// valid
82
 		if (JobGroupEnum.match(jobGroup) == null) {
83
 		if (JobGroupEnum.match(jobGroup) == null) {
134
 		jobInfo.setAlarmEmail(alarmEmail);
135
 		jobInfo.setAlarmEmail(alarmEmail);
135
 		jobInfo.setAlarmThreshold(alarmThreshold);
136
 		jobInfo.setAlarmThreshold(alarmThreshold);
136
 		jobInfo.setGlueSwitch(glueSwitch);
137
 		jobInfo.setGlueSwitch(glueSwitch);
137
-		jobInfo.setGlueSource(null);
138
-		jobInfo.setGlueRemark(null);
138
+		jobInfo.setGlueSource(glueSource);
139
+		jobInfo.setGlueRemark(glueRemark);
139
 		xxlJobInfoDao.save(jobInfo);
140
 		xxlJobInfoDao.save(jobInfo);
140
 		
141
 		
141
 		try {
142
 		try {

+ 0 - 24
xxl-job-admin/src/main/webapp/WEB-INF/template/jobcode/index.ftl 파일 보기

71
 	                    	<div class="input-group-btn">
71
 	                    	<div class="input-group-btn">
72
 	                      		<button type="button" class="btn btn-primary" id="save" >保存</button>
72
 	                      		<button type="button" class="btn btn-primary" id="save" >保存</button>
73
 	                    	</div>
73
 	                    	</div>
74
-	                    	<div class="input-group-btn">
75
-	                      		<button type="button" class="btn btn-default" id="demoCode_btn" >DEMO</button>
76
-	                    	</div>
77
 	                  	</div>
74
 	                  	</div>
78
 		            </div>
75
 		            </div>
79
 	          	</div>
76
 	          	</div>
90
 		<!-- footer -->
87
 		<!-- footer -->
91
 		<@netCommon.commonFooter />
88
 		<@netCommon.commonFooter />
92
 	</div>
89
 	</div>
93
-
94
-<textarea id="demoCode" style="display:none;" >
95
-package com.xxl.job.service.handler;
96
-
97
-import org.slf4j.Logger;
98
-import org.slf4j.LoggerFactory;
99
-
100
-import com.xxl.job.client.handler.IJobHandler;
101
-import com.xxl.job.client.handler.IJobHandler.JobHandleStatus;
102
-
103
-public class DemoJobHandler extends IJobHandler {
104
-	private static transient Logger logger = LoggerFactory.getLogger(DemoJobHandler.class);
105
-	
106
-	@Override
107
-	public JobHandleStatus handle(String... params) throws Exception {
108
-		logger.info("XXL-JOB, Hello World.");
109
-		return JobHandleStatus.SUCCESS;
110
-	}
111
-	
112
-}
113
-</textarea>
114
 	
90
 	
115
 <@netCommon.comAlert />
91
 <@netCommon.comAlert />
116
 <@netCommon.commonScript />
92
 <@netCommon.commonScript />

+ 23 - 0
xxl-job-admin/src/main/webapp/WEB-INF/template/jobinfo/index.ftl 파일 보기

154
 	                    	</div>
154
 	                    	</div>
155
 						</div>
155
 						</div>
156
 					</div>
156
 					</div>
157
+
158
+<input type="hidden" name="glueRemark" value="GLUE代码初始化" >
159
+<textarea name="glueSource" style="display:none;" >
160
+package com.xxl.job.service.handler;
161
+
162
+import org.slf4j.Logger;
163
+import org.slf4j.LoggerFactory;
164
+
165
+import com.xxl.job.client.handler.IJobHandler;
166
+import com.xxl.job.client.handler.IJobHandler.JobHandleStatus;
167
+
168
+public class DemoJobHandler extends IJobHandler {
169
+	private static transient Logger logger = LoggerFactory.getLogger(DemoJobHandler.class);
170
+	
171
+	@Override
172
+	public JobHandleStatus handle(String... params) throws Exception {
173
+		logger.info("XXL-JOB, Hello World.");
174
+		return JobHandleStatus.SUCCESS;
175
+	}
176
+	
177
+}
178
+</textarea>
179
+					
157
 				</form>
180
 				</form>
158
          	</div>
181
          	</div>
159
 		</div>
182
 		</div>

+ 0 - 5
xxl-job-admin/src/main/webapp/static/js/jobcode.index.1.js 파일 보기

14
 		codeEditor.setValue( temp );
14
 		codeEditor.setValue( temp );
15
 	});
15
 	});
16
 	
16
 	
17
-	// democode
18
-	$("#demoCode_btn").click(function() {
19
-		codeEditor.setValue( $("#demoCode").val() );
20
-	});
21
-	
22
 	// editor height
17
 	// editor height
23
 	var height = Math.max(document.documentElement.clientHeight, document.body.offsetHeight);
18
 	var height = Math.max(document.documentElement.clientHeight, document.body.offsetHeight);
24
 	$(".CodeMirror").attr('style', 'height:'+ height +'px');
19
 	$(".CodeMirror").attr('style', 'height:'+ height +'px');

+ 1 - 1
xxl-job-admin/src/main/webapp/static/js/joblog.index.1.js 파일 보기

113
 		                		}
113
 		                		}
114
 		                		
114
 		                		
115
 		                		if (row.triggerStatus == 'SUCCESS'){
115
 		                		if (row.triggerStatus == 'SUCCESS'){
116
-		                			var temp = '<a href="javascript:;" class="logDetail" _id="'+ row.id +'">查看日志</a>';
116
+		                			var temp = '<a href="javascript:;" class="logDetail" _id="'+ row.id +'">执行日志</a>';
117
 		                			if(!row.handleStatus){
117
 		                			if(!row.handleStatus){
118
 		                				temp += '<br><a href="javascript:;" class="logKill" _id="'+ row.id +'">终止任务</a>';
118
 		                				temp += '<br><a href="javascript:;" class="logKill" _id="'+ row.id +'">终止任务</a>';
119
 		                			}
119
 		                			}