Toggle navigation
Toggle navigation
This project
Loading...
Sign in
ops
/
monitor-ui
·
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
qinchao
7 years ago
Commit
7b4101784b565ca33de7dc8c58f05b123b7392c2
1 parent
36707168
恶意ip页面bug
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
8 deletions
monitor-ui-web/src/main/webapp/jsp/malicious/maliciousIpListNew.jsp
monitor-ui-web/src/main/webapp/jsp/malicious/maliciousIpRecordList.jsp
monitor-ui-web/src/main/webapp/jsp/malicious/maliciousIpListNew.jsp
View file @
7b41017
...
...
@@ -124,7 +124,7 @@
columns
:
[
{
title
:
""
,
width
:
"
20px
"
,
width
:
"
10%
"
,
field
:
"ip"
,
formatter
:
function
(
value
,
rowData
,
rowIndex
)
{
var
div
=
$
(
"<div>"
);
...
...
@@ -139,11 +139,11 @@
},
{
title
:
"ip"
,
width
:
"
80px
"
,
width
:
"
20%
"
,
field
:
"ip"
},
{
title
:
"reason"
,
width
:
"
120px
"
,
width
:
"
60%
"
,
field
:
"reasonDur"
,
styler
:
function
(
value
,
rowData
,
rowIndex
){
return
{
...
...
@@ -188,7 +188,7 @@
},*/
{
title
:
"操作"
,
width
:
"
50px
"
,
width
:
"
10%
"
,
field
:
"ip"
,
formatter
:
function
(
value
,
rowData
,
rowIndex
)
{
var
div
=
$
(
"<div>"
);
...
...
monitor-ui-web/src/main/webapp/jsp/malicious/maliciousIpRecordList.jsp
View file @
7b41017
...
...
@@ -120,14 +120,35 @@
columns
:
[
{
title
:
"ip"
,
width
:
"
100px
"
,
width
:
"
20%
"
,
field
:
"ip"
},
{
title
:
"reason"
,
width
:
"
120px
"
,
width
:
"
60%
"
,
field
:
"reason"
,
// align: "left",
align
:
"left"
,
formatter
:
function
(
value
,
rowData
,
rowIndex
){
var
allReasonDiv
=
"<div name='allReasonDiv' style='display:none'><a onclick='showResons(this)' style='color:#333;cursor:pointer' value='true' >"
;
allReasonDiv
+=
value
;
allReasonDiv
+=
"</a></div>"
;
var
simpleReasonDiv
=
"<div name='simpleReasonDiv'>"
;
if
(
value
!=
null
&&
value
.
length
>
0
){
simpleReasonDiv
+=
"<a onclick='showResons(this)' style='color:#333;cursor:pointer' value='true' >"
;
var
str_array
=
value
.
split
(
"<br>"
);
for
(
var
i
=
0
;
i
<
str_array
.
length
;
i
++
){
if
(
i
<=
2
){
simpleReasonDiv
=
simpleReasonDiv
+
str_array
[
i
]
+
"; "
;
}
}
simpleReasonDiv
+=
"......</a>"
;
}
simpleReasonDiv
+=
"</div>"
;
return
simpleReasonDiv
+
allReasonDiv
;
},
styler
:
function
(
value
,
rowData
,
rowIndex
){
return
{
"vertical-align"
:
"middle"
...
...
@@ -137,7 +158,7 @@
{
title
:
"时间"
,
field
:
"createTime"
,
width
:
"
80px
"
,
width
:
"
20%
"
,
formatter
:
function
(
value
,
rowData
,
rowIndex
)
{
if
(
value
!=
null
&&
value
!=
""
){
return
format
(
value
);
...
...
@@ -150,6 +171,31 @@
});
}
function
showResons
(
elememt
){
var
that
=
elememt
;
var
btnText
=
$
(
that
).
attr
(
"value"
);
if
(
"true"
==
btnText
){
var
ipsDiv
=
$
(
that
).
closest
(
"tr"
).
find
(
"div[name='simpleReasonDiv']"
).
each
(
function
(
index
,
el
)
{
$
(
this
).
hide
();
//隐藏当前显示的(仅两个ip)
});
var
ipsDiv
=
$
(
that
).
closest
(
"tr"
).
find
(
"div[name='allReasonDiv']"
).
each
(
function
(
index
,
el
)
{
$
(
this
).
show
();
//显示所有的ips
});
$
(
that
).
attr
(
"value"
,
"false"
);
// $(that).text("隐藏详情");
}
else
{
var
ipsDiv
=
$
(
that
).
closest
(
"tr"
).
find
(
"div[name='simpleReasonDiv']"
).
each
(
function
(
index
,
el
)
{
$
(
this
).
show
();
//隐藏当前显示的(仅两个ip)
});
var
ipsDiv
=
$
(
that
).
closest
(
"tr"
).
find
(
"div[name='allReasonDiv']"
).
each
(
function
(
index
,
el
)
{
$
(
this
).
hide
();
//显示所有的ips
});
$
(
that
).
attr
(
"value"
,
"true"
);
// $(that).text("显示详情");
}
}
//timeValue---时间戳
function
format
(
timeValue
){
var
time
=
new
Date
(
timeValue
);
...
...
Please
register
or
login
to post a comment