Toggle navigation
Toggle navigation
This project
Loading...
Sign in
monitor_v3
/
hg-monitor-web
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
wangtao
3 years ago
Commit
d97fc66f43a1c60934658233e0556e5e7aa6e3fb
1 parent
bdd099a5
1425 B5,服务心跳管理功能,最近心跳时间异常的判断时长支持配置
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
13 deletions
hg-monitor-web-base/src/main/resources/static/src/controller/selfmonitor.js
hg-monitor-web-base/src/main/resources/static/src/views/baseconfig/selfmonitor/index.html
hg-monitor-web-base/src/main/resources/static/src/controller/selfmonitor.js
View file @
d97fc66
...
...
@@ -27,10 +27,10 @@ layui.define(['table', 'form', 'sessions', 'common', 'view', 'admin'], function
}
});
// //按钮搜索
// $('#heartbeatQueryBtn').unbind().on('click',function (e) {
// reloadTable();
// })
//按钮搜索
$
(
'#heartbeatQueryBtn'
).
unbind
().
on
(
'click'
,
function
(
e
)
{
reloadTable
();
})
// 渲染表格
...
...
@@ -63,10 +63,12 @@ layui.define(['table', 'form', 'sessions', 'common', 'view', 'admin'], function
},
{
field
:
'currTime'
,
title
:
'最近心跳时间'
,
align
:
'center'
,
sort
:
true
,
templet
:
function
(
d
)
{
var
durationVal
=
$
(
'[name="durationVal"]'
).
val
();
if
(
!
durationVal
||
durationVal
==
''
||
durationVal
==
null
){
durationVal
=
10
;
}
var
beatTime
=
new
Date
(
d
.
currTime
);
var
time
=
new
Date
();
time
.
setMinutes
(
time
.
getMinutes
()
-
10
);
if
(
time
>
beatTime
)
{
if
(
d
.
between
>
parseInt
(
durationVal
))
{
return
`
<
div
class
=
"red"
>
$
{
beatTime
.
format
(
"yyyy-MM-dd HH:mm:ss"
)}
<
/div>
`
}
else
{
return
`
<
div
>
$
{
beatTime
.
format
(
"yyyy-MM-dd HH:mm:ss"
)}
<
/div>
`
...
...
@@ -85,7 +87,7 @@ layui.define(['table', 'form', 'sessions', 'common', 'view', 'admin'], function
heartbeatTable
.
reload
({
where
:
{
access_token
:
accessToken
,
keyword
:
$
(
'#condition-heartbeat-name'
).
val
()
,
keyword
:
$
(
'#condition-heartbeat-name'
).
val
()
},
page
:
{
curr
:
1
...
...
hg-monitor-web-base/src/main/resources/static/src/views/baseconfig/selfmonitor/index.html
View file @
d97fc66
...
...
@@ -14,11 +14,16 @@
placeholder=
"输入关键字,回车搜索"
autocomplete=
"off"
class=
"layui-input"
>
</div>
</div>
<!-- <div class="layui-inline">-->
<!-- <button id="heartbeatQueryBtn" type="button" class="layui-btn layui-btn-normal" ><i-->
<!-- class="layui-icon layui-icon-search"></i>查询-->
<!-- </button>-->
<!-- </div>-->
<div
class=
"layui-inline"
>
<div
class=
"layui-input-inline"
>
<input
type=
"number"
name=
"durationVal"
lay-tips=
"最近心跳时间(单位:分钟)"
placeholder=
"最近心跳时间"
value=
"10"
class=
"layui-input"
>
<!-- <span>分钟</span>-->
</div>
</div>
<div
class=
"layui-inline"
>
<button
id=
"heartbeatQueryBtn"
type=
"button"
class=
"layui-btn layui-btn-normal"
>
查询
</button>
</div>
</div>
</form>
</div>
...
...
Please
register
or
login
to post a comment