Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fgqyxxlr
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yaru
fgqyxxlr
Commits
650f89ac
Commit
650f89ac
authored
Nov 24, 2018
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
任务日志新增详细
parent
1292dcf5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
66 additions
and
4 deletions
+66
-4
ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/SysJobLogController.java
+11
-1
ruoyi-admin/src/main/resources/templates/monitor/job/detail.html
+50
-0
ruoyi-admin/src/main/resources/templates/monitor/job/jobLog.html
+3
-2
ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/ScheduleJob.java
+2
-1
sql/ry_20181124.sql
+0
-0
No files found.
ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/SysJobLogController.java
View file @
650f89ac
...
...
@@ -4,7 +4,9 @@ import java.util.List;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.ModelMap
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
...
...
@@ -12,10 +14,10 @@ import com.ruoyi.common.annotation.Log;
import
com.ruoyi.common.base.AjaxResult
;
import
com.ruoyi.common.enums.BusinessType
;
import
com.ruoyi.common.utils.ExcelUtil
;
import
com.ruoyi.framework.web.base.BaseController
;
import
com.ruoyi.framework.web.page.TableDataInfo
;
import
com.ruoyi.quartz.domain.SysJobLog
;
import
com.ruoyi.quartz.service.ISysJobLogService
;
import
com.ruoyi.framework.web.base.BaseController
;
/**
* 调度日志操作处理
...
...
@@ -68,6 +70,14 @@ public class SysJobLogController extends BaseController
return
toAjax
(
jobLogService
.
deleteJobLogByIds
(
ids
));
}
@RequiresPermissions
(
"monitor:job:detail"
)
@GetMapping
(
"/detail/{jobLogId}"
)
public
String
detail
(
@PathVariable
(
"jobLogId"
)
Long
jobLogId
,
ModelMap
mmap
)
{
mmap
.
put
(
"jobLog"
,
jobLogService
.
selectJobLogById
(
jobLogId
));
return
prefix
+
"/detail"
;
}
@Log
(
title
=
"调度日志"
,
businessType
=
BusinessType
.
CLEAN
)
@RequiresPermissions
(
"monitor:job:remove"
)
@PostMapping
(
"/clean"
)
...
...
ruoyi-admin/src/main/resources/templates/monitor/job/detail.html
0 → 100644
View file @
650f89ac
<!DOCTYPE html>
<html
lang=
"zh"
xmlns:th=
"http://www.thymeleaf.org"
xmlns:shiro=
"http://www.pollix.at/thymeleaf/shiro"
>
<meta
charset=
"utf-8"
>
<head
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=
"signupForm"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label"
>
日志序号:
</label>
<div
class=
"form-control-static"
th:text=
"${jobLog.jobLogId}"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label"
>
任务名称:
</label>
<div
class=
"form-control-static"
th:text=
"${jobLog.jobName}"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label"
>
任务组名:
</label>
<div
class=
"form-control-static"
th:text=
"${jobLog.jobGroup}"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label"
>
任务方法:
</label>
<div
class=
"form-control-static"
th:text=
"${jobLog.methodName} + '(' + ${jobLog.methodParams} + ')'"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label"
>
日志信息:
</label>
<div
class=
"form-control-static"
th:text=
"${jobLog.jobMessage}"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label"
>
执行状态:
</label>
<div
class=
"form-control-static"
th:class=
"${jobLog.status == '0' ? 'label label-primary' : 'label label-danger'}"
th:text=
"${jobLog.status == '0' ? '正常' : '失败'}"
>
</div>
</div>
<div
class=
"form-group"
th:style=
"'display:' + ${jobLog.status == '0' ? 'none' : 'block'}"
>
<label
class=
"col-sm-2 control-label"
>
异常信息:
</label>
<div
class=
"form-control-static"
th:text=
"${jobLog.exceptionInfo}"
>
</div>
</div>
</form>
</div>
<div
th:include=
"include :: footer"
></div>
</script>
</body>
</html>
\ No newline at end of file
ruoyi-admin/src/main/resources/templates/monitor/job/jobLog.html
View file @
650f89ac
...
...
@@ -57,7 +57,7 @@
</div>
<div
th:include=
"include :: footer"
></div>
<script
th:inline=
"javascript"
>
var
removeFlag
=
[[
$
{@
permission
.
hasPermi
(
'monitor:job:remove
'
)}]];
var
detailFlag
=
[[
$
{@
permission
.
hasPermi
(
'monitor:job:detail
'
)}]];
var
datas
=
[[
$
{@
dict
.
getType
(
'sys_common_status'
)}]];
var
prefix
=
ctx
+
"monitor/jobLog"
;
...
...
@@ -65,6 +65,7 @@
var
options
=
{
url
:
prefix
+
"/list"
,
cleanUrl
:
prefix
+
"/clean"
,
detailUrl
:
prefix
+
"/detail/{id}"
,
removeUrl
:
prefix
+
"/remove"
,
exportUrl
:
prefix
+
"/export"
,
sortName
:
"createTime"
,
...
...
@@ -119,7 +120,7 @@
align
:
'center'
,
formatter
:
function
(
value
,
row
,
index
)
{
var
actions
=
[];
actions
.
push
(
'<a class="btn btn-
danger btn-xs '
+
removeFlag
+
'" href="#" onclick="$.operate.remove(
\'
'
+
row
.
jobLogId
+
'
\'
)"><i class="fa fa-remove"></i>删除
</a>'
);
actions
.
push
(
'<a class="btn btn-
warning btn-xs '
+
detailFlag
+
'" href="#" onclick="$.operate.detail(
\'
'
+
row
.
jobLogId
+
'
\'
)"><i class="fa fa-search"></i>详细
</a>'
);
return
actions
.
join
(
''
);
}
}]
...
...
ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/ScheduleJob.java
View file @
650f89ac
...
...
@@ -11,6 +11,7 @@ import org.slf4j.LoggerFactory;
import
org.springframework.scheduling.quartz.QuartzJobBean
;
import
com.ruoyi.common.constant.Constants
;
import
com.ruoyi.common.constant.ScheduleConstants
;
import
com.ruoyi.common.utils.StringUtils
;
import
com.ruoyi.common.utils.bean.BeanUtils
;
import
com.ruoyi.quartz.domain.SysJob
;
import
com.ruoyi.quartz.domain.SysJobLog
;
...
...
@@ -67,7 +68,7 @@ public class ScheduleJob extends QuartzJobBean
jobLog
.
setJobMessage
(
job
.
getJobName
()
+
" 总共耗时:"
+
times
+
"毫秒"
);
// 任务状态 0:成功 1:失败
jobLog
.
setStatus
(
Constants
.
FAIL
);
jobLog
.
setExceptionInfo
(
e
.
toString
(
));
jobLog
.
setExceptionInfo
(
StringUtils
.
substring
(
e
.
getMessage
(),
0
,
2000
));
}
finally
{
...
...
sql/ry_20181
008
.sql
→
sql/ry_20181
124
.sql
View file @
650f89ac
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment