Showing
8 changed files
with
313 additions
and
80 deletions
@@ -59,6 +59,8 @@ public class HttpUriContants { | @@ -59,6 +59,8 @@ public class HttpUriContants { | ||
59 | ****/ | 59 | ****/ |
60 | public static final String GET_ZK_INFO = "/zkMonitor/getZkMonitorRecords"; | 60 | public static final String GET_ZK_INFO = "/zkMonitor/getZkMonitorRecords"; |
61 | public static final String GET_ZK_TREE = "/zkMonitor/getZkMonitorTree"; | 61 | public static final String GET_ZK_TREE = "/zkMonitor/getZkMonitorTree"; |
62 | + public static final String GET_ZK_DETAIL = "/zkMonitor/getZkMonitorDetail"; | ||
63 | + public static final String EDIT_ZK_DETAIL = "/zkMonitor/editZkMonitorDetail"; | ||
62 | 64 | ||
63 | /*** | 65 | /*** |
64 | * redis监控信息查询 | 66 | * redis监控信息查询 |
@@ -10,6 +10,7 @@ import org.springframework.web.bind.annotation.ResponseBody; | @@ -10,6 +10,7 @@ import org.springframework.web.bind.annotation.ResponseBody; | ||
10 | import com.ui.contants.HttpUriContants; | 10 | import com.ui.contants.HttpUriContants; |
11 | import com.ui.http.HttpRestClient; | 11 | import com.ui.http.HttpRestClient; |
12 | import com.ui.model.BaseResponse; | 12 | import com.ui.model.BaseResponse; |
13 | +import com.ui.model.req.ZkDetailReq; | ||
13 | import com.ui.model.req.ZkTreeReq; | 14 | import com.ui.model.req.ZkTreeReq; |
14 | 15 | ||
15 | /** | 16 | /** |
@@ -19,9 +20,9 @@ import com.ui.model.req.ZkTreeReq; | @@ -19,9 +20,9 @@ import com.ui.model.req.ZkTreeReq; | ||
19 | */ | 20 | */ |
20 | @Controller | 21 | @Controller |
21 | @RequestMapping("zkTree") | 22 | @RequestMapping("zkTree") |
22 | -public class ZkMonitorTree { | 23 | +public class ZkMonitorTreeCtrl { |
23 | 24 | ||
24 | - Logger log = LoggerFactory.getLogger(ZkMonitorTree.class); | 25 | + Logger log = LoggerFactory.getLogger(ZkMonitorTreeCtrl.class); |
25 | 26 | ||
26 | @Autowired | 27 | @Autowired |
27 | private HttpRestClient httpClient; | 28 | private HttpRestClient httpClient; |
@@ -33,4 +34,20 @@ public class ZkMonitorTree { | @@ -33,4 +34,20 @@ public class ZkMonitorTree { | ||
33 | BaseResponse response=httpClient.defaultPost(HttpUriContants.GET_ZK_TREE, req, BaseResponse.class); | 34 | BaseResponse response=httpClient.defaultPost(HttpUriContants.GET_ZK_TREE, req, BaseResponse.class); |
34 | return response; | 35 | return response; |
35 | } | 36 | } |
37 | + | ||
38 | + @RequestMapping("/getAll") | ||
39 | + @ResponseBody | ||
40 | + public BaseResponse getAll(ZkDetailReq req){ | ||
41 | + log.info("getAll with req is {}",req); | ||
42 | + BaseResponse response=httpClient.defaultPost(HttpUriContants.GET_ZK_DETAIL, req, BaseResponse.class); | ||
43 | + return response; | ||
44 | + } | ||
45 | + | ||
46 | + @RequestMapping("/editDetail") | ||
47 | + @ResponseBody | ||
48 | + public BaseResponse editDetail(ZkDetailReq req){ | ||
49 | + log.info("editDetail with req is {}",req); | ||
50 | + BaseResponse response=httpClient.defaultPost(HttpUriContants.EDIT_ZK_DETAIL, req, BaseResponse.class); | ||
51 | + return response; | ||
52 | + } | ||
36 | } | 53 | } |
@@ -6,71 +6,25 @@ | @@ -6,71 +6,25 @@ | ||
6 | + request.getServerName() + ":" + request.getServerPort() | 6 | + request.getServerName() + ":" + request.getServerPort() |
7 | + path + "/"; | 7 | + path + "/"; |
8 | %> | 8 | %> |
9 | -<form class="form-horizontal" id="javaInfoForm" name="javaInfoForm"> | 9 | +<form class="form-horizontal" id="zkInfoForm" name="zkInfoForm"> |
10 | 10 | ||
11 | <div class="form-group"> | 11 | <div class="form-group"> |
12 | - <label class="col-sm-2 control-label"> <span style="color:red">*</span>服务名:</label> | ||
13 | - | 12 | + <label class="col-sm-2 control-label">路径:</label> |
14 | <div class="col-sm-8"> | 13 | <div class="col-sm-8"> |
15 | - <input type="text" class="form-control" id="apiName" name="apiName" placeholder="输入服务名" maxlength="30" | ||
16 | - size="40"/> | 14 | + <input type="text" class="form-control" id="zkPath" name="zkPath" maxlength="30" size="40"/> |
17 | </div> | 15 | </div> |
18 | </div> | 16 | </div> |
19 | 17 | ||
20 | <div class="form-group"> | 18 | <div class="form-group"> |
21 | - <label class="col-sm-2 control-label"> <span style="color:red">*</span>url:</label> | ||
22 | - | 19 | + <label class="col-sm-2 control-label">值:</label> |
23 | <div class="col-sm-8"> | 20 | <div class="col-sm-8"> |
24 | - <input type="text" class="form-control" id="apiUrl" name="apiUrl" placeholder="输入url" | ||
25 | - size="40"/> | ||
26 | - </div> | ||
27 | - </div> | ||
28 | - | ||
29 | - <div class="form-group"> | ||
30 | - <label class="col-sm-2 control-label"> <span style="color:red">*</span>类别:</label> | ||
31 | - | ||
32 | - <div class="col-sm-2"> | ||
33 | - <select id="serviceType" name="serviceType" class="form-control"> | ||
34 | - </select> | 21 | + <input type="text" class="form-control" id="zkValue" name="zkValue" /> |
35 | </div> | 22 | </div> |
36 | - | ||
37 | - <label class="col-sm-2 control-label"> <span style="color:red">*</span>请求:</label> | ||
38 | - | ||
39 | - <div class="col-sm-2"> | ||
40 | - <select id="apiReqMethod" name="apiReqMethod" class="form-control"> | ||
41 | - <option value="0">GET</option> | ||
42 | - <option value="1">POST</option> | ||
43 | - </select> | ||
44 | - </div> | ||
45 | - </div> | ||
46 | - | ||
47 | - | ||
48 | - <div class="form-group"> | ||
49 | - <label class="col-sm-2 control-label">是否启用:</label> | ||
50 | - | ||
51 | - <div class="col-sm-2"> | ||
52 | - <input type="checkbox" id="apiToggle" name="apiToggle"> | ||
53 | - </div> | ||
54 | - | ||
55 | - <label class="col-sm-2 control-label"> <span style="color:red">*</span>告警阈值:</label> | ||
56 | - | ||
57 | - <div class="col-sm-2"> | ||
58 | - <input type="text" class="form-control" id="apiWarnTrigger" name="apiWarnTrigger" placeholder="输入告警阈值" | ||
59 | - maxlength="30" size="40"/> | ||
60 | - </div> | ||
61 | - </div> | ||
62 | - | ||
63 | - | ||
64 | - <div class="form-group"> | ||
65 | - <label class="col-sm-2 control-label">请求参数:</label> | ||
66 | - | ||
67 | - <div class="col-sm-8"> | ||
68 | - <textarea id="apiData" name="apiData" class="form-control" rows="3"></textarea> | ||
69 | - </div> | ||
70 | - </div> | ||
71 | - <div class="form-group"> | ||
72 | - <label class="col-sm-2 control-label"></label> | ||
73 | - | ||
74 | - <div class="col-sm-8" id="messageAlert"></div> | ||
75 | </div> | 23 | </div> |
76 | </form> | 24 | </form> |
25 | +<script> | ||
26 | +$(function(){ | ||
27 | + $("#zkInfoForm #zkPath").val(paramObj.zkPath); | ||
28 | + $("#zkInfoForm #zkValue").val(paramObj.zkValue); | ||
29 | +}) | ||
30 | +</script> |
@@ -6,6 +6,74 @@ | @@ -6,6 +6,74 @@ | ||
6 | + request.getServerName() + ":" + request.getServerPort() | 6 | + request.getServerName() + ":" + request.getServerPort() |
7 | + path + "/"; | 7 | + path + "/"; |
8 | %> | 8 | %> |
9 | +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | ||
10 | +<html> | ||
11 | +<head> | ||
12 | + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | ||
13 | + <link rel="stylesheet" href="<%=basePath %>css/bootstrap.min.css"/> | ||
14 | + <link rel="stylesheet" href="<%=basePath %>css/bootstrap-datetimepicker.css"/> | ||
15 | + <link href="<%=basePath %>js/bootstrap-plugin/css/bootstrap.table.css" rel="stylesheet" media="screen"/> | ||
16 | + <link rel="stylesheet" href="<%=basePath %>css/bootstrap-responsive.min.css"/> | ||
17 | + <link rel="stylesheet" href="<%=basePath %>css/fullcalendar.css"/> | ||
18 | + <link rel="stylesheet" href="<%=basePath %>css/unicorn.main.css"/> | ||
19 | + <link rel="stylesheet" href="<%=basePath %>css/unicorn.grey.css"/> | ||
20 | + <link rel="stylesheet" href="<%=basePath %>css/jquery-ui.css"/> | ||
21 | + <link rel="stylesheet" href="<%=basePath %>css/uniform.css"/> | ||
22 | + <link rel="stylesheet" href="<%=basePath %>css/select2.css"/> | ||
23 | + <link rel="stylesheet" href="<%=basePath %>js/jstree/themes/proton/style.css"/> | ||
24 | + <link rel="stylesheet" href="<%=basePath %>css/select2.css"/> | ||
25 | + <link rel="stylesheet" href="<%=basePath %>css/yoho.css"/> | ||
26 | + <script src="<%=basePath %>js/excanvas.min.js" charset="UTF-8" type="text/javascript"></script> | ||
27 | + <script src="<%=basePath %>js/jquery-1.12.0.min.js" charset="UTF-8" type="text/javascript"></script> | ||
28 | + <script src="<%=basePath %>js/jquery-ui.custom.js" charset="UTF-8" type="text/javascript"></script> | ||
29 | + <script src="<%=basePath %>/js/bootstrap.min.js"></script> | ||
30 | + <script src="<%=basePath %>/js/unicorn.js"></script> | ||
31 | + <script src="<%=basePath %>js/bootstrap-plugin/datetimepicker/moment-with-locales.js" charset="UTF-8" | ||
32 | + type="text/javascript"></script> | ||
33 | + <script src="<%=basePath %>js/bootstrap-plugin/datetimepicker/bootstrap-datetimepicker.js" charset="UTF-8" | ||
34 | + type="text/javascript"></script> | ||
35 | + <script src="<%=basePath %>js/global.js" charset="UTF-8" type="text/javascript"></script> | ||
36 | + <script src="<%=basePath %>js/bootstrap-plugin/bootstrap.pagination.js" charset="UTF-8" | ||
37 | + type="text/javascript"></script> | ||
38 | + <script src="<%=basePath %>js/bootstrap-plugin/bootstrap.table.js" charset="UTF-8" type="text/javascript"></script> | ||
39 | + <script src="<%=basePath %>js/bootstrap-plugin/bootstrap.dialog.js" charset="UTF-8" type="text/javascript"></script> | ||
40 | + <script src="<%=basePath %>js/bootstrap-plugin/bootstrap.form.js" charset="UTF-8" type="text/javascript"></script> | ||
41 | + <script src="<%=basePath %>js/bootstrap-plugin/bootstrap.panel.js" charset="UTF-8" type="text/javascript"></script> | ||
42 | + <script src="<%=basePath %>js/bootstrap-plugin/bootstrap.alerts.js" charset="UTF-8" type="text/javascript"></script> | ||
43 | + <script src="<%=basePath %>js/bootstrap-plugin/bootstrap.accordion.js" charset="UTF-8" | ||
44 | + type="text/javascript"></script> | ||
45 | + <script src="<%=basePath %>js/bootstrap-plugin/bootstrap.breadcrumb.js" charset="UTF-8" | ||
46 | + type="text/javascript"></script> | ||
47 | + <script src="<%=basePath %>js/bootstrap-plugin/bootstrap.validate.js" charset="UTF-8" | ||
48 | + type="text/javascript"></script> | ||
49 | + <script src="<%=basePath %>js/bootstrap-plugin/bootstrap.form.js" charset="UTF-8" type="text/javascript"></script> | ||
50 | + <script src="<%=basePath %>js/layer/layer.js" charset="UTF-8" type="text/javascript"></script> | ||
51 | + <script src="<%=basePath %>js/bootstrap-plugin/bootstrap.select.js" charset="UTF-8" type="text/javascript"></script> | ||
52 | + <script src="<%=basePath %>js/jstree/jstree.min.js"></script> | ||
53 | + <script src="<%=basePath %>js/jquery.toaster.js"></script> | ||
54 | + <link href="<%=basePath %>css/jquery.tagsinput.css" rel="stylesheet"/> | ||
55 | + <script src="<%=basePath %>js/jquery.tagsinput.min.js" type="text/javascript"></script> | ||
56 | + <script> | ||
57 | + var contextPath = '<%=basePath %>'; | ||
58 | + | ||
59 | + </script> | ||
60 | + <title>YOHO!运维</title> | ||
61 | +</head> | ||
62 | +<body> | ||
63 | + | ||
64 | +<!-- 头部 --> | ||
65 | +<div id="head"> | ||
66 | + <h5 style="color: #E0EEE0;font-style:oblique;font-weight:900;font-size:200%;margin-left: 45px;margin-top: 40px;"> | ||
67 | + YOHO</h5> | ||
68 | +</div> | ||
69 | + | ||
70 | +<!-- 左侧菜单项 --> | ||
71 | +<div id="sidebar"> | ||
72 | + | ||
73 | +</div> | ||
74 | +<!-- 右侧具体内容 --> | ||
75 | +<div id="content"> | ||
76 | + | ||
9 | <div id="breadcrumb"> | 77 | <div id="breadcrumb"> |
10 | <a href="#" title="Go to Home" class="tip-bottom"><i | 78 | <a href="#" title="Go to Home" class="tip-bottom"><i |
11 | class="icon-home"></i> Home</a> <a href="#" class="current">监控对象</a> | 79 | class="icon-home"></i> Home</a> <a href="#" class="current">监控对象</a> |
@@ -19,7 +87,7 @@ | @@ -19,7 +87,7 @@ | ||
19 | 87 | ||
20 | </div> | 88 | </div> |
21 | <!-- 树 --> | 89 | <!-- 树 --> |
22 | - <div style="float: left;width: 300px;color: #D3D3D3;height: 600px;"> | 90 | + <div style="float: left;width: 250px;color: #D3D3D3;height: 600px;"> |
23 | <div class="widget-title" style="height: 50px;"> | 91 | <div class="widget-title" style="height: 50px;"> |
24 | <h5>节点展示</h5> | 92 | <h5>节点展示</h5> |
25 | </div> | 93 | </div> |
@@ -29,7 +97,7 @@ | @@ -29,7 +97,7 @@ | ||
29 | </div> | 97 | </div> |
30 | </div> | 98 | </div> |
31 | <!-- 列表 --> | 99 | <!-- 列表 --> |
32 | - <div class="widget-content nopadding" style="border-left: 1px solid #E5E5E5;width: 800px;float: left;"> | 100 | + <div class="widget-content nopadding" style="border-left: 1px solid #E5E5E5;width: 450px;float: left;"> |
33 | <div class="widget-title" style="height: 50px;"> | 101 | <div class="widget-title" style="height: 50px;"> |
34 | <h5>根路径</h5> | 102 | <h5>根路径</h5> |
35 | </div> | 103 | </div> |
@@ -39,7 +107,7 @@ | @@ -39,7 +107,7 @@ | ||
39 | </div> | 107 | </div> |
40 | </div> | 108 | </div> |
41 | </div> | 109 | </div> |
42 | - <div class="widget-content nopadding" style="margin-left: 1100px;border-left: 1px solid #E5E5E5;"> | 110 | + <div class="widget-content nopadding" style="margin-left: 700px;border-left: 1px solid #E5E5E5;"> |
43 | <div class="widget-title" style="height: 50px;"> | 111 | <div class="widget-title" style="height: 50px;"> |
44 | <h5>节点详情</h5> | 112 | <h5>节点详情</h5> |
45 | </div> | 113 | </div> |
@@ -51,28 +119,31 @@ | @@ -51,28 +119,31 @@ | ||
51 | </div> | 119 | </div> |
52 | </div> | 120 | </div> |
53 | </div> | 121 | </div> |
122 | +</div> | ||
123 | +</body> | ||
54 | <script type="text/javascript" src="<%=basePath %>/script/yoho.type.zktree.js"></script> | 124 | <script type="text/javascript" src="<%=basePath %>/script/yoho.type.zktree.js"></script> |
55 | <script> | 125 | <script> |
56 | -function toDetail(rowData){ | 126 | +function toDetail(rowData,ip){ |
57 | $("#detailTable").show(); | 127 | $("#detailTable").show(); |
58 | $(function () { | 128 | $(function () { |
59 | $("#detailTable").table({ | 129 | $("#detailTable").table({ |
60 | - url: contextPath + "/mobject/query", | ||
61 | - striped: true, | ||
62 | - panelClass: "panel-success", | ||
63 | - pagination: true, | ||
64 | - pageSize: 10, | 130 | + url: contextPath + "/zkTree/getAll?ip="+ip+"&zkPath="+rowData.root, |
131 | + striped : true, | ||
132 | + pagination : true, | ||
133 | + pageSize : 10, | ||
65 | loadFilter: function (data) { | 134 | loadFilter: function (data) { |
66 | return defaultLoadFilter(data); | 135 | return defaultLoadFilter(data); |
67 | }, | 136 | }, |
68 | columns: [{ | 137 | columns: [{ |
69 | - title: "名称", | ||
70 | - field: "moName" | 138 | + title: "路径", |
139 | + width:"30%", | ||
140 | + field: "zkPath" | ||
71 | }, { | 141 | }, { |
72 | title: "值", | 142 | title: "值", |
73 | field: "zkValue" | 143 | field: "zkValue" |
74 | }, { | 144 | }, { |
75 | title: "操作", | 145 | title: "操作", |
146 | + width:"10%", | ||
76 | formatter: function (value, rowData, rowIndex) { | 147 | formatter: function (value, rowData, rowIndex) { |
77 | var div = $("<div>"); | 148 | var div = $("<div>"); |
78 | //修改 | 149 | //修改 |
@@ -88,7 +159,78 @@ function toDetail(rowData){ | @@ -88,7 +159,78 @@ function toDetail(rowData){ | ||
88 | }); | 159 | }); |
89 | } | 160 | } |
90 | 161 | ||
91 | -function updateMObject(rowData){ | ||
92 | - | ||
93 | -} | ||
94 | -</script> | ||
162 | +/*function updateMObject(rowData){ | ||
163 | + paramObj.zkPath = rowData.zkPath; | ||
164 | + paramObj.zkValue = rowData.zkValue; | ||
165 | + var dialog0 = $("<div>").appendTo($("body")); | ||
166 | + dialog0.dialog({ | ||
167 | + size : "modal-lg", | ||
168 | + title : "修改路径", | ||
169 | + backdrop : "static", | ||
170 | + href : contextPath +"/jsp/zkMonitor/zkMonitorEdit.jsp", | ||
171 | + buttons : [{ | ||
172 | + text : "关闭", | ||
173 | + className : "btn-danger", | ||
174 | + onclick : function() { | ||
175 | + $(dialog0).dialog("hide"); | ||
176 | + } | ||
177 | + }, { | ||
178 | + text : "提交", | ||
179 | + className : "btn-success", | ||
180 | + onclick : function() { | ||
181 | + | ||
182 | + var dialog = $("<div>").appendTo($("body")); | ||
183 | + dialog.dialog({ | ||
184 | + title :"修改路径", | ||
185 | + backdrop : "static", | ||
186 | + content : "是否修改", | ||
187 | + buttons : [{ | ||
188 | + text : "否", | ||
189 | + className : "btn-danger", | ||
190 | + onclick : function() { | ||
191 | + $(dialog).dialog("hide"); | ||
192 | + } | ||
193 | + }, { | ||
194 | + text : "是", | ||
195 | + className : "btn-success", | ||
196 | + onclick : function() { | ||
197 | + var btn = $(this); | ||
198 | + $(dialog).dialog("hide"); | ||
199 | + $("#zkInfoForm").form("submit", { | ||
200 | + submitUrl : contextPath + "/zkTree/editDetail.do", | ||
201 | + submitData : { | ||
202 | + ip : rowData.ip | ||
203 | + }, | ||
204 | + onBeforeSubmit : function() { | ||
205 | + | ||
206 | + if (!$(this).form("validate")) { | ||
207 | + btn.removeAttr("disabled"); | ||
208 | + return false; | ||
209 | + } | ||
210 | + }, | ||
211 | + success : function(data) { | ||
212 | + $("#detailTable").table("load", { | ||
213 | + ip : rowData.ip, | ||
214 | + zkPath : rowData.zkPath | ||
215 | + }); | ||
216 | + | ||
217 | + $(dialog0).dialog("hide"); | ||
218 | + $("#inboxTemplateListTable").table("load"); | ||
219 | + $(dialog).dialog("hide"); | ||
220 | + } | ||
221 | + }); | ||
222 | + | ||
223 | + } | ||
224 | + }] | ||
225 | + }); | ||
226 | + } | ||
227 | + }] | ||
228 | + }); | ||
229 | +}*/ | ||
230 | + | ||
231 | +</script> | ||
232 | +<script src="<%=basePath %>script/common/genarate_left_panel.js"></script> | ||
233 | +<script type="text/javascript"> | ||
234 | + $("#li_zkMonitor").addClass("active"); | ||
235 | +</script> | ||
236 | +</html> |
1 | +<%@page language="java" contentType="text/html;charset=utf-8" %> | ||
2 | +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> | ||
3 | +<% | ||
4 | + String path = request.getContextPath(); | ||
5 | + String basePath = request.getScheme() + "://" | ||
6 | + + request.getServerName() + ":" + request.getServerPort() | ||
7 | + + path + "/"; | ||
8 | +%> | ||
9 | +<form class="form-horizontal" id="zkRootInfoForm" name="zkRootInfoForm"> | ||
10 | + | ||
11 | + <div class="form-group"> | ||
12 | + <label class="col-sm-2 control-label">名称:</label> | ||
13 | + <div class="col-sm-8"> | ||
14 | + <input type="text" class="form-control" id="zkName" name="zkName" maxlength="30" size="40"/> | ||
15 | + </div> | ||
16 | + </div> | ||
17 | + | ||
18 | + <div class="form-group"> | ||
19 | + <label class="col-sm-2 control-label">路径:</label> | ||
20 | + <div class="col-sm-8"> | ||
21 | + <input type="text" class="form-control" id="zkRoot" name="zkRoot" /> | ||
22 | + </div> | ||
23 | + </div> | ||
24 | +</form> | ||
25 | +<script> | ||
26 | +$(function(){ | ||
27 | + $("#zkRootInfoForm #zkName").val(paramObj.name); | ||
28 | + $("#zkRootInfoForm #zkRoot").val(paramObj.root); | ||
29 | +}) | ||
30 | +</script> |
@@ -7,6 +7,7 @@ innerHTML += "<li id='li_hostGroupList'><a id='li_hostGroupList_a' href=''><i cl | @@ -7,6 +7,7 @@ innerHTML += "<li id='li_hostGroupList'><a id='li_hostGroupList_a' href=''><i cl | ||
7 | innerHTML += "<li id='li_hostInfoList'><a id='li_hostInfoList_a' href=''><i class='icon icon-th'></i> <span>主机管理</span></a></li>"; | 7 | innerHTML += "<li id='li_hostInfoList'><a id='li_hostInfoList_a' href=''><i class='icon icon-th'></i> <span>主机管理</span></a></li>"; |
8 | innerHTML += "<li id='li_javaApi'><a id='li_javaApi_a' href=''><i class='icon icon-th'></i> <span>JAVA服务信息</span></a></li>"; | 8 | innerHTML += "<li id='li_javaApi'><a id='li_javaApi_a' href=''><i class='icon icon-th'></i> <span>JAVA服务信息</span></a></li>"; |
9 | innerHTML += "<li id='li_zkInfo'><a id='li_zkInfo_a' href=''><i class='icon icon-th'></i> <span>ZK监控</span></a></li>"; | 9 | innerHTML += "<li id='li_zkInfo'><a id='li_zkInfo_a' href=''><i class='icon icon-th'></i> <span>ZK监控</span></a></li>"; |
10 | +innerHTML += "<li id='li_zkMonitor'><a id='li_zkMonitor_a' href=''><i class='icon icon-th'></i> <span>ZK配置管理</span></a></li>"; | ||
10 | innerHTML += "<li id='li_rabbitview'><a id='li_rabbitview_a' href=''><i class='icon icon-th'></i> <span>Rabbitmq监控</span></a></li>"; | 11 | innerHTML += "<li id='li_rabbitview'><a id='li_rabbitview_a' href=''><i class='icon icon-th'></i> <span>Rabbitmq监控</span></a></li>"; |
11 | innerHTML += "<li id='li_redisInfo'><a id='li_redisInfo_a' href=''><i class='icon icon-th'></i> <span>Redis监控</span></a></li>"; | 12 | innerHTML += "<li id='li_redisInfo'><a id='li_redisInfo_a' href=''><i class='icon icon-th'></i> <span>Redis监控</span></a></li>"; |
12 | innerHTML += "<li id='li_nginxview'><a id='li_nginxview_a' href=''><i class='icon icon-th'></i> <span>Nginx监控</span></a></li>"; | 13 | innerHTML += "<li id='li_nginxview'><a id='li_nginxview_a' href=''><i class='icon icon-th'></i> <span>Nginx监控</span></a></li>"; |
@@ -32,7 +33,7 @@ document.getElementById("li_redisInfo_a").setAttribute("href", path + "/redisInf | @@ -32,7 +33,7 @@ document.getElementById("li_redisInfo_a").setAttribute("href", path + "/redisInf | ||
32 | document.getElementById("li_nginxview_a").setAttribute("href", path + "/nginx/toNginxView"); | 33 | document.getElementById("li_nginxview_a").setAttribute("href", path + "/nginx/toNginxView"); |
33 | document.getElementById("li_projectRelease_a").setAttribute("href", path + "/project/toProject"); | 34 | document.getElementById("li_projectRelease_a").setAttribute("href", path + "/project/toProject"); |
34 | document.getElementById("li_others_a").setAttribute("href", path + "/jsp/dashBoard/others.jsp"); | 35 | document.getElementById("li_others_a").setAttribute("href", path + "/jsp/dashBoard/others.jsp"); |
35 | - | 36 | +document.getElementById("li_zkMonitor_a").setAttribute("href", path + "/jsp/zkMonitor/zkMonitorList.jsp"); |
36 | 37 | ||
37 | function getUrlBasePath() { | 38 | function getUrlBasePath() { |
38 | var location = ( window.location + '').split('/'); | 39 | var location = ( window.location + '').split('/'); |
@@ -156,8 +156,7 @@ function searchType(ip){ | @@ -156,8 +156,7 @@ function searchType(ip){ | ||
156 | url: contextPath + "/zkTree/getRoot", | 156 | url: contextPath + "/zkTree/getRoot", |
157 | striped: true, | 157 | striped: true, |
158 | panelClass: "panel-success", | 158 | panelClass: "panel-success", |
159 | - pagination: true, | ||
160 | - pageSize: 10, | 159 | + pagination: false, |
161 | loadFilter: function (data) { | 160 | loadFilter: function (data) { |
162 | return defaultLoadFilter(data); | 161 | return defaultLoadFilter(data); |
163 | }, | 162 | }, |
@@ -173,7 +172,7 @@ function searchType(ip){ | @@ -173,7 +172,7 @@ function searchType(ip){ | ||
173 | value : value | 172 | value : value |
174 | }).appendTo(div); | 173 | }).appendTo(div); |
175 | input.click(function () { | 174 | input.click(function () { |
176 | - toDetail(rowData); | 175 | + toDetail(rowData,ip); |
177 | }); | 176 | }); |
178 | return div; | 177 | return div; |
179 | } | 178 | } |
@@ -188,7 +187,7 @@ function searchType(ip){ | @@ -188,7 +187,7 @@ function searchType(ip){ | ||
188 | //修改 | 187 | //修改 |
189 | var editBtn = $("<button data-target='#updateModal' data-toggle='modal'>").addClass("btn btn-xs btn-success").html("修改").appendTo(div); | 188 | var editBtn = $("<button data-target='#updateModal' data-toggle='modal'>").addClass("btn btn-xs btn-success").html("修改").appendTo(div); |
190 | editBtn.click(function () { | 189 | editBtn.click(function () { |
191 | - updateMObject(rowData); | 190 | + updateRoot(rowData); |
192 | }); | 191 | }); |
193 | return div; | 192 | return div; |
194 | } | 193 | } |
@@ -204,11 +203,86 @@ function searchType(ip){ | @@ -204,11 +203,86 @@ function searchType(ip){ | ||
204 | 203 | ||
205 | } | 204 | } |
206 | 205 | ||
206 | +/*function updateRoot(rowData){ | ||
207 | + paramObj.name = rowData.name; | ||
208 | + paramObj.root = rowData.root; | ||
209 | + var dialog0 = $("<div>").appendTo($("body")); | ||
210 | + dialog0.dialog({ | ||
211 | + size : "modal-lg", | ||
212 | + title : "修改路径", | ||
213 | + backdrop : "static", | ||
214 | + href : contextPath +"/jsp/zkMonitor/zkRootEdit.jsp", | ||
215 | + buttons : [{ | ||
216 | + text : "关闭", | ||
217 | + className : "btn-danger", | ||
218 | + onclick : function() { | ||
219 | + $(dialog0).dialog("hide"); | ||
220 | + } | ||
221 | + }, { | ||
222 | + text : "提交", | ||
223 | + className : "btn-success", | ||
224 | + onclick : function() { | ||
225 | + | ||
226 | + var dialog = $("<div>").appendTo($("body")); | ||
227 | + dialog.dialog({ | ||
228 | + title :"修改路径", | ||
229 | + backdrop : "static", | ||
230 | + content : "是否修改", | ||
231 | + buttons : [{ | ||
232 | + text : "否", | ||
233 | + className : "btn-danger", | ||
234 | + onclick : function() { | ||
235 | + $(dialog).dialog("hide"); | ||
236 | + } | ||
237 | + }, { | ||
238 | + text : "是", | ||
239 | + className : "btn-success", | ||
240 | + onclick : function() { | ||
241 | + var btn = $(this); | ||
242 | + this.prop("disabled", "disabled");//提交后,按钮变灰 | ||
243 | + | ||
244 | + $("#indexTemplateEditForm").form("submit", { | ||
245 | + submitUrl : contextPath + "/InboxTemplateController/saveInboxTemplate.do", | ||
246 | + submitData : { | ||
247 | + inboxTemplateId : inboxTemplateId, | ||
248 | + inboxTemplateType : inboxTemplateType, | ||
249 | + inboxTemplatePicPath : inboxTemplatePicPath, | ||
250 | + category : category | ||
251 | + }, | ||
252 | + onBeforeSubmit : function() { | ||
253 | + | ||
254 | + if (!$(this).form("validate")) { | ||
255 | + btn.removeAttr("disabled"); | ||
256 | + return false; | ||
257 | + } | ||
258 | + }, | ||
259 | + success : function(data) { | ||
260 | + if (!data || data.code != 200) { | ||
261 | + btn.removeAttr("disabled"); | ||
262 | + $("#indexTemplateEditForm #messageAlert").alerts({ | ||
263 | + content : data.message, | ||
264 | + type : "danger" | ||
265 | + }); | ||
266 | + return; | ||
267 | + } | ||
268 | + $(dialog0).dialog("hide"); | ||
269 | + $("#inboxTemplateListTable").table("load"); | ||
270 | + $(dialog).dialog("hide"); | ||
271 | + } | ||
272 | + }); | ||
273 | + | ||
274 | + } | ||
275 | + }] | ||
276 | + }); | ||
277 | + } | ||
278 | + }] | ||
279 | + }); | ||
280 | +}*/ | ||
207 | 281 | ||
208 | var refreshTypeTree = function () { | 282 | var refreshTypeTree = function () { |
209 | console.log("refresh tree"); | 283 | console.log("refresh tree"); |
210 | treeData = []; //重置 | 284 | treeData = []; //重置 |
211 | - $.get("type/zkTree", function (data, state) { | 285 | + $.get(contextPath+"type/zkTree", function (data, state) { |
212 | console.log(state) | 286 | console.log(state) |
213 | var jsonData = JSON.parse(data); | 287 | var jsonData = JSON.parse(data); |
214 | $.each(jsonData.data, function (n, val) { | 288 | $.each(jsonData.data, function (n, val) { |
-
Please register or login to post a comment