交互优化

v1.3
xueli.xue 9 years ago
parent f84f4a934b
commit 900c7e3bb1

Binary file not shown.

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

@ -71,9 +71,6 @@
<div class="input-group-btn"> <div class="input-group-btn">
<button type="button" class="btn btn-primary" id="save" >保存</button> <button type="button" class="btn btn-primary" id="save" >保存</button>
</div> </div>
<div class="input-group-btn">
<button type="button" class="btn btn-default" id="demoCode_btn" >DEMO</button>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -91,27 +88,6 @@
<@netCommon.commonFooter /> <@netCommon.commonFooter />
</div> </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.comAlert />
<@netCommon.commonScript /> <@netCommon.commonScript />
<script src="${request.contextPath}/static/plugins/codemirror/lib/codemirror.js"></script> <script src="${request.contextPath}/static/plugins/codemirror/lib/codemirror.js"></script>

@ -154,6 +154,29 @@
</div> </div>
</div> </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> </form>
</div> </div>
</div> </div>

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

@ -113,7 +113,7 @@ $(function() {
} }
if (row.triggerStatus == 'SUCCESS'){ 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){ if(!row.handleStatus){
temp += '<br><a href="javascript:;" class="logKill" _id="'+ row.id +'">终止任务</a>'; temp += '<br><a href="javascript:;" class="logKill" _id="'+ row.id +'">终止任务</a>';
} }

Loading…
Cancel
Save