交互优化

master
xueli.xue 9 years ago
parent f84f4a934b
commit 900c7e3bb1
  1. BIN
      doc/XXL-JOB1.3.x用户手册.docx
  2. 7
      xxl-job-admin/src/main/java/com/xxl/job/controller/JobInfoController.java
  3. 24
      xxl-job-admin/src/main/webapp/WEB-INF/template/jobcode/index.ftl
  4. 23
      xxl-job-admin/src/main/webapp/WEB-INF/template/jobinfo/index.ftl
  5. 5
      xxl-job-admin/src/main/webapp/static/js/jobcode.index.1.js
  6. 2
      xxl-job-admin/src/main/webapp/static/js/joblog.index.1.js

Binary file not shown.

@ -76,7 +76,8 @@ public class JobInfoController {
@ResponseBody
public ReturnT<String> add(String jobGroup, String jobName, String jobCron, String jobDesc,
String handler_address, String handler_name, String handler_params,
String author, String alarmEmail, int alarmThreshold, int glueSwitch) {
String author, String alarmEmail, int alarmThreshold,
int glueSwitch, String glueSource, String glueRemark) {
// valid
if (JobGroupEnum.match(jobGroup) == null) {
@ -134,8 +135,8 @@ public class JobInfoController {
jobInfo.setAlarmEmail(alarmEmail);
jobInfo.setAlarmThreshold(alarmThreshold);
jobInfo.setGlueSwitch(glueSwitch);
jobInfo.setGlueSource(null);
jobInfo.setGlueRemark(null);
jobInfo.setGlueSource(glueSource);
jobInfo.setGlueRemark(glueRemark);
xxlJobInfoDao.save(jobInfo);
try {

@ -71,9 +71,6 @@
<div class="input-group-btn">
<button type="button" class="btn btn-primary" id="save" >保存</button>
</div>
<div class="input-group-btn">
<button type="button" class="btn btn-default" id="demoCode_btn" >DEMO</button>
</div>
</div>
</div>
</div>
@ -90,27 +87,6 @@
<!-- footer -->
<@netCommon.commonFooter />
</div>
<textarea id="demoCode" style="display:none;" >
package com.xxl.job.service.handler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.xxl.job.client.handler.IJobHandler;
import com.xxl.job.client.handler.IJobHandler.JobHandleStatus;
public class DemoJobHandler extends IJobHandler {
private static transient Logger logger = LoggerFactory.getLogger(DemoJobHandler.class);
@Override
public JobHandleStatus handle(String... params) throws Exception {
logger.info("XXL-JOB, Hello World.");
return JobHandleStatus.SUCCESS;
}
}
</textarea>
<@netCommon.comAlert />
<@netCommon.commonScript />

@ -154,6 +154,29 @@
</div>
</div>
</div>
<input type="hidden" name="glueRemark" value="GLUE代码初始化" >
<textarea name="glueSource" style="display:none;" >
package com.xxl.job.service.handler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.xxl.job.client.handler.IJobHandler;
import com.xxl.job.client.handler.IJobHandler.JobHandleStatus;
public class DemoJobHandler extends IJobHandler {
private static transient Logger logger = LoggerFactory.getLogger(DemoJobHandler.class);
@Override
public JobHandleStatus handle(String... params) throws Exception {
logger.info("XXL-JOB, Hello World.");
return JobHandleStatus.SUCCESS;
}
}
</textarea>
</form>
</div>
</div>

@ -14,11 +14,6 @@ $(function() {
codeEditor.setValue( temp );
});
// democode
$("#demoCode_btn").click(function() {
codeEditor.setValue( $("#demoCode").val() );
});
// editor height
var height = Math.max(document.documentElement.clientHeight, document.body.offsetHeight);
$(".CodeMirror").attr('style', 'height:'+ height +'px');

@ -113,7 +113,7 @@ $(function() {
}
if (row.triggerStatus == 'SUCCESS'){
var temp = '<a href="javascript:;" class="logDetail" _id="'+ row.id +'">查看日志</a>';
var temp = '<a href="javascript:;" class="logDetail" _id="'+ row.id +'">执行日志</a>';
if(!row.handleStatus){
temp += '<br><a href="javascript:;" class="logKill" _id="'+ row.id +'">终止任务</a>';
}

Loading…
Cancel
Save