2018-07-09 08:44:52 +08:00
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
2019-03-31 12:56:04 +08:00
|
|
|
|
<head>
|
|
|
|
|
<th:block th:include="include :: header('修改定时任务')" />
|
|
|
|
|
</head>
|
2018-07-09 08:44:52 +08:00
|
|
|
|
<body class="white-bg">
|
|
|
|
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
|
|
|
|
<form class="form-horizontal m" id="form-job-edit" th:object="${job}">
|
|
|
|
|
<input id="jobId" name="jobId" type="hidden" th:field="*{jobId}"/>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label class="col-sm-3 control-label">任务名称:</label>
|
|
|
|
|
<div class="col-sm-8">
|
2019-02-25 13:19:06 +08:00
|
|
|
|
<input class="form-control" type="text" name="jobName" id="jobName" th:field="*{jobName}" required>
|
2018-07-09 08:44:52 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label class="col-sm-3 control-label">任务组名:</label>
|
|
|
|
|
<div class="col-sm-8">
|
2019-02-25 13:19:06 +08:00
|
|
|
|
<input class="form-control" type="text" name="jobGroup" id="jobGroup" th:field="*{jobGroup}" required>
|
2018-07-09 08:44:52 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label class="col-sm-3 control-label ">方法名称:</label>
|
|
|
|
|
<div class="col-sm-8">
|
2019-02-25 13:19:06 +08:00
|
|
|
|
<input class="form-control" type="text" name="methodName" id="methodName" th:field="*{methodName}" required>
|
2018-07-09 08:44:52 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label class="col-sm-3 control-label ">方法参数:</label>
|
|
|
|
|
<div class="col-sm-8">
|
2019-02-25 13:19:06 +08:00
|
|
|
|
<input class="form-control" type="text" name="methodParams" id="methodParams" th:field="*{methodParams}">
|
2018-07-09 08:44:52 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label class="col-sm-3 control-label ">cron表达式:</label>
|
|
|
|
|
<div class="col-sm-8">
|
2019-02-25 13:19:06 +08:00
|
|
|
|
<input class="form-control" type="text" name="cronExpression" id="cronExpression" th:field="*{cronExpression}" required>
|
2018-07-09 08:44:52 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2018-07-20 17:21:43 +08:00
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label class="col-sm-3 control-label">执行策略:</label>
|
|
|
|
|
<div class="col-sm-8">
|
2018-12-01 16:14:19 +08:00
|
|
|
|
<label class="radio-box"> <input type="radio" th:field="*{misfirePolicy}" name="misfirePolicy" value="1" /> 立即执行 </label>
|
|
|
|
|
<label class="radio-box"> <input type="radio" th:field="*{misfirePolicy}" name="misfirePolicy" value="2" /> 执行一次 </label>
|
2018-09-03 08:45:08 +08:00
|
|
|
|
<label class="radio-box"> <input type="radio" th:field="*{misfirePolicy}" name="misfirePolicy" value="3" /> 放弃执行 </label>
|
2018-07-20 17:21:43 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2019-03-13 19:45:12 +08:00
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label class="col-sm-3 control-label">并发执行:</label>
|
|
|
|
|
<div class="col-sm-8">
|
|
|
|
|
<label class="radio-box"> <input type="radio" th:field="*{concurrent}" name="concurrent" value="0"/> 允许 </label>
|
|
|
|
|
<label class="radio-box"> <input type="radio" th:field="*{concurrent}" name="concurrent" value="1"/> 禁止 </label>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2018-07-09 08:44:52 +08:00
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label class="col-sm-3 control-label">状态:</label>
|
2018-08-23 17:06:31 +08:00
|
|
|
|
<div class="col-sm-8">
|
|
|
|
|
<div class="radio-box" th:each="dict : ${@dict.getType('sys_job_status')}">
|
|
|
|
|
<input type="radio" th:id="${dict.dictCode}" name="status" th:value="${dict.dictValue}" th:field="*{status}">
|
|
|
|
|
<label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
2018-07-09 08:44:52 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label class="col-sm-3 control-label">备注:</label>
|
|
|
|
|
<div class="col-sm-8">
|
2018-08-23 20:34:23 +08:00
|
|
|
|
<textarea id="remark" name="remark" class="form-control">[[*{remark}]]</textarea>
|
2018-07-09 08:44:52 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
2019-03-31 12:56:04 +08:00
|
|
|
|
<th:block th:include="include :: footer" />
|
2018-07-09 08:44:52 +08:00
|
|
|
|
<script type="text/javascript">
|
2018-10-05 19:27:24 +08:00
|
|
|
|
var prefix = ctx + "monitor/job";
|
2018-07-09 08:44:52 +08:00
|
|
|
|
|
|
|
|
|
$("#form-job-edit").validate({
|
2019-03-18 11:55:21 +08:00
|
|
|
|
onkeyup: false,
|
2018-07-09 08:44:52 +08:00
|
|
|
|
rules:{
|
|
|
|
|
jobName:{
|
|
|
|
|
required:true,
|
|
|
|
|
},
|
|
|
|
|
jobGroup:{
|
|
|
|
|
required:true,
|
|
|
|
|
},
|
2019-01-18 16:40:56 +08:00
|
|
|
|
methodName:{
|
|
|
|
|
required:true,
|
|
|
|
|
},
|
2018-07-09 08:44:52 +08:00
|
|
|
|
cronExpression:{
|
|
|
|
|
required:true,
|
2018-10-27 21:39:01 +08:00
|
|
|
|
remote: {
|
|
|
|
|
url: prefix + "/checkCronExpressionIsValid",
|
|
|
|
|
type: "post",
|
|
|
|
|
dataType: "json",
|
|
|
|
|
data: {
|
|
|
|
|
"cronExpression": function() {
|
|
|
|
|
return $.common.trim($("#cronExpression").val());
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
dataFilter: function(data, type) {
|
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
}
|
2018-07-09 08:44:52 +08:00
|
|
|
|
},
|
2018-10-27 21:39:01 +08:00
|
|
|
|
},
|
|
|
|
|
messages: {
|
|
|
|
|
"cronExpression": {
|
|
|
|
|
remote: "表达式不正确"
|
|
|
|
|
}
|
2019-02-25 13:19:06 +08:00
|
|
|
|
},
|
|
|
|
|
focusCleanup: true
|
2018-07-09 08:44:52 +08:00
|
|
|
|
});
|
2018-10-03 21:44:14 +08:00
|
|
|
|
|
|
|
|
|
function submitHandler() {
|
2018-10-03 23:11:09 +08:00
|
|
|
|
if ($.validate.form()) {
|
2018-10-03 21:44:14 +08:00
|
|
|
|
$.operate.save(prefix + "/edit", $('#form-job-edit').serialize());
|
|
|
|
|
}
|
|
|
|
|
}
|
2018-07-09 08:44:52 +08:00
|
|
|
|
</script>
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|