<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('定时任务详细')" />
</head>
<body class="white-bg">
	<div class="wrapper wrapper-content animated fadeInRight ibox-content">
	
	<form class="form-horizontal m-t" id="jobLogForm" th:if="${name == 'jobLog'}">
	    <div class="ibox">
	        <div class="ibox-title">
	            <h5><i class="fa fa-tasks"></i> 定时任务执行日志详情</h5>
	        </div>
	        <div class="ibox-content">
	            <div class="row">
	                <div class="col-sm-6">
	                    <h4><i class="fa fa-info-circle text-info"></i> 基础信息</h4>
	                    <hr/>
	                    <div class="form-group">
	                        <label class="col-sm-4 control-label"><i class="fa fa-hashtag"></i> 日志序号：</label>
	                        <div class="col-sm-8 form-control-static" th:text="${jobLog.jobLogId}"></div>
	                    </div>
	                    <div class="form-group">
	                        <label class="col-sm-4 control-label"><i class="fa fa-font"></i> 任务名称：</label>
	                        <div class="col-sm-8 form-control-static" th:text="${jobLog.jobName}"></div>
	                    </div>
	                    <div class="form-group">
	                        <label class="col-sm-4 control-label"><i class="fa fa-object-group"></i> 任务分组：</label>
	                        <div class="col-sm-8 form-control-static" th:text="${@dict.getLabel('sys_job_group', jobLog.jobGroup)}"></div>
	                    </div>
	                    <div class="form-group">
	                        <label class="col-sm-4 control-label"><i class="fa fa-flag"></i> 执行状态：</label>
	                        <div class="col-sm-8">
	                            <span th:if="${jobLog.status == '0'}" class="label label-primary"><i class="fa fa-check"></i> 正常</span>
	                            <span th:if="${jobLog.status == '1'}" class="label label-danger"><i class="fa fa-close"></i> 失败</span>
	                        </div>
	                    </div>
	                </div>
	
	                <div class="col-sm-6">
	                    <h4><i class="fa fa-clock-o text-success"></i> 执行时间线</h4>
	                    <hr/>
	                    <div class="form-group">
	                        <label class="col-sm-4 control-label"><i class="fa fa-play-circle"></i> 开始时间：</label>
	                        <div class="col-sm-8 form-control-static" th:text="${#dates.format(jobLog.startTime, 'yyyy-MM-dd HH:mm:ss')}"></div>
	                    </div>
	                    <div class="form-group">
	                        <label class="col-sm-4 control-label"><i class="fa fa-stop-circle"></i> 结束时间：</label>
	                        <div class="col-sm-8 form-control-static" th:text="${#dates.format(jobLog.endTime, 'yyyy-MM-dd HH:mm:ss')}"></div>
	                    </div>
	                    <div class="form-group">
	                        <label class="col-sm-4 control-label"><i class="fa fa-calendar-plus-o"></i> 记录时间：</label>
	                        <div class="col-sm-8 form-control-static" th:text="${#dates.format(jobLog.createTime, 'yyyy-MM-dd HH:mm:ss')}"></div>
	                    </div>
	                    <div class="form-group" th:if="${jobLog.status == '0'}">
	                        <label class="col-sm-4 control-label"><i class="fa fa-rocket"></i> 执行耗时：</label>
	                        <div class="col-sm-8 form-control-static">
	                            <span th:text="${(jobLog.endTime.time - jobLog.startTime.time)} + ' 毫秒'" class="text-info"></span>
	                        </div>
	                    </div>
	                </div>
	            </div>
	            
 
	            <div class="row">
	                <div class="col-sm-12">
	                    <h4><i class="fa fa-code text-warning"></i> 执行方法</h4>
	                    <hr/>
	                    <div class="form-group">
	                        <label class="col-sm-2 control-label"><i class="fa fa-code"></i> 调用目标：</label>
	                        <div class="col-sm-10">
	                            <div class="well well-sm" style="margin-bottom: 0;" th:text="${jobLog.invokeTarget}"></div>
	                        </div>
	                    </div>
	
	                    <div class="form-group" th:if="${jobLog.status == '1'}">
	                        <label class="col-sm-2 control-label"><i class="fa fa-exclamation-triangle text-danger"></i> 异常信息：</label>
	                        <div class="col-sm-10">
	                            <pre class="alert alert-danger" style="border: none; margin-bottom: 0; white-space: pre-wrap; word-break: break-all;" th:text="${jobLog.exceptionInfo}"></pre>
	                        </div>
	                    </div>
	                </div>
					
	                <div class="col-sm-12">
	                    <h4><i class="fa fa-file-text-o text-warning"></i> 日志详情</h4>
	                    <hr/>
	                    <div class="form-group">
	                        <label class="col-sm-2 control-label"><i class="fa fa-commenting"></i> 日志信息：</label>
	                        <div class="col-sm-10">
	                            <div class="well well-sm" style="margin-bottom: 0;" th:text="${jobLog.jobMessage}">
	                            </div>
	                        </div>
	                    </div>
	
	                    <div class="form-group" th:if="${jobLog.status == '1'}">
	                        <label class="col-sm-2 control-label"><i class="fa fa-exclamation-triangle text-danger"></i> 异常信息：</label>
	                        <div class="col-sm-10">
	                            <pre class="alert alert-danger" style="border: none; margin-bottom: 0; white-space: pre-wrap; word-break: break-all;" th:text="${jobLog.exceptionInfo}"></pre>
	                        </div>
	                    </div>
	                </div>
	            </div>
	        </div>
	    </div>
	</form>
	
	<form class="form-horizontal m-t" id="jobForm" th:if="${name == 'job'}">
	    <div class="ibox">
	        <div class="ibox-title">
	            <h5><i class="fa fa-clock-o"></i> 定时任务详情</h5>
	        </div>
	        <div class="ibox-content">
	            <div class="row">
	                <div class="col-sm-6">
	                    <h4><i class="fa fa-cogs text-info"></i> 任务配置</h4>
	                    <hr/>
	                    <div class="form-group">
	                        <label class="col-sm-4 control-label"><i class="fa fa-hashtag"></i> 任务序号：</label>
	                        <div class="col-sm-8 form-control-static" th:text="${job.jobId}"></div>
	                    </div>
	                    <div class="form-group">
	                        <label class="col-sm-4 control-label"><i class="fa fa-font"></i> 任务名称：</label>
	                        <div class="col-sm-8 form-control-static" th:text="${job.jobName}"></div>
	                    </div>
	                    <div class="form-group">
	                        <label class="col-sm-4 control-label"><i class="fa fa-object-group"></i> 任务分组：</label>
	                        <div class="col-sm-8 form-control-static" th:text="${@dict.getLabel('sys_job_group', job.jobGroup)}"></div>
	                    </div>
	                    <div class="form-group">
	                        <label class="col-sm-4 control-label"><i class="fa fa-flag"></i> 执行状态：</label>
	                        <div class="col-sm-8">
	                            <span th:if="${job.status == '0'}" class="label label-primary"><i class="fa fa-play"></i> 正常</span>
	                            <span th:if="${job.status == '1'}" class="label label-default"><i class="fa fa-pause"></i> 暂停</span>
	                        </div>
	                    </div>
	                </div>

	                <div class="col-sm-6">
	                    <h4><i class="fa fa-calendar-check-o text-success"></i> 调度信息</h4>
	                    <hr/>
	                    <div class="form-group">
	                        <label class="col-sm-4 control-label">cron表达式：</label>
	                        <div class="col-sm-8">
	                            <code class="form-control-static" th:text="${job.cronExpression}" style="background-color: #f7f7f9; padding: 2px 5px; border-radius: 3px;"></code>
	                        </div>
	                    </div>
	                    <div class="form-group">
	                        <label class="col-sm-4 control-label"><i class="fa fa-history"></i> 执行策略：</label>
	                        <div class="col-sm-8 form-control-static">
	                            <span th:if="${job.misfirePolicy == '0'}" class="label label-default">默认策略</span>
	                            <span th:if="${job.misfirePolicy == '1'}" class="label label-warning">立即执行</span>
	                            <span th:if="${job.misfirePolicy == '2'}" class="label label-info">执行一次</span>
	                            <span th:if="${job.misfirePolicy == '3'}" class="label label-danger">放弃执行</span>
	                        </div>
	                    </div>
	                    <div class="form-group">
	                        <label class="col-sm-4 control-label"><i class="fa fa-bolt"></i> 并发执行：</label>
	                        <div class="col-sm-8">
	                            <span th:if="${job.concurrent == '0'}" class="label label-success"><i class="fa fa-check"></i> 允许</span>
	                            <span th:if="${job.concurrent == '1'}" class="label label-danger"><i class="fa fa-close"></i> 禁止</span>
	                        </div>
	                    </div>
	                    <div class="form-group">
	                        <label class="col-sm-4 control-label"><i class="fa fa-calendar-plus-o"></i> 下次执行：</label>
	                        <div class="col-sm-8 form-control-static" th:text="${job.nextValidTime != null} ? ${#dates.format(job.nextValidTime, 'yyyy-MM-dd HH:mm:ss')} : '未计算'"></div>
	                    </div>
	                </div>
	            </div>
	
				<div class="row" style="margin-top: 20px;">
				    <div class="col-sm-12">
				        <h4><i class="fa fa-info-circle text-warning"></i> 执行方法</h4>
				        <hr/>
				        <div class="form-group">
				            <label class="col-sm-2 control-label"><i class="fa fa-code"></i> 调用目标：</label>
				            <div class="col-sm-10">
				                <div class="well well-sm" style="margin-bottom: 0; font-family: monospace; font-size: 0.9em;" th:text="${job.invokeTarget}"></div>
				            </div>
				        </div>
				    </div>
				    <div class="col-sm-12">
				        <h4><i class="fa fa-info-circle text-warning"></i> 元信息</h4>
				        <hr/>
				        <div class="row">
				            <div class="col-sm-6">
				                <div class="form-group">
				                    <label class="col-sm-4 control-label"><i class="fa fa-user-plus"></i> 创建人：</label>
				                    <div class="col-sm-8 form-control-static" th:text="*{#strings.defaultString(job.createBy,'-')}"></div>
				                </div>
				                <div class="form-group">
				                    <label class="col-sm-4 control-label"><i class="fa fa-calendar-plus-o"></i> 创建时间：</label>
				                    <div class="col-sm-8 form-control-static" th:text="${#dates.format(job.createTime, 'yyyy-MM-dd HH:mm:ss')}"></div>
				                </div>
				            </div>
				            <div class="col-sm-6">
				                <div class="form-group">
				                    <label class="col-sm-4 control-label"><i class="fa fa-user-edit"></i> 更新人：</label>
				                    <div class="col-sm-8 form-control-static" th:text="*{#strings.defaultString(job.updateBy,'-')}"></div>
				                </div>
				                <div class="form-group">
				                    <label class="col-sm-4 control-label"><i class="fa fa-calendar-minus-o"></i> 更新时间：</label>
				                    <div class="col-sm-8 form-control-static" th:text="${#dates.format(job.updateTime, 'yyyy-MM-dd HH:mm:ss')}"></div>
				                </div>
				            </div>
				        </div>
				        <div class="form-group" th:if="${job.remark != null and job.remark != ''}">
				            <label class="col-sm-2 control-label"><i class="fa fa-comment"></i> 备注：</label>
				            <div class="col-sm-10">
				                <div class="well well-sm" style="margin-bottom: 0; min-height: 60px;" th:text="${job.remark}"></div>
				            </div>
				        </div>
				    </div>
				</div>
	        </div>
	    </div>
	</form>
	
    </div>
</body>
</html>