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
162e0c85bd00f5a3aaa509af9004205adafb9fcb
1 parent
27f85cfa
缓存时间配置
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
91 additions
and
66 deletions
monitor-ui-ctrl/src/main/java/com/ui/ctrl/CacheInfoCtrl.java
monitor-ui-web/src/main/webapp/jsp/cacheInfo/cacheInfoList.jsp
monitor-ui-ctrl/src/main/java/com/ui/ctrl/CacheInfoCtrl.java
View file @
162e0c8
...
...
@@ -2,6 +2,7 @@ package com.ui.ctrl;
import
java.util.List
;
import
com.ui.model.req.ZkDetailReq
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.Model
;
...
...
@@ -40,6 +41,14 @@ public class CacheInfoCtrl {
return
httpClient
.
defaultPost
(
HttpUriContants
.
GET_CACHE_INFO
,
req
,
BaseResponse
.
class
);
}
@ResponseBody
@RequestMapping
(
"/getZkMonitorValue"
)
public
BaseResponse
getZkMonitorValue
(
ZkDetailReq
req
)
{
BaseResponse
response
=
httpClient
.
defaultPost
(
HttpUriContants
.
GET_RISKCTROL_ZK_DETAIL
,
req
,
BaseResponse
.
class
);
return
response
;
}
@ResponseBody
@RequestMapping
(
"/edit"
)
public
BaseResponse
<?>
editCacheInfo
(
CacheInfoReq
req
)
{
...
...
monitor-ui-web/src/main/webapp/jsp/cacheInfo/cacheInfoList.jsp
View file @
162e0c8
...
...
@@ -194,74 +194,90 @@
});
function
updateHystrixInfo
(
rowData
){
paramObj
.
id
=
rowData
.
id
;
paramObj
.
configName
=
rowData
.
configName
;
paramObj
.
configValue
=
rowData
.
configValue
;
paramObj
.
configCat
=
rowData
.
configCat
;
paramObj
.
configDesc
=
rowData
.
configDesc
;
paramObj
.
serverType
=
rowData
.
serverType
;
var
dialog0
=
$
(
"<div>"
).
appendTo
(
$
(
"body"
));
dialog0
.
dialog
({
size
:
"modal-lg"
,
title
:
"修改路径"
,
backdrop
:
"static"
,
href
:
contextPath
+
"/jsp/cacheInfo/cacheInfoEdit.jsp"
,
buttons
:
[{
text
:
"关闭"
,
className
:
"btn-danger"
,
onclick
:
function
()
{
$
(
dialog0
).
dialog
(
"hide"
);
}
},
{
text
:
"提交"
,
className
:
"btn-success"
,
onclick
:
function
()
{
$
.
ajax
({
url
:
contextPath
+
"/cacheInfo/getZkMonitorValue"
,
type
:
'POST'
,
data
:
{
ip
:
rowData
.
serverType
,
zkPath
:
rowData
.
zkPath
},
dataType
:
'json'
,
async
:
false
,
success
:
function
(
resp
)
{
paramObj
.
id
=
rowData
.
id
;
paramObj
.
configName
=
rowData
.
configName
;
paramObj
.
configValue
=
resp
.
data
;
paramObj
.
configCat
=
rowData
.
configCat
;
paramObj
.
configDesc
=
rowData
.
configDesc
;
paramObj
.
serverType
=
rowData
.
serverType
;
var
dialog0
=
$
(
"<div>"
).
appendTo
(
$
(
"body"
));
dialog0
.
dialog
({
size
:
"modal-lg"
,
title
:
"修改路径"
,
backdrop
:
"static"
,
href
:
contextPath
+
"/jsp/cacheInfo/cacheInfoEdit.jsp"
,
buttons
:
[{
text
:
"关闭"
,
className
:
"btn-danger"
,
onclick
:
function
()
{
$
(
dialog0
).
dialog
(
"hide"
);
}
},
{
text
:
"提交"
,
className
:
"btn-success"
,
onclick
:
function
()
{
var
btn
=
$
(
this
);
$
(
dialog0
).
dialog
(
"hide"
);
$
(
"#cacheInfoForm"
).
form
(
"submit"
,
{
submitUrl
:
contextPath
+
"cacheInfo/edit.do"
,
submitData
:
{
id
:
rowData
.
id
},
onBeforeSubmit
:
function
()
{
if
(
!
$
(
this
).
form
(
"validate"
))
{
btn
.
removeAttr
(
"disabled"
);
return
false
;
}
},
success
:
function
(
data
)
{
var
mes
=
""
;
var
title
=
""
;
if
(
data
.
data
==
1
){
mes
=
"修改成功"
;
title
=
"修改成功"
;
}
else
{
title
=
"修改失败"
;
mes
=
data
.
message
;
}
var
btn
=
$
(
this
);
$
(
dialog0
).
dialog
(
"hide"
);
$
(
"#cacheInfoForm"
).
form
(
"submit"
,
{
submitUrl
:
contextPath
+
"cacheInfo/edit.do"
,
submitData
:
{
id
:
rowData
.
id
},
onBeforeSubmit
:
function
()
{
var
dialog
=
$
(
"<div>"
).
appendTo
(
$
(
"body"
));
dialog
.
dialog
({
title
:
title
,
backdrop
:
"static"
,
content
:
mes
,
buttons
:
[{
text
:
"确定"
,
className
:
"btn-success"
,
onclick
:
function
()
{
$
(
dialog
).
dialog
(
"hide"
);
$
(
"#cacheInfoTable"
).
table
(
"load"
);
}
}]
});
$
(
dialog0
).
dialog
(
"hide"
);
}
});
}
}]
});
},
error
:
function
(
e
)
{
alert
(
"获取zk值异常"
);
}
});
if
(
!
$
(
this
).
form
(
"validate"
))
{
btn
.
removeAttr
(
"disabled"
);
return
false
;
}
},
success
:
function
(
data
)
{
var
mes
=
""
;
var
title
=
""
;
if
(
data
.
data
==
1
){
mes
=
"修改成功"
;
title
=
"修改成功"
;
}
else
{
title
=
"修改失败"
;
mes
=
data
.
message
;
}
var
dialog
=
$
(
"<div>"
).
appendTo
(
$
(
"body"
));
dialog
.
dialog
({
title
:
title
,
backdrop
:
"static"
,
content
:
mes
,
buttons
:
[{
text
:
"确定"
,
className
:
"btn-success"
,
onclick
:
function
()
{
$
(
dialog
).
dialog
(
"hide"
);
$
(
"#cacheInfoTable"
).
table
(
"load"
);
}
}]
});
$
(
dialog0
).
dialog
(
"hide"
);
}
});
}
}]
});
}
//点击查询按钮
...
...
Please
register
or
login
to post a comment