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
fanzelei
9 years ago
Commit
a3e3d123a770f953676a1dec48ac1b474ca61d94
1 parent
43f7d5bc
update
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
56 deletions
monitor-ui-web/src/main/webapp/jsp/redisInfo/redisInfoList.jsp
monitor-ui-web/src/main/webapp/script/yoho.type.zktree.js
monitor-ui-web/src/main/webapp/jsp/redisInfo/redisInfoList.jsp
View file @
a3e3d12
...
...
@@ -106,6 +106,7 @@
async
:
false
,
dataType
:
"json"
,
success
:
function
(
data
)
{
console
.
log
(
data
);
var
time
=
""
;
var
awsHtml
=
''
;
if
(
data
.
data
!=
null
)
{
...
...
monitor-ui-web/src/main/webapp/script/yoho.type.zktree.js
View file @
a3e3d12
...
...
@@ -143,66 +143,55 @@ $("#btn4type").click(function () {
*/
function
searchType
(
ip
){
$
(
"#detailTable"
).
hide
();
$
.
ajax
({
url
:
contextPath
+
"/zkTree/getRoot"
,
type
:
"post"
,
dataType
:
"json"
,
data
:
{
ip
:
ip
},
success
:
function
(
data
)
{
$
(
function
()
{
$
(
"#rootTable"
).
table
({
url
:
contextPath
+
"/zkTree/getRoot"
,
striped
:
true
,
panelClass
:
"panel-success"
,
pagination
:
false
,
loadFilter
:
function
(
data
)
{
return
defaultLoadFilter
(
data
);
},
columns
:
[{
title
:
"名称"
,
field
:
"name"
,
formatter
:
function
(
value
,
rowData
,
rowIndex
)
{
var
div
=
$
(
"<div>"
);
var
input
=
$
(
"<input type=\"button\">"
).
addClass
(
"form-control"
).
attr
({
id
:
"name"
,
name
:
"name"
,
style
:
"border: none;"
,
value
:
value
}).
appendTo
(
div
);
input
.
click
(
function
()
{
toDetail
(
rowData
,
ip
);
});
return
div
;
}
},
{
title
:
"路径"
,
field
:
"root"
},
{
title
:
"操作"
,
formatter
:
function
(
value
,
rowData
,
rowIndex
)
{
var
div
=
$
(
"<div>"
);
$
(
"#rootTable"
).
table
(
"load"
,{
ip
:
ip
});
$
(
function
()
{
$
(
"#rootTable"
).
table
({
url
:
contextPath
+
"/zkTree/getRoot"
,
striped
:
true
,
panelClass
:
"panel-success"
,
pagination
:
false
,
loadFilter
:
function
(
data
)
{
return
defaultLoadFilter
(
data
);
},
columns
:
[{
title
:
"名称"
,
field
:
"name"
,
formatter
:
function
(
value
,
rowData
,
rowIndex
)
{
var
div
=
$
(
"<div>"
);
var
input
=
$
(
"<input type=\"button\">"
).
addClass
(
"form-control"
).
attr
({
id
:
"name"
,
name
:
"name"
,
style
:
"border: none;"
,
value
:
value
}).
appendTo
(
div
);
input
.
click
(
function
()
{
toDetail
(
rowData
,
ip
);
});
return
div
;
}
},
{
title
:
"路径"
,
field
:
"root"
},
{
title
:
"操作"
,
formatter
:
function
(
value
,
rowData
,
rowIndex
)
{
var
div
=
$
(
"<div>"
);
//修改
var
editBtn
=
$
(
"<button data-target='#updateModal' data-toggle='modal'>"
).
addClass
(
"btn btn-xs btn-success"
).
html
(
"修改"
).
appendTo
(
div
);
editBtn
.
click
(
function
()
{
updateRoot
(
rowData
,
ip
);
});
return
div
;
}
}],
});
//修改
var
editBtn
=
$
(
"<button data-target='#updateModal' data-toggle='modal'>"
).
addClass
(
"btn btn-xs btn-success"
).
html
(
"修改"
).
appendTo
(
div
);
editBtn
.
click
(
function
()
{
updateRoot
(
rowData
,
ip
);
});
return
div
;
}
}],
});
});
},
error
:
function
(
e
)
{
}
});
});
}
function
updateRoot
(
rowData
,
ip
){
paramObj
.
name
=
rowData
.
name
;
paramObj
.
root
=
rowData
.
root
;
...
...
Please
register
or
login
to post a comment