|
|
<%@page language="java" contentType="text/html;charset=utf-8" %>
|
|
|
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
|
|
<%
|
|
|
String path = request.getContextPath();
|
|
|
String basePath = request.getScheme() + "://"
|
|
|
+ request.getServerName() + ":" + request.getServerPort()
|
|
|
+ path + "/";
|
|
|
%>
|
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
|
<html>
|
|
|
<head>
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
|
<link rel="stylesheet" href="<%=basePath %>css/bootstrap.min.css"/>
|
|
|
<link rel="stylesheet" href="<%=basePath %>css/bootstrap-datetimepicker.css"/>
|
|
|
<link href="<%=basePath %>js/bootstrap-plugin/css/bootstrap.table.css" rel="stylesheet" media="screen"/>
|
|
|
<link rel="stylesheet" href="<%=basePath %>css/bootstrap-responsive.min.css"/>
|
|
|
<link rel="stylesheet" href="<%=basePath %>css/fullcalendar.css"/>
|
|
|
<link rel="stylesheet" href="<%=basePath %>css/unicorn.main.css"/>
|
|
|
<link rel="stylesheet" href="<%=basePath %>css/unicorn.grey.css"/>
|
|
|
<link rel="stylesheet" href="<%=basePath %>css/jquery-ui.css"/>
|
|
|
<link rel="stylesheet" href="<%=basePath %>css/uniform.css"/>
|
|
|
<link rel="stylesheet" href="<%=basePath %>css/select2.css"/>
|
|
|
<link rel="stylesheet" href="<%=basePath %>js/jstree/themes/proton/style.css"/>
|
|
|
<link rel="stylesheet" href="<%=basePath %>css/select2.css"/>
|
|
|
<link rel="stylesheet" href="<%=basePath %>css/yoho.css"/>
|
|
|
<script src="<%=basePath %>js/excanvas.min.js" charset="UTF-8" type="text/javascript"></script>
|
|
|
<script src="<%=basePath %>js/jquery-1.12.0.min.js" charset="UTF-8" type="text/javascript"></script>
|
|
|
<script src="<%=basePath %>js/jquery-ui.custom.js" charset="UTF-8" type="text/javascript"></script>
|
|
|
<script src="<%=basePath %>/js/bootstrap.min.js"></script>
|
|
|
<script src="<%=basePath %>/js/unicorn.js"></script>
|
|
|
<script src="<%=basePath %>js/bootstrap-plugin/datetimepicker/moment-with-locales.js" charset="UTF-8"
|
|
|
type="text/javascript"></script>
|
|
|
<script src="<%=basePath %>js/bootstrap-plugin/datetimepicker/bootstrap-datetimepicker.js" charset="UTF-8"
|
|
|
type="text/javascript"></script>
|
|
|
<script src="<%=basePath %>js/global.js" charset="UTF-8" type="text/javascript"></script>
|
|
|
<script src="<%=basePath %>js/bootstrap-plugin/bootstrap.pagination.js" charset="UTF-8"
|
|
|
type="text/javascript"></script>
|
|
|
<script src="<%=basePath %>js/bootstrap-plugin/bootstrap.table.js" charset="UTF-8" type="text/javascript"></script>
|
|
|
<script src="<%=basePath %>js/bootstrap-plugin/bootstrap.dialog.js" charset="UTF-8" type="text/javascript"></script>
|
|
|
<script src="<%=basePath %>js/bootstrap-plugin/bootstrap.form.js" charset="UTF-8" type="text/javascript"></script>
|
|
|
<script src="<%=basePath %>js/bootstrap-plugin/bootstrap.panel.js" charset="UTF-8" type="text/javascript"></script>
|
|
|
<script src="<%=basePath %>js/bootstrap-plugin/bootstrap.alerts.js" charset="UTF-8" type="text/javascript"></script>
|
|
|
<script src="<%=basePath %>js/bootstrap-plugin/bootstrap.accordion.js" charset="UTF-8"
|
|
|
type="text/javascript"></script>
|
|
|
<script src="<%=basePath %>js/bootstrap-plugin/bootstrap.breadcrumb.js" charset="UTF-8"
|
|
|
type="text/javascript"></script>
|
|
|
<script src="<%=basePath %>js/bootstrap-plugin/bootstrap.validate.js" charset="UTF-8"
|
|
|
type="text/javascript"></script>
|
|
|
<script src="<%=basePath %>js/bootstrap-plugin/bootstrap.form.js" charset="UTF-8" type="text/javascript"></script>
|
|
|
<script src="<%=basePath %>js/layer/layer.js" charset="UTF-8" type="text/javascript"></script>
|
|
|
<script src="<%=basePath %>js/bootstrap-plugin/bootstrap.select.js" charset="UTF-8" type="text/javascript"></script>
|
|
|
<script src="<%=basePath %>js/jstree/jstree.js"></script>
|
|
|
<script src="<%=basePath %>js/jquery.toaster.js"></script>
|
|
|
<link href="<%=basePath %>css/jquery.tagsinput.css" rel="stylesheet"/>
|
|
|
<script src="<%=basePath %>js/jquery.tagsinput.min.js" type="text/javascript"></script>
|
|
|
<script>
|
|
|
var contextPath = '<%=basePath %>';
|
|
|
|
|
|
</script>
|
|
|
<title>YOHO!运维</title>
|
|
|
</head>
|
|
|
<body>
|
|
|
|
|
|
<!-- 头部 -->
|
|
|
<div id="head">
|
|
|
|
|
|
</div>
|
|
|
<!-- 右侧具体内容 -->
|
|
|
<div id="content">
|
|
|
|
|
|
<div id="breadcrumb">
|
|
|
<a href="#" title="Go to Home" class="tip-bottom"><i
|
|
|
class="icon-home"></i> Home</a> <a href="#" class="current">监控对象</a>
|
|
|
</div>
|
|
|
|
|
|
<div class="container-fluid">
|
|
|
<div class="widget-box">
|
|
|
<div class="widget-title">
|
|
|
|
|
|
<h5>ZK配置</h5>
|
|
|
|
|
|
</div>
|
|
|
<!-- 树 -->
|
|
|
<div style="float: left;width: 250px;color: #D3D3D3;height: 600px;">
|
|
|
<div class="widget-title" style="height: 50px;">
|
|
|
<h5>节点展示</h5>
|
|
|
</div>
|
|
|
<div class="tree_container" style="height: 540px;color: black;overflow:auto;">
|
|
|
<div id="jstree" class="jstree jstree-default" role="tree" aria-multiselectable="true"
|
|
|
tabindex="0"></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 列表 -->
|
|
|
<div class="widget-content nopadding" style="border-left: 1px solid #E5E5E5;width: 450px;float: left;">
|
|
|
<div class="widget-title" style="height: 50px;">
|
|
|
<h5>根路径</h5>
|
|
|
</div>
|
|
|
<div class="widget-content nopadding">
|
|
|
<div class="tree_container" style="height: 540px;color: black;overflow:auto;">
|
|
|
<div id="rootTable"></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="widget-content nopadding" style="margin-left: 700px;border-left: 1px solid #E5E5E5;">
|
|
|
<div class="widget-title" style="height: 50px;">
|
|
|
<h5>节点详情</h5>
|
|
|
</div>
|
|
|
<div class="widget-content nopadding">
|
|
|
<div class="tree_container" style="height: 540px;color: black;overflow:auto;">
|
|
|
<div id="detailTable"></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</body>
|
|
|
<script type="text/javascript" src="<%=basePath %>/script/yoho.type.zktree.log4j.js"></script>
|
|
|
<script>
|
|
|
function toDetail(rowData,ip){
|
|
|
$("#detailTable").show();
|
|
|
$(function () {
|
|
|
$("#detailTable").table({
|
|
|
url: contextPath + "/zkTree/getAll?ip="+ip+"&zkPath="+rowData.root,
|
|
|
striped : true,
|
|
|
pagination : false,
|
|
|
loadFilter: function (data) {
|
|
|
return defaultLoadFilter(data);
|
|
|
},
|
|
|
columns: [{
|
|
|
title: "名称",
|
|
|
width:"60%",
|
|
|
align:"left",
|
|
|
field: "zkName"
|
|
|
}/*, {
|
|
|
title: "值",
|
|
|
width:"20%",
|
|
|
field: "zkValue"
|
|
|
}*/, {
|
|
|
title: "操作",
|
|
|
width:"20%",
|
|
|
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 () {
|
|
|
updateMObject(rowData);
|
|
|
});*/
|
|
|
return div;
|
|
|
}
|
|
|
}],
|
|
|
});
|
|
|
|
|
|
});
|
|
|
}
|
|
|
|
|
|
function updateMObject(rowData){
|
|
|
paramObj.zkPath = rowData.zkPath;
|
|
|
paramObj.zkValue = rowData.zkValue;
|
|
|
paramObj.zkName = rowData.zkName;
|
|
|
var dialog0 = $("<div>").appendTo($("body"));
|
|
|
dialog0.dialog({
|
|
|
size : "modal-lg",
|
|
|
title : "修改路径",
|
|
|
backdrop : "static",
|
|
|
href : contextPath +"/jsp/zkMonitor/zkMonitorEdit.jsp",
|
|
|
buttons : [{
|
|
|
text : "关闭",
|
|
|
className : "btn-danger",
|
|
|
onclick : function() {
|
|
|
$(dialog0).dialog("hide");
|
|
|
}
|
|
|
}, {
|
|
|
text : "提交",
|
|
|
className : "btn-success",
|
|
|
onclick : function() {
|
|
|
|
|
|
var btn = $(this);
|
|
|
$(dialog0).dialog("hide");
|
|
|
$("#zkInfoForm").form("submit", {
|
|
|
submitUrl : contextPath + "/zkTree/editDetail.do",
|
|
|
submitData : {
|
|
|
ip : rowData.ip,
|
|
|
zkPath : rowData.zkPath
|
|
|
},
|
|
|
onBeforeSubmit : function() {
|
|
|
|
|
|
if (!$(this).form("validate")) {
|
|
|
btn.removeAttr("disabled");
|
|
|
return false;
|
|
|
}
|
|
|
},
|
|
|
success : function(data) {
|
|
|
var mes="";
|
|
|
if(data.data==1){
|
|
|
mes="修改成功";
|
|
|
}else{
|
|
|
mes="修改失败";
|
|
|
}
|
|
|
if(data.data==1){
|
|
|
|
|
|
var dialog = $("<div>").appendTo($("body"));
|
|
|
dialog.dialog({
|
|
|
title :mes,
|
|
|
backdrop : "static",
|
|
|
content : mes,
|
|
|
buttons : [{
|
|
|
text : "确定",
|
|
|
className : "btn-success",
|
|
|
onclick : function() {
|
|
|
$(dialog).dialog("hide");
|
|
|
$("#detailTable").table("load");
|
|
|
}
|
|
|
}]
|
|
|
});
|
|
|
}
|
|
|
$(dialog0).dialog("hide");
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
}]
|
|
|
});
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
<script src="<%=basePath %>script/common/genarate_left_panel.js"></script>
|
|
|
<script type="text/javascript">
|
|
|
$("#li_config").addClass("active open");
|
|
|
$("#li_zkMonitor_log4j").addClass("active");
|
|
|
</script>
|
|
|
</html> |
|
|
\ No newline at end of file |
...
|
...
|
|