mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
add wall.html page
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
<script src="js/common.js" type="text/javascript" charset="utf8"></script>
|
||||
<script>
|
||||
function init() {
|
||||
druid.common.buildHead(7);
|
||||
druid.common.buildHead(8);
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
@@ -1,177 +1,178 @@
|
||||
$.namespace("druid.common");
|
||||
druid.common = function () {
|
||||
var statViewOrderBy = '';
|
||||
var statViewOrderBy_old = '';
|
||||
var statViewOrderType = 'asc';
|
||||
|
||||
// only one page for now
|
||||
var sqlViewPage = 1;
|
||||
var sqlViewPerPageCount = 1000000;
|
||||
|
||||
return {
|
||||
init : function() {
|
||||
this.buildFooter();
|
||||
},
|
||||
|
||||
buildHead : function(index) {
|
||||
var html = '<div class="navbar navbar-fixed-top">'+
|
||||
' <div class="navbar-inner">'+
|
||||
' <div class="container">'+
|
||||
' <a href="https://github.com/AlibabaTech/druid/wiki" target="_blank" class="brand">Druid Monitor</a>'+
|
||||
' <div class="nav-collapse">'+
|
||||
' <ul class="nav">'+
|
||||
' <li><a href="index.html">Index</a></li>'+
|
||||
' <li><a href="datasource.html">DataSource</a></li>'+
|
||||
' <li><a href="sql.html">SQL</a></li>'+
|
||||
' <li><a href="webapp.html">WebApp</a></li>'+
|
||||
' <li><a href="weburi.html">WebURI</a></li>'+
|
||||
' <li><a href="websession.html">Web Session</a></li>'+
|
||||
' <li><a href="spring.html">Spring</a></li>'+
|
||||
' <li><a href="api.html">JSON API</a></li>'+
|
||||
' </ul>'+
|
||||
' <a class="btn btn-primary" href="javascript:druid.common.ajaxRequestForReset();">Reset All</a>'+
|
||||
' </div>'+
|
||||
' </div>'+
|
||||
' </div>'+
|
||||
'</div>';
|
||||
$(document.body).prepend(html);
|
||||
$(".navbar .nav li").eq(index).addClass("active");
|
||||
},
|
||||
|
||||
buildFooter : function() {
|
||||
var html = '<footer class="footer">'+
|
||||
' <div class="container">'+
|
||||
' powered by <a href="https://github.com/AlibabaTech/" target="_blank">AlibabaTech</a> & <a href="http://www.sandzhang.com/" target="_blank">sandzhang</a> & <a href="http://melin.iteye.com/" target="_blank">melin</a> & <a href="https://github.com/shrekwang" target="_blank">shrek.wang</a><br/>'+
|
||||
' <img src="img/logo.jpg" />'
|
||||
' </div>'+
|
||||
'</footer>';
|
||||
$(document.body).append(html);
|
||||
},
|
||||
|
||||
ajaxRequestForReset : function() {
|
||||
if(!confirm("Are you sure to reset all stat? It'll clear all stat data !")){
|
||||
return;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: "reset-all.json",
|
||||
success: function(data) {
|
||||
if (data.ResultCode == 1) {
|
||||
alert("already reset all stat");
|
||||
}
|
||||
},
|
||||
dataType: "json"
|
||||
});
|
||||
},
|
||||
|
||||
getAjaxUrl : function(uri) {
|
||||
var result = uri;
|
||||
|
||||
if (statViewOrderBy != undefined)
|
||||
result += 'orderBy=' + statViewOrderBy + '&';
|
||||
|
||||
if (statViewOrderType != undefined)
|
||||
result += 'orderType=' + statViewOrderType + '&';
|
||||
|
||||
if (sqlViewPage != undefined)
|
||||
result += 'page=' + sqlViewPage + '&';
|
||||
|
||||
if (sqlViewPerPageCount != undefined)
|
||||
result += 'perPageCount=' + sqlViewPerPageCount + '&';
|
||||
|
||||
return result;
|
||||
},
|
||||
|
||||
resetSortMark : function() {
|
||||
var divObj = document.getElementById('th-' + statViewOrderBy);
|
||||
var old_divObj = document.getElementById('th-' + statViewOrderBy_old);
|
||||
var replaceToStr = '';
|
||||
if (old_divObj) {
|
||||
var html = old_divObj.innerHTML;
|
||||
if (statViewOrderBy_old.indexOf('[') > 0)
|
||||
replaceToStr = '-';
|
||||
html = html.replace('▲', replaceToStr);
|
||||
html = html.replace('▼', replaceToStr);
|
||||
old_divObj.innerHTML = html
|
||||
}
|
||||
if (divObj) {
|
||||
var html = divObj.innerHTML;
|
||||
if (statViewOrderBy.indexOf('[') > 0)
|
||||
html = '';
|
||||
|
||||
if (statViewOrderType == 'asc') {
|
||||
html += '▲';
|
||||
} else if (statViewOrderType == 'desc') {
|
||||
html += '▼';
|
||||
}
|
||||
divObj.innerHTML = html;
|
||||
}
|
||||
|
||||
this.ajaxRequestForBasicInfo();
|
||||
},
|
||||
|
||||
setOrderBy : function(orderBy) {
|
||||
if (statViewOrderBy != orderBy) {
|
||||
statViewOrderBy_old = statViewOrderBy;
|
||||
statViewOrderBy = orderBy;
|
||||
statViewOrderType = 'desc';
|
||||
druid.common.resetSortMark();
|
||||
return;
|
||||
}
|
||||
|
||||
statViewOrderBy_old = statViewOrderBy;
|
||||
|
||||
if (statViewOrderType == 'asc')
|
||||
statViewOrderType = 'desc'
|
||||
else
|
||||
statViewOrderType = 'asc';
|
||||
|
||||
druid.common.resetSortMark();
|
||||
},
|
||||
|
||||
ajaxuri : "",
|
||||
handleAjaxResult : null,
|
||||
ajaxRequestForBasicInfo : function() {
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: druid.common.getAjaxUrl(druid.common.ajaxuri),
|
||||
success: function(data) {
|
||||
druid.common.handleAjaxResult(data);
|
||||
},
|
||||
dataType: "json"
|
||||
});
|
||||
},
|
||||
|
||||
subSqlString : function(sql, len) {
|
||||
if (sql == undefined || sql == null) {
|
||||
return '';
|
||||
}
|
||||
|
||||
if (sql.length <= len)
|
||||
return sql;
|
||||
return sql.substr(0, len) + '...';
|
||||
},
|
||||
|
||||
stripes : function() {
|
||||
$("#dataTable tbody tr").each(function () {
|
||||
$(this).removeClass("striped");
|
||||
});
|
||||
$("#dataTable tbody tr:even").each(function () {
|
||||
$(this).addClass("striped");
|
||||
});
|
||||
},
|
||||
|
||||
getUrlVar : function(name) {
|
||||
var vars = {};
|
||||
var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
|
||||
vars[key] = value;
|
||||
});
|
||||
return vars[name];
|
||||
}
|
||||
}
|
||||
}();
|
||||
|
||||
$(document).ready(function() {
|
||||
druid.common.init();
|
||||
});
|
||||
$.namespace("druid.common");
|
||||
druid.common = function () {
|
||||
var statViewOrderBy = '';
|
||||
var statViewOrderBy_old = '';
|
||||
var statViewOrderType = 'asc';
|
||||
|
||||
// only one page for now
|
||||
var sqlViewPage = 1;
|
||||
var sqlViewPerPageCount = 1000000;
|
||||
|
||||
return {
|
||||
init : function() {
|
||||
this.buildFooter();
|
||||
},
|
||||
|
||||
buildHead : function(index) {
|
||||
var html = '<div class="navbar navbar-fixed-top">'+
|
||||
' <div class="navbar-inner">'+
|
||||
' <div class="container">'+
|
||||
' <a href="https://github.com/AlibabaTech/druid/wiki" target="_blank" class="brand">Druid Monitor</a>'+
|
||||
' <div class="nav-collapse">'+
|
||||
' <ul class="nav">'+
|
||||
' <li><a href="index.html">Index</a></li>'+
|
||||
' <li><a href="datasource.html">DataSource</a></li>'+
|
||||
' <li><a href="sql.html">SQL</a></li>'+
|
||||
' <li><a href="wall.html">Wall</a></li>'+
|
||||
' <li><a href="webapp.html">WebApp</a></li>'+
|
||||
' <li><a href="weburi.html">WebURI</a></li>'+
|
||||
' <li><a href="websession.html">Web Session</a></li>'+
|
||||
' <li><a href="spring.html">Spring</a></li>'+
|
||||
' <li><a href="api.html">JSON API</a></li>'+
|
||||
' </ul>'+
|
||||
' <a class="btn btn-primary" href="javascript:druid.common.ajaxRequestForReset();">Reset All</a>'+
|
||||
' </div>'+
|
||||
' </div>'+
|
||||
' </div>'+
|
||||
'</div>';
|
||||
$(document.body).prepend(html);
|
||||
$(".navbar .nav li").eq(index).addClass("active");
|
||||
},
|
||||
|
||||
buildFooter : function() {
|
||||
var html = '<footer class="footer">'+
|
||||
' <div class="container">'+
|
||||
' powered by <a href="https://github.com/AlibabaTech/" target="_blank">AlibabaTech</a> & <a href="http://www.sandzhang.com/" target="_blank">sandzhang</a> & <a href="http://melin.iteye.com/" target="_blank">melin</a> & <a href="https://github.com/shrekwang" target="_blank">shrek.wang</a><br/>'+
|
||||
' <img src="img/logo.jpg" />'
|
||||
' </div>'+
|
||||
'</footer>';
|
||||
$(document.body).append(html);
|
||||
},
|
||||
|
||||
ajaxRequestForReset : function() {
|
||||
if(!confirm("Are you sure to reset all stat? It'll clear all stat data !")){
|
||||
return;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: "reset-all.json",
|
||||
success: function(data) {
|
||||
if (data.ResultCode == 1) {
|
||||
alert("already reset all stat");
|
||||
}
|
||||
},
|
||||
dataType: "json"
|
||||
});
|
||||
},
|
||||
|
||||
getAjaxUrl : function(uri) {
|
||||
var result = uri;
|
||||
|
||||
if (statViewOrderBy != undefined)
|
||||
result += 'orderBy=' + statViewOrderBy + '&';
|
||||
|
||||
if (statViewOrderType != undefined)
|
||||
result += 'orderType=' + statViewOrderType + '&';
|
||||
|
||||
if (sqlViewPage != undefined)
|
||||
result += 'page=' + sqlViewPage + '&';
|
||||
|
||||
if (sqlViewPerPageCount != undefined)
|
||||
result += 'perPageCount=' + sqlViewPerPageCount + '&';
|
||||
|
||||
return result;
|
||||
},
|
||||
|
||||
resetSortMark : function() {
|
||||
var divObj = document.getElementById('th-' + statViewOrderBy);
|
||||
var old_divObj = document.getElementById('th-' + statViewOrderBy_old);
|
||||
var replaceToStr = '';
|
||||
if (old_divObj) {
|
||||
var html = old_divObj.innerHTML;
|
||||
if (statViewOrderBy_old.indexOf('[') > 0)
|
||||
replaceToStr = '-';
|
||||
html = html.replace('▲', replaceToStr);
|
||||
html = html.replace('▼', replaceToStr);
|
||||
old_divObj.innerHTML = html
|
||||
}
|
||||
if (divObj) {
|
||||
var html = divObj.innerHTML;
|
||||
if (statViewOrderBy.indexOf('[') > 0)
|
||||
html = '';
|
||||
|
||||
if (statViewOrderType == 'asc') {
|
||||
html += '▲';
|
||||
} else if (statViewOrderType == 'desc') {
|
||||
html += '▼';
|
||||
}
|
||||
divObj.innerHTML = html;
|
||||
}
|
||||
|
||||
this.ajaxRequestForBasicInfo();
|
||||
},
|
||||
|
||||
setOrderBy : function(orderBy) {
|
||||
if (statViewOrderBy != orderBy) {
|
||||
statViewOrderBy_old = statViewOrderBy;
|
||||
statViewOrderBy = orderBy;
|
||||
statViewOrderType = 'desc';
|
||||
druid.common.resetSortMark();
|
||||
return;
|
||||
}
|
||||
|
||||
statViewOrderBy_old = statViewOrderBy;
|
||||
|
||||
if (statViewOrderType == 'asc')
|
||||
statViewOrderType = 'desc'
|
||||
else
|
||||
statViewOrderType = 'asc';
|
||||
|
||||
druid.common.resetSortMark();
|
||||
},
|
||||
|
||||
ajaxuri : "",
|
||||
handleAjaxResult : null,
|
||||
ajaxRequestForBasicInfo : function() {
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: druid.common.getAjaxUrl(druid.common.ajaxuri),
|
||||
success: function(data) {
|
||||
druid.common.handleAjaxResult(data);
|
||||
},
|
||||
dataType: "json"
|
||||
});
|
||||
},
|
||||
|
||||
subSqlString : function(sql, len) {
|
||||
if (sql == undefined || sql == null) {
|
||||
return '';
|
||||
}
|
||||
|
||||
if (sql.length <= len)
|
||||
return sql;
|
||||
return sql.substr(0, len) + '...';
|
||||
},
|
||||
|
||||
stripes : function() {
|
||||
$("#dataTable tbody tr").each(function () {
|
||||
$(this).removeClass("striped");
|
||||
});
|
||||
$("#dataTable tbody tr:even").each(function () {
|
||||
$(this).addClass("striped");
|
||||
});
|
||||
},
|
||||
|
||||
getUrlVar : function(name) {
|
||||
var vars = {};
|
||||
var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
|
||||
vars[key] = value;
|
||||
});
|
||||
return vars[name];
|
||||
}
|
||||
}
|
||||
}();
|
||||
|
||||
$(document).ready(function() {
|
||||
druid.common.init();
|
||||
});
|
||||
|
||||
@@ -1,97 +1,97 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Druid Spring Stat</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8" />
|
||||
<link href='css/bootstrap.min.css' rel="stylesheet" />
|
||||
<link href="css/style.css" type="text/css" rel="stylesheet"/>
|
||||
<script type="text/javascript" src="js/jquery.min.js"></script>
|
||||
<script src="js/common.js" type="text/javascript" charset="utf8"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<h3>
|
||||
Spring Stat
|
||||
<a href="spring.json" target="_blank">View JSON API</a>
|
||||
</h3>
|
||||
<table id="dataTable" class="table table-bordered table-striped responsive-utilities">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>N</th>
|
||||
<th><a id="th-Class" href="javascript:void(0);">Class</a></th>
|
||||
<th><a id="th-Method" href="javascript:void(0);">Method</a></th>
|
||||
<th width="50"><a id="th-ExecuteCount" href="javascript:void(0);">ExecCount</a></th>
|
||||
<th width="50"><a id="th-ExecuteTimeMillis" href="javascript:void(0);" title="ExecuteTimeMillis">ExecTime</a></th>
|
||||
<th width="50"><a id="th-RunningCount" href="javascript:void(0);">RunningCount</a></th>
|
||||
<th width="80" title="Concurrent Max"><a id="th-ConcurrentMax" href="javascript:void(0);">Concurrent</a></th>
|
||||
<th width="80" title="Jdbc Exec Count"><a id="th-JdbcExecuteCount" href="javascript:void(0);">JdbcCount</a></th>
|
||||
<th width="80" title="JdbcExecuteTimeMillis"><a id="th-JdbcExecuteTimeMillis" href="javascript:void(0);">JdbcTime</a></th>
|
||||
<th width="80"><a id="th-JdbcCommitCount" href="javascript:void(0);">JdbcCommit</a></th>
|
||||
<th width="80"><a id="th-JdbcRollbackCount" href="javascript:void(0);">JdbcRollback</a></th>
|
||||
<th width="80"><a id="th-JdbcFetchRowCount" href="javascript:void(0);">JdbcFetchRow</a></th>
|
||||
<th width="80"><a id="th-JdbcUpdateCount" href="javascript:void(0);">JdbcUpdate</a></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$.namespace("druid.spring");
|
||||
druid.spring = function () {
|
||||
return {
|
||||
init : function() {
|
||||
$("#dataTable th a").click(function(obj) {
|
||||
druid.common.setOrderBy(obj.target.id.substring(3))
|
||||
})
|
||||
druid.common.buildHead(6);
|
||||
druid.common.ajaxuri = 'spring.json?';
|
||||
druid.common.handleAjaxResult = druid.spring.handleAjaxResult;
|
||||
druid.common.ajaxRequestForBasicInfo();
|
||||
setInterval("druid.common.ajaxRequestForBasicInfo();",5000);
|
||||
},
|
||||
|
||||
handleAjaxResult : function(data) {
|
||||
var statList = data.Content;
|
||||
if(statList==null) return;
|
||||
|
||||
var sqlStatTable = document.getElementById("dataTable");
|
||||
while (sqlStatTable.rows.length > 1) {
|
||||
sqlStatTable.deleteRow(1);
|
||||
}
|
||||
|
||||
var html = "";
|
||||
for ( var i = 0; i < statList.length; i++) {
|
||||
var stat = statList[i];
|
||||
var newRow = sqlStatTable.insertRow(-1);
|
||||
html += "<tr>";
|
||||
html += "<td>" + (i + 1) + "</td>";
|
||||
html += "<td>" + stat.Class + "</td>";
|
||||
html += "<td>" + '<a target="_blank" href="spring-detail.html?class=' + stat.Class + '&method=' + stat.Method + '">' + stat.Method + '</a>' + "</td>";
|
||||
html += "<td>" + stat.ExecuteCount + "</td>";
|
||||
html += "<td>" + stat.ExecuteTimeMillis + "</td>";
|
||||
html += "<td>" + stat.RunningCount + "</td>";
|
||||
html += "<td>" + stat.ConcurrentMax + "</td>";
|
||||
html += "<td>" + stat.JdbcExecuteCount + "</td>";
|
||||
html += "<td>" + stat.JdbcExecuteTimeMillis + "</td>";
|
||||
html += "<td>" + stat.JdbcCommitCount + "</td>";
|
||||
html += "<td>" + stat.JdbcRollbackCount + "</td>";
|
||||
html += "<td>" + stat.JdbcFetchRowCount + "</td>";
|
||||
html += "<td>" + stat.JdbcUpdateCount + "</td>";
|
||||
html += "</tr>";
|
||||
}
|
||||
$("#dataTable tbody").html(html);
|
||||
druid.common.stripes();
|
||||
}
|
||||
}
|
||||
}();
|
||||
|
||||
$(document).ready(function() {
|
||||
druid.spring.init();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Druid Spring Stat</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8" />
|
||||
<link href='css/bootstrap.min.css' rel="stylesheet" />
|
||||
<link href="css/style.css" type="text/css" rel="stylesheet"/>
|
||||
<script type="text/javascript" src="js/jquery.min.js"></script>
|
||||
<script src="js/common.js" type="text/javascript" charset="utf8"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<h3>
|
||||
Spring Stat
|
||||
<a href="spring.json" target="_blank">View JSON API</a>
|
||||
</h3>
|
||||
<table id="dataTable" class="table table-bordered table-striped responsive-utilities">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>N</th>
|
||||
<th><a id="th-Class" href="javascript:void(0);">Class</a></th>
|
||||
<th><a id="th-Method" href="javascript:void(0);">Method</a></th>
|
||||
<th width="50"><a id="th-ExecuteCount" href="javascript:void(0);">ExecCount</a></th>
|
||||
<th width="50"><a id="th-ExecuteTimeMillis" href="javascript:void(0);" title="ExecuteTimeMillis">ExecTime</a></th>
|
||||
<th width="50"><a id="th-RunningCount" href="javascript:void(0);">RunningCount</a></th>
|
||||
<th width="80" title="Concurrent Max"><a id="th-ConcurrentMax" href="javascript:void(0);">Concurrent</a></th>
|
||||
<th width="80" title="Jdbc Exec Count"><a id="th-JdbcExecuteCount" href="javascript:void(0);">JdbcCount</a></th>
|
||||
<th width="80" title="JdbcExecuteTimeMillis"><a id="th-JdbcExecuteTimeMillis" href="javascript:void(0);">JdbcTime</a></th>
|
||||
<th width="80"><a id="th-JdbcCommitCount" href="javascript:void(0);">JdbcCommit</a></th>
|
||||
<th width="80"><a id="th-JdbcRollbackCount" href="javascript:void(0);">JdbcRollback</a></th>
|
||||
<th width="80"><a id="th-JdbcFetchRowCount" href="javascript:void(0);">JdbcFetchRow</a></th>
|
||||
<th width="80"><a id="th-JdbcUpdateCount" href="javascript:void(0);">JdbcUpdate</a></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$.namespace("druid.spring");
|
||||
druid.spring = function () {
|
||||
return {
|
||||
init : function() {
|
||||
$("#dataTable th a").click(function(obj) {
|
||||
druid.common.setOrderBy(obj.target.id.substring(3))
|
||||
})
|
||||
druid.common.buildHead(7);
|
||||
druid.common.ajaxuri = 'spring.json?';
|
||||
druid.common.handleAjaxResult = druid.spring.handleAjaxResult;
|
||||
druid.common.ajaxRequestForBasicInfo();
|
||||
setInterval("druid.common.ajaxRequestForBasicInfo();",5000);
|
||||
},
|
||||
|
||||
handleAjaxResult : function(data) {
|
||||
var statList = data.Content;
|
||||
if(statList==null) return;
|
||||
|
||||
var sqlStatTable = document.getElementById("dataTable");
|
||||
while (sqlStatTable.rows.length > 1) {
|
||||
sqlStatTable.deleteRow(1);
|
||||
}
|
||||
|
||||
var html = "";
|
||||
for ( var i = 0; i < statList.length; i++) {
|
||||
var stat = statList[i];
|
||||
var newRow = sqlStatTable.insertRow(-1);
|
||||
html += "<tr>";
|
||||
html += "<td>" + (i + 1) + "</td>";
|
||||
html += "<td>" + stat.Class + "</td>";
|
||||
html += "<td>" + '<a target="_blank" href="spring-detail.html?class=' + stat.Class + '&method=' + stat.Method + '">' + stat.Method + '</a>' + "</td>";
|
||||
html += "<td>" + stat.ExecuteCount + "</td>";
|
||||
html += "<td>" + stat.ExecuteTimeMillis + "</td>";
|
||||
html += "<td>" + stat.RunningCount + "</td>";
|
||||
html += "<td>" + stat.ConcurrentMax + "</td>";
|
||||
html += "<td>" + stat.JdbcExecuteCount + "</td>";
|
||||
html += "<td>" + stat.JdbcExecuteTimeMillis + "</td>";
|
||||
html += "<td>" + stat.JdbcCommitCount + "</td>";
|
||||
html += "<td>" + stat.JdbcRollbackCount + "</td>";
|
||||
html += "<td>" + stat.JdbcFetchRowCount + "</td>";
|
||||
html += "<td>" + stat.JdbcUpdateCount + "</td>";
|
||||
html += "</tr>";
|
||||
}
|
||||
$("#dataTable tbody").html(html);
|
||||
druid.common.stripes();
|
||||
}
|
||||
}
|
||||
}();
|
||||
|
||||
$(document).ready(function() {
|
||||
druid.spring.init();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,149 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Druid DataSourceStat</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8" />
|
||||
<link href='css/bootstrap.min.css' rel="stylesheet" />
|
||||
<link href="css/style.css" type="text/css" rel="stylesheet"/>
|
||||
<script type="text/javascript" src="js/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="js/bootstrap.min.js"></script>
|
||||
<script src="js/common.js" type="text/javascript" charset="utf8"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<h3>
|
||||
Wall Stat
|
||||
<a href="wall.json" target="_blank">View JSON API</a>
|
||||
</h3>
|
||||
<table id="dataTable" style="background-color: #fff" class="table table-bordered responsive-utilities">
|
||||
<tr >
|
||||
<td valign="top" width="100" class="td_lable">CheckCount</td>
|
||||
<td id="CheckCount" width="100"></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr >
|
||||
<td valign="top" class="td_lable"> ViolationCount </td>
|
||||
<td id="ViolationCount"> </td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr >
|
||||
<td valign="top" class="td_lable"> BlackListHitCount </td>
|
||||
<td id="BlackListHitCount"></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr >
|
||||
<td valign="top" class="td_lable"> BlackListSize </td>
|
||||
<td id="BlackListSize"></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr >
|
||||
<td valign="top" class="td_lable"> WhiteListHitCount </td>
|
||||
<td id="WhiteListHitCount"></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr >
|
||||
<td valign="top" class="td_lable"> WhiteListSize </td>
|
||||
<td id="WhiteListSize"></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" class="td_lable"> SyntaxErrrorCount </td>
|
||||
<td id="SyntaxErrrorCount"></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table id="dataTable1" style="background-color: #fff" class="table table-bordered responsive-utilities">
|
||||
<thead>
|
||||
<tr >
|
||||
<td valign="top" width="100" class="td_lable">Table Name</td>
|
||||
<td valign="top" width="100" class="td_lable">SelectCount</td>
|
||||
<td valign="top" width="100" class="td_lable">SelectIntoCount</td>
|
||||
<td valign="top" width="100" class="td_lable">InsertCount</td>
|
||||
<td valign="top" width="100" class="td_lable">UpdateCount</td>
|
||||
<td valign="top" width="100" class="td_lable">DeleteCount</td>
|
||||
<td valign="top" width="100" class="td_lable">TruncateCount</td>
|
||||
<td valign="top" width="100" class="td_lable">CreateCount</td>
|
||||
<td valign="top" width="100" class="td_lable">AlterCount</td>
|
||||
<td valign="top" width="100" class="td_lable">DropCount</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
<table id="dataTable2" style="background-color: #fff" class="table table-bordered responsive-utilities">
|
||||
<thead>
|
||||
<tr >
|
||||
<td valign="top" width="100" class="td_lable">Function Name</td>
|
||||
<td valign="top" width="100" class="td_lable">InvokeCount</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$.namespace("druid.datasource");
|
||||
druid.datasource = function () {
|
||||
return {
|
||||
init : function() {
|
||||
druid.common.buildHead(3);
|
||||
this.ajaxRequestForBasicInfo();
|
||||
},
|
||||
|
||||
ajaxRequestForBasicInfo : function() {
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: "wall.json",
|
||||
success: function(data) {
|
||||
$("#CheckCount").text(data.Content.checkCount)
|
||||
$("#ViolationCount").text(data.Content.violationCount)
|
||||
$("#BlackListHitCount").text(data.Content.blackListHitCount)
|
||||
$("#BlackListSize").text(data.Content.blackListSize)
|
||||
$("#WhiteListHitCount").text(data.Content.whiteListHitCount)
|
||||
$("#WhiteListSize").text(data.Content.whiteListSize)
|
||||
$("#SyntaxErrrorCount").text(data.Content.syntaxErrrorCount)
|
||||
|
||||
var html = "";
|
||||
var tables = data.Content.tables;
|
||||
for ( var i = 0; i < tables.length; i++) {
|
||||
var table = tables[i];
|
||||
html += "<tr>";
|
||||
html += "<td>" + table.name + "</td>";
|
||||
html += "<td>" + (table.selectCount ? table.selectCount : 0)+ "</td>";
|
||||
html += "<td>" + (table.selectIntoCount ? table.selectIntoCount : 0) + "</td>";
|
||||
html += "<td>" + (table.insertCount ? table.insertCount : 0) + "</td>";
|
||||
html += "<td>" + (table.updateCount ? table.updateCount : 0) + "</td>";
|
||||
html += "<td>" + (table.deleteCount ? table.deleteCount : 0) + "</td>";
|
||||
html += "<td>" + (table.truncateCount ? table.truncateCount : 0) + "</td>";
|
||||
html += "<td>" + (table.createCount ? table.createCount : 0) + "</td>";
|
||||
html += "<td>" + (table.alterCount ? table.alterCount : 0) + "</td>";
|
||||
html += "<td>" + (table.dropCount ? table.dropCount : 0) + "</td>";
|
||||
html += "</tr>";
|
||||
}
|
||||
$("#dataTable1 tbody").html(html);
|
||||
|
||||
html = "";
|
||||
var functions = data.Content.functions;
|
||||
for ( var i = 0; i < functions.length; i++) {
|
||||
var fun = functions[i];
|
||||
html += "<tr>";
|
||||
html += "<td>" + fun.name + "</td>";
|
||||
html += "<td>" + table.invokeCount + "</td>";
|
||||
html += "</tr>";
|
||||
}
|
||||
$("#dataTable2 tbody").html(html);
|
||||
},
|
||||
dataType: "json"
|
||||
});
|
||||
}
|
||||
}
|
||||
}();
|
||||
|
||||
$(document).ready(function() {
|
||||
druid.datasource.init();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,157 +1,157 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Druid WebApp Stat</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8" />
|
||||
<link href='css/bootstrap.min.css' rel="stylesheet" />
|
||||
<link href="css/style.css" type="text/css" rel="stylesheet"/>
|
||||
<script type="text/javascript" src="js/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="js/bootstrap.min.js"></script>
|
||||
<script src="js/common.js" type="text/javascript" charset="utf8"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<h3>
|
||||
WebAppStat List
|
||||
<a href="webapp.json" target="_blank">View JSON API</a>
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$.namespace("druid.datasource");
|
||||
druid.datasource = function () {
|
||||
var keys = [
|
||||
"ContextPath",
|
||||
"RunningCount",
|
||||
"ConcurrentMax",
|
||||
"RequestCount",
|
||||
"SessionCount",
|
||||
|
||||
"JdbcCommitCount",
|
||||
"JdbcRollbackCount",
|
||||
"JdbcExecuteCount",
|
||||
"JdbcExecuteTimeMillis",
|
||||
"JdbcFetchRowCount",
|
||||
"JdbcUpdateCount",
|
||||
"OSMacOSXCount",
|
||||
"OSWindowsCount",
|
||||
"OSLinuxCount",
|
||||
"OSSymbianCount",
|
||||
"OSFreeBSDCount",
|
||||
"OSOpenBSDCount",
|
||||
"OSAndroidCount",
|
||||
"OSWindows98Count",
|
||||
"OSWindowsXPCount",
|
||||
"OSWindows2000Count",
|
||||
"OSWindowsVistaCount",
|
||||
"OSWindows7Count",
|
||||
"OSAndroid15Count",
|
||||
"OSAndroid16Count",
|
||||
"OSAndroid20Count",
|
||||
"OSAndroid21Count",
|
||||
"OSAndroid22Count",
|
||||
"OSAndroid23Count",
|
||||
"OSAndroid30Count",
|
||||
"OSAndroid31Count",
|
||||
"OSAndroid32Count",
|
||||
"OSAndroid40Count",
|
||||
"OSLinuxUbuntuCount",
|
||||
"BrowserIECount",
|
||||
"BrowserFirefoxCount",
|
||||
"BrowserChromeCount",
|
||||
"BrowserSafariCount",
|
||||
"BrowserOperaCount",
|
||||
"BrowserIE5Count",
|
||||
"BrowserIE6Count",
|
||||
"BrowserIE7Count",
|
||||
"BrowserIE8Count",
|
||||
"BrowserIE9Count",
|
||||
"BrowserIE10Count",
|
||||
"Browser360SECount",
|
||||
"DeviceAndroidCount",
|
||||
"DeviceIpadCount",
|
||||
"DeviceIphoneCount",
|
||||
"DeviceWindowsPhoneCount",
|
||||
"BotCount",
|
||||
"BotBaiduCount",
|
||||
"BotYoudaoCount",
|
||||
"BotGoogleCount",
|
||||
"BotMsnCount",
|
||||
"BotBingCount",
|
||||
"BotSosoCount",
|
||||
"BotSogouCount",
|
||||
"BotYahooCount"
|
||||
];
|
||||
return {
|
||||
init : function() {
|
||||
druid.common.buildHead(3);
|
||||
this.ajaxRequestForBasicInfo();
|
||||
},
|
||||
ajaxRequestForBasicInfo : function() {
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: "webapp.json",
|
||||
success: function(data) {
|
||||
var datasourceList = data.Content;
|
||||
|
||||
var tab = '<ul class="nav nav-tabs" id="datasourceTab">';
|
||||
var content = '<div class="tab-content">';
|
||||
for ( var i = 0; i < datasourceList.length; i++) {
|
||||
var datasource = datasourceList[i];
|
||||
content += druid.datasource.generateDataSourceTable(datasource, i);
|
||||
tab += druid.datasource.generateDataSourceTab(datasource.ContextPath, i);
|
||||
}
|
||||
tab += '</ul>';
|
||||
content += '</div>';
|
||||
|
||||
$(".span12 h3").after(tab + content);
|
||||
|
||||
$('#datasourceTab a').click(function (e) {
|
||||
e.preventDefault();
|
||||
$(this).tab('show');
|
||||
})
|
||||
},
|
||||
dataType: "json"
|
||||
});
|
||||
},
|
||||
|
||||
generateDataSourceTab : function(datasourceId, index) {
|
||||
if(index == 0)
|
||||
return '<li class="active"><a href="#dstab' + datasourceId + '">WebApp-'+datasourceId+'</a></li>';
|
||||
else
|
||||
return '<li><a href="#dstab' + datasourceId + '">DataSource-'+datasourceId+'</a></li>';
|
||||
},
|
||||
|
||||
generateDataSourceTable : function(datasource, index) {
|
||||
var contextPath = datasource.ContextPath;
|
||||
|
||||
if(index == 0)
|
||||
var html = '<div class="tab-pane active" id="dstab' + contextPath + '">';
|
||||
else
|
||||
var html = '<div class="tab-pane" id="dstab' + contextPath + '">';
|
||||
|
||||
html += '<table class="table table-bordered" style="background-color: #fff">';
|
||||
|
||||
for(var i=0, len=keys.length; i<len; i++) {
|
||||
var value = datasource[keys[i]];
|
||||
if(value == null)
|
||||
value = "";
|
||||
|
||||
html += '<tr><td valign="top" class="td_lable">' + keys[i] + '</td><td>' + value + '</td></tr>'
|
||||
}
|
||||
|
||||
html += '</table></div>';
|
||||
return html;
|
||||
}
|
||||
}
|
||||
}();
|
||||
|
||||
$(document).ready(function() {
|
||||
druid.datasource.init();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Druid WebApp Stat</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8" />
|
||||
<link href='css/bootstrap.min.css' rel="stylesheet" />
|
||||
<link href="css/style.css" type="text/css" rel="stylesheet"/>
|
||||
<script type="text/javascript" src="js/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="js/bootstrap.min.js"></script>
|
||||
<script src="js/common.js" type="text/javascript" charset="utf8"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<h3>
|
||||
WebAppStat List
|
||||
<a href="webapp.json" target="_blank">View JSON API</a>
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$.namespace("druid.datasource");
|
||||
druid.datasource = function () {
|
||||
var keys = [
|
||||
"ContextPath",
|
||||
"RunningCount",
|
||||
"ConcurrentMax",
|
||||
"RequestCount",
|
||||
"SessionCount",
|
||||
|
||||
"JdbcCommitCount",
|
||||
"JdbcRollbackCount",
|
||||
"JdbcExecuteCount",
|
||||
"JdbcExecuteTimeMillis",
|
||||
"JdbcFetchRowCount",
|
||||
"JdbcUpdateCount",
|
||||
"OSMacOSXCount",
|
||||
"OSWindowsCount",
|
||||
"OSLinuxCount",
|
||||
"OSSymbianCount",
|
||||
"OSFreeBSDCount",
|
||||
"OSOpenBSDCount",
|
||||
"OSAndroidCount",
|
||||
"OSWindows98Count",
|
||||
"OSWindowsXPCount",
|
||||
"OSWindows2000Count",
|
||||
"OSWindowsVistaCount",
|
||||
"OSWindows7Count",
|
||||
"OSAndroid15Count",
|
||||
"OSAndroid16Count",
|
||||
"OSAndroid20Count",
|
||||
"OSAndroid21Count",
|
||||
"OSAndroid22Count",
|
||||
"OSAndroid23Count",
|
||||
"OSAndroid30Count",
|
||||
"OSAndroid31Count",
|
||||
"OSAndroid32Count",
|
||||
"OSAndroid40Count",
|
||||
"OSLinuxUbuntuCount",
|
||||
"BrowserIECount",
|
||||
"BrowserFirefoxCount",
|
||||
"BrowserChromeCount",
|
||||
"BrowserSafariCount",
|
||||
"BrowserOperaCount",
|
||||
"BrowserIE5Count",
|
||||
"BrowserIE6Count",
|
||||
"BrowserIE7Count",
|
||||
"BrowserIE8Count",
|
||||
"BrowserIE9Count",
|
||||
"BrowserIE10Count",
|
||||
"Browser360SECount",
|
||||
"DeviceAndroidCount",
|
||||
"DeviceIpadCount",
|
||||
"DeviceIphoneCount",
|
||||
"DeviceWindowsPhoneCount",
|
||||
"BotCount",
|
||||
"BotBaiduCount",
|
||||
"BotYoudaoCount",
|
||||
"BotGoogleCount",
|
||||
"BotMsnCount",
|
||||
"BotBingCount",
|
||||
"BotSosoCount",
|
||||
"BotSogouCount",
|
||||
"BotYahooCount"
|
||||
];
|
||||
return {
|
||||
init : function() {
|
||||
druid.common.buildHead(4);
|
||||
this.ajaxRequestForBasicInfo();
|
||||
},
|
||||
ajaxRequestForBasicInfo : function() {
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: "webapp.json",
|
||||
success: function(data) {
|
||||
var datasourceList = data.Content;
|
||||
|
||||
var tab = '<ul class="nav nav-tabs" id="datasourceTab">';
|
||||
var content = '<div class="tab-content">';
|
||||
for ( var i = 0; i < datasourceList.length; i++) {
|
||||
var datasource = datasourceList[i];
|
||||
content += druid.datasource.generateDataSourceTable(datasource, i);
|
||||
tab += druid.datasource.generateDataSourceTab(datasource.ContextPath, i);
|
||||
}
|
||||
tab += '</ul>';
|
||||
content += '</div>';
|
||||
|
||||
$(".span12 h3").after(tab + content);
|
||||
|
||||
$('#datasourceTab a').click(function (e) {
|
||||
e.preventDefault();
|
||||
$(this).tab('show');
|
||||
})
|
||||
},
|
||||
dataType: "json"
|
||||
});
|
||||
},
|
||||
|
||||
generateDataSourceTab : function(datasourceId, index) {
|
||||
if(index == 0)
|
||||
return '<li class="active"><a href="#dstab' + datasourceId + '">WebApp-'+datasourceId+'</a></li>';
|
||||
else
|
||||
return '<li><a href="#dstab' + datasourceId + '">DataSource-'+datasourceId+'</a></li>';
|
||||
},
|
||||
|
||||
generateDataSourceTable : function(datasource, index) {
|
||||
var contextPath = datasource.ContextPath;
|
||||
|
||||
if(index == 0)
|
||||
var html = '<div class="tab-pane active" id="dstab' + contextPath + '">';
|
||||
else
|
||||
var html = '<div class="tab-pane" id="dstab' + contextPath + '">';
|
||||
|
||||
html += '<table class="table table-bordered" style="background-color: #fff">';
|
||||
|
||||
for(var i=0, len=keys.length; i<len; i++) {
|
||||
var value = datasource[keys[i]];
|
||||
if(value == null)
|
||||
value = "";
|
||||
|
||||
html += '<tr><td valign="top" class="td_lable">' + keys[i] + '</td><td>' + value + '</td></tr>'
|
||||
}
|
||||
|
||||
html += '</table></div>';
|
||||
return html;
|
||||
}
|
||||
}
|
||||
}();
|
||||
|
||||
$(document).ready(function() {
|
||||
druid.datasource.init();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,107 +1,107 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Druid Web Session Stat</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8" />
|
||||
<link href='css/bootstrap.min.css' rel="stylesheet" />
|
||||
<link href="css/style.css" type="text/css" rel="stylesheet"/>
|
||||
<script type="text/javascript" src="js/jquery.min.js"></script>
|
||||
<script src="js/common.js" type="text/javascript" charset="utf8"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<h3>
|
||||
Web Session Stat
|
||||
<a href="websession.json" target="_blank">View JSON API</a>
|
||||
</h3>
|
||||
<table id="dataTable" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>N</th>
|
||||
<th><a id="th-SESSIONID" >SESSIONID </a></th>
|
||||
<th width="50"><a id="th-Principal" >Principal</a></th>
|
||||
<th width="100"><a id="th-CreateTime" >CreateTime</a></th>
|
||||
<th width="100"><a id="th-LastAccessTime" >LastAccess</a></th>
|
||||
<th width="50"><a id="th-RemoteAddress" >RemoteAddress</a></th>
|
||||
<th width="50"><a id="th-RequestCount" >RequestCount</a></th>
|
||||
<th width="50" title="RequestTimeMillisTotal"><a id="th-RequestTimeMillisTotal" >RequestTime</a></th>
|
||||
<th width="50"><a id="th-RunningCount" title="Running Count">Running</a></th>
|
||||
<th width="80" title="Concurrent Max"><a id="th-ConcurrentMax" >Concurrent</a></th>
|
||||
<th width="80" title="Jdbc Exec Count"><a id="th-JdbcExecuteCount" >JdbcCount</a></th>
|
||||
<th width="80" title="Jdbc Exec Time"><a id="th-JdbcExecuteTimeMillis" title="JdbcExecuteTimeMillis">JdbcTime</a></th>
|
||||
<th width="80"><a id="th-JdbcCommitCount" >JdbcCommit</a></th>
|
||||
<th width="80"><a id="th-JdbcRollbackCount" >JdbcRollback</a></th>
|
||||
<th width="80"><a id="th-JdbcFetchRowCount" >JdbcFetchRow</a></th>
|
||||
<th width="80"><a id="th-JdbcUpdateCount" >JdbcUpdate</a></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$.namespace("druid.websession");
|
||||
druid.websession = function () {
|
||||
return {
|
||||
init : function() {
|
||||
$("#dataTable th a").click(function(obj) {
|
||||
druid.common.setOrderBy(obj.target.id.substring(3))
|
||||
})
|
||||
druid.common.buildHead(5);
|
||||
druid.common.ajaxuri = 'websession.json?';
|
||||
druid.common.handleAjaxResult = druid.websession.handleAjaxResult;
|
||||
druid.common.ajaxRequestForBasicInfo();
|
||||
setInterval("druid.common.ajaxRequestForBasicInfo();",5000);
|
||||
},
|
||||
|
||||
handleAjaxResult : function(data) {
|
||||
var statList = data.Content;
|
||||
if(statList == null) return;
|
||||
|
||||
var sqlStatTable = document.getElementById("dataTable");
|
||||
while (sqlStatTable.rows.length > 1) {
|
||||
sqlStatTable.deleteRow(1);
|
||||
}
|
||||
|
||||
var html = "";
|
||||
for ( var i = 0; i < statList.length; i++) {
|
||||
var stat = statList[i];
|
||||
var newRow = sqlStatTable.insertRow(-1);
|
||||
html += "<tr>";
|
||||
html += "<td>" + (i + 1) + "</td>";
|
||||
html += "<td>" + '<a target="_blank" href="websession-detail.html?sessionId=' + stat.SESSIONID + '">' + stat.SESSIONID + '</a>';
|
||||
if (stat.Principal) {
|
||||
html += "<td>" + stat.Principal + "</td>";
|
||||
} else {
|
||||
html += "<td></td>";
|
||||
}
|
||||
html += "<td>" + stat.CreateTime + "</td>";
|
||||
html += "<td>" + stat.LastAccessTime + "</td>";
|
||||
html += "<td>" + stat.RemoteAddress + "</td>";
|
||||
html += "<td>" + stat.RequestCount + "</td>";
|
||||
html += "<td>" + stat.RequestTimeMillisTotal + "</td>";
|
||||
html += "<td>" + stat.RunningCount + "</td>";
|
||||
html += "<td>" + stat.ConcurrentMax + "</td>";
|
||||
html += "<td>" + stat.JdbcExecuteCount + "</td>";
|
||||
html += "<td>" + stat.JdbcExecuteTimeMillis + "</td>";
|
||||
html += "<td>" + stat.JdbcCommitCount + "</td>";
|
||||
html += "<td>" + stat.JdbcRollbackCount + "</td>";
|
||||
html += "<td>" + stat.JdbcFetchRowCount + "</td>";
|
||||
html += "<td>" + stat.JdbcUpdateCount + "</td>";
|
||||
html += "</tr>";
|
||||
}
|
||||
$("#dataTable tbody").html(html);
|
||||
druid.common.stripes();
|
||||
}
|
||||
}
|
||||
}();
|
||||
|
||||
$(document).ready(function() {
|
||||
druid.websession.init();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Druid Web Session Stat</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8" />
|
||||
<link href='css/bootstrap.min.css' rel="stylesheet" />
|
||||
<link href="css/style.css" type="text/css" rel="stylesheet"/>
|
||||
<script type="text/javascript" src="js/jquery.min.js"></script>
|
||||
<script src="js/common.js" type="text/javascript" charset="utf8"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<h3>
|
||||
Web Session Stat
|
||||
<a href="websession.json" target="_blank">View JSON API</a>
|
||||
</h3>
|
||||
<table id="dataTable" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>N</th>
|
||||
<th><a id="th-SESSIONID" >SESSIONID </a></th>
|
||||
<th width="50"><a id="th-Principal" >Principal</a></th>
|
||||
<th width="100"><a id="th-CreateTime" >CreateTime</a></th>
|
||||
<th width="100"><a id="th-LastAccessTime" >LastAccess</a></th>
|
||||
<th width="50"><a id="th-RemoteAddress" >RemoteAddress</a></th>
|
||||
<th width="50"><a id="th-RequestCount" >RequestCount</a></th>
|
||||
<th width="50" title="RequestTimeMillisTotal"><a id="th-RequestTimeMillisTotal" >RequestTime</a></th>
|
||||
<th width="50"><a id="th-RunningCount" title="Running Count">Running</a></th>
|
||||
<th width="80" title="Concurrent Max"><a id="th-ConcurrentMax" >Concurrent</a></th>
|
||||
<th width="80" title="Jdbc Exec Count"><a id="th-JdbcExecuteCount" >JdbcCount</a></th>
|
||||
<th width="80" title="Jdbc Exec Time"><a id="th-JdbcExecuteTimeMillis" title="JdbcExecuteTimeMillis">JdbcTime</a></th>
|
||||
<th width="80"><a id="th-JdbcCommitCount" >JdbcCommit</a></th>
|
||||
<th width="80"><a id="th-JdbcRollbackCount" >JdbcRollback</a></th>
|
||||
<th width="80"><a id="th-JdbcFetchRowCount" >JdbcFetchRow</a></th>
|
||||
<th width="80"><a id="th-JdbcUpdateCount" >JdbcUpdate</a></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$.namespace("druid.websession");
|
||||
druid.websession = function () {
|
||||
return {
|
||||
init : function() {
|
||||
$("#dataTable th a").click(function(obj) {
|
||||
druid.common.setOrderBy(obj.target.id.substring(3))
|
||||
})
|
||||
druid.common.buildHead(6);
|
||||
druid.common.ajaxuri = 'websession.json?';
|
||||
druid.common.handleAjaxResult = druid.websession.handleAjaxResult;
|
||||
druid.common.ajaxRequestForBasicInfo();
|
||||
setInterval("druid.common.ajaxRequestForBasicInfo();",5000);
|
||||
},
|
||||
|
||||
handleAjaxResult : function(data) {
|
||||
var statList = data.Content;
|
||||
if(statList == null) return;
|
||||
|
||||
var sqlStatTable = document.getElementById("dataTable");
|
||||
while (sqlStatTable.rows.length > 1) {
|
||||
sqlStatTable.deleteRow(1);
|
||||
}
|
||||
|
||||
var html = "";
|
||||
for ( var i = 0; i < statList.length; i++) {
|
||||
var stat = statList[i];
|
||||
var newRow = sqlStatTable.insertRow(-1);
|
||||
html += "<tr>";
|
||||
html += "<td>" + (i + 1) + "</td>";
|
||||
html += "<td>" + '<a target="_blank" href="websession-detail.html?sessionId=' + stat.SESSIONID + '">' + stat.SESSIONID + '</a>';
|
||||
if (stat.Principal) {
|
||||
html += "<td>" + stat.Principal + "</td>";
|
||||
} else {
|
||||
html += "<td></td>";
|
||||
}
|
||||
html += "<td>" + stat.CreateTime + "</td>";
|
||||
html += "<td>" + stat.LastAccessTime + "</td>";
|
||||
html += "<td>" + stat.RemoteAddress + "</td>";
|
||||
html += "<td>" + stat.RequestCount + "</td>";
|
||||
html += "<td>" + stat.RequestTimeMillisTotal + "</td>";
|
||||
html += "<td>" + stat.RunningCount + "</td>";
|
||||
html += "<td>" + stat.ConcurrentMax + "</td>";
|
||||
html += "<td>" + stat.JdbcExecuteCount + "</td>";
|
||||
html += "<td>" + stat.JdbcExecuteTimeMillis + "</td>";
|
||||
html += "<td>" + stat.JdbcCommitCount + "</td>";
|
||||
html += "<td>" + stat.JdbcRollbackCount + "</td>";
|
||||
html += "<td>" + stat.JdbcFetchRowCount + "</td>";
|
||||
html += "<td>" + stat.JdbcUpdateCount + "</td>";
|
||||
html += "</tr>";
|
||||
}
|
||||
$("#dataTable tbody").html(html);
|
||||
druid.common.stripes();
|
||||
}
|
||||
}
|
||||
}();
|
||||
|
||||
$(document).ready(function() {
|
||||
druid.websession.init();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,98 +1,98 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Druid Web URI Stat</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8" />
|
||||
<link href='css/bootstrap.min.css' rel="stylesheet" />
|
||||
<link href="css/style.css" type="text/css" rel="stylesheet"/>
|
||||
<script type="text/javascript" src="js/jquery.min.js"></script>
|
||||
<script src="js/common.js" type="text/javascript" charset="utf8"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<h3>
|
||||
Web URI Stat
|
||||
<a href="weburi.json" target="_blank">View JSON API</a>
|
||||
</h3>
|
||||
<table id="dataTable" class="table table-bordered table-striped responsive-utilities">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>N</th>
|
||||
<th><a id="th-URI" >URI</a></th>
|
||||
<th width="50"><a id="th-RequestCount" >RequestCount</a></th>
|
||||
<th width="50"><a id="th-RequestTimeMillis" >RequestTime</a></th>
|
||||
<th width="50"><a id="th-RunningCount" >Running</a></th>
|
||||
<th width="50" title="Concurrent Max"><a id="th-ConcurrentMax" >Concurrent</a></th>
|
||||
<th width="50" title="Jdbc Execute Count"><a id="th-JdbcExecuteCount" >JdbcCount</a></th>
|
||||
<th width="50" title="Jdbc Execute Error Count"><a id="th-JdbcExecuteErrorCount" >JdbcError</a></th>
|
||||
<th width="50" title="Jdbc Execute Time"><a id="th-JdbcExecuteTimeMillis" >JdbcTime</a></th>
|
||||
<th width="50"><a id="th-JdbcCommitCount" >JdbcCommit</a></th>
|
||||
<th width="50"><a id="th-JdbcRollbackCount" >JdbcRollback</a></th>
|
||||
<th width="50"><a id="th-JdbcFetchRowCount" >JdbcFetchRow</a></th>
|
||||
<th width="50"><a id="th-JdbcUpdateCount" >JdbcUpdate</a></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$.namespace("druid.weburi");
|
||||
druid.weburi = function () {
|
||||
return {
|
||||
init : function() {
|
||||
$("#dataTable th a").click(function(obj) {
|
||||
druid.common.setOrderBy(obj.target.id.substring(3))
|
||||
})
|
||||
druid.common.buildHead(4);
|
||||
druid.common.ajaxuri = 'weburi.json?';
|
||||
druid.common.handleAjaxResult = druid.weburi.handleAjaxResult;
|
||||
druid.common.setOrderBy("URI");
|
||||
druid.common.ajaxRequestForBasicInfo();
|
||||
setInterval("druid.common.ajaxRequestForBasicInfo();",5000);
|
||||
},
|
||||
|
||||
handleAjaxResult : function(data) {
|
||||
var statList = data.Content;
|
||||
if(statList == null) return;
|
||||
|
||||
var sqlStatTable = document.getElementById("dataTable");
|
||||
while (sqlStatTable.rows.length > 1) {
|
||||
sqlStatTable.deleteRow(1);
|
||||
}
|
||||
|
||||
var html = "";
|
||||
for ( var i = 0; i < statList.length; i++) {
|
||||
var stat = statList[i];
|
||||
var newRow = sqlStatTable.insertRow(-1);
|
||||
html += "<tr>";
|
||||
html += "<td>" + (i + 1) + "</td>";
|
||||
html += "<td>" + '<a target="_blank" href="weburi-detail.html?uri='+ encodeURI(stat.URI) + '">' + druid.common.subSqlString(stat.URI, 64) + '</a>' + "</td>";
|
||||
html += "<td>" + stat.RequestCount + "</td>";
|
||||
html += "<td>" + stat.RequestTimeMillis + "</td>";
|
||||
html += "<td>" + stat.RunningCount + "</td>";
|
||||
html += "<td>" + stat.ConcurrentMax + "</td>";
|
||||
html += "<td>" + stat.JdbcExecuteCount + "</td>";
|
||||
html += "<td>" + stat.JdbcExecuteErrorCount + "</td>";
|
||||
html += "<td>" + stat.JdbcExecuteTimeMillis + "</td>";
|
||||
html += "<td>" + stat.JdbcCommitCount + "</td>";
|
||||
html += "<td>" + stat.JdbcRollbackCount + "</td>";
|
||||
html += "<td>" + stat.JdbcFetchRowCount + "</td>";
|
||||
html += "<td>" + stat.JdbcUpdateCount + "</td>";
|
||||
html += "</tr>";
|
||||
}
|
||||
$("#dataTable tbody").html(html);
|
||||
druid.common.stripes();
|
||||
}
|
||||
}
|
||||
}();
|
||||
|
||||
$(document).ready(function() {
|
||||
druid.weburi.init();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Druid Web URI Stat</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8" />
|
||||
<link href='css/bootstrap.min.css' rel="stylesheet" />
|
||||
<link href="css/style.css" type="text/css" rel="stylesheet"/>
|
||||
<script type="text/javascript" src="js/jquery.min.js"></script>
|
||||
<script src="js/common.js" type="text/javascript" charset="utf8"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<h3>
|
||||
Web URI Stat
|
||||
<a href="weburi.json" target="_blank">View JSON API</a>
|
||||
</h3>
|
||||
<table id="dataTable" class="table table-bordered table-striped responsive-utilities">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>N</th>
|
||||
<th><a id="th-URI" >URI</a></th>
|
||||
<th width="50"><a id="th-RequestCount" >RequestCount</a></th>
|
||||
<th width="50"><a id="th-RequestTimeMillis" >RequestTime</a></th>
|
||||
<th width="50"><a id="th-RunningCount" >Running</a></th>
|
||||
<th width="50" title="Concurrent Max"><a id="th-ConcurrentMax" >Concurrent</a></th>
|
||||
<th width="50" title="Jdbc Execute Count"><a id="th-JdbcExecuteCount" >JdbcCount</a></th>
|
||||
<th width="50" title="Jdbc Execute Error Count"><a id="th-JdbcExecuteErrorCount" >JdbcError</a></th>
|
||||
<th width="50" title="Jdbc Execute Time"><a id="th-JdbcExecuteTimeMillis" >JdbcTime</a></th>
|
||||
<th width="50"><a id="th-JdbcCommitCount" >JdbcCommit</a></th>
|
||||
<th width="50"><a id="th-JdbcRollbackCount" >JdbcRollback</a></th>
|
||||
<th width="50"><a id="th-JdbcFetchRowCount" >JdbcFetchRow</a></th>
|
||||
<th width="50"><a id="th-JdbcUpdateCount" >JdbcUpdate</a></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$.namespace("druid.weburi");
|
||||
druid.weburi = function () {
|
||||
return {
|
||||
init : function() {
|
||||
$("#dataTable th a").click(function(obj) {
|
||||
druid.common.setOrderBy(obj.target.id.substring(3))
|
||||
})
|
||||
druid.common.buildHead(5);
|
||||
druid.common.ajaxuri = 'weburi.json?';
|
||||
druid.common.handleAjaxResult = druid.weburi.handleAjaxResult;
|
||||
druid.common.setOrderBy("URI");
|
||||
druid.common.ajaxRequestForBasicInfo();
|
||||
setInterval("druid.common.ajaxRequestForBasicInfo();",5000);
|
||||
},
|
||||
|
||||
handleAjaxResult : function(data) {
|
||||
var statList = data.Content;
|
||||
if(statList == null) return;
|
||||
|
||||
var sqlStatTable = document.getElementById("dataTable");
|
||||
while (sqlStatTable.rows.length > 1) {
|
||||
sqlStatTable.deleteRow(1);
|
||||
}
|
||||
|
||||
var html = "";
|
||||
for ( var i = 0; i < statList.length; i++) {
|
||||
var stat = statList[i];
|
||||
var newRow = sqlStatTable.insertRow(-1);
|
||||
html += "<tr>";
|
||||
html += "<td>" + (i + 1) + "</td>";
|
||||
html += "<td>" + '<a target="_blank" href="weburi-detail.html?uri='+ encodeURI(stat.URI) + '">' + druid.common.subSqlString(stat.URI, 64) + '</a>' + "</td>";
|
||||
html += "<td>" + stat.RequestCount + "</td>";
|
||||
html += "<td>" + stat.RequestTimeMillis + "</td>";
|
||||
html += "<td>" + stat.RunningCount + "</td>";
|
||||
html += "<td>" + stat.ConcurrentMax + "</td>";
|
||||
html += "<td>" + stat.JdbcExecuteCount + "</td>";
|
||||
html += "<td>" + stat.JdbcExecuteErrorCount + "</td>";
|
||||
html += "<td>" + stat.JdbcExecuteTimeMillis + "</td>";
|
||||
html += "<td>" + stat.JdbcCommitCount + "</td>";
|
||||
html += "<td>" + stat.JdbcRollbackCount + "</td>";
|
||||
html += "<td>" + stat.JdbcFetchRowCount + "</td>";
|
||||
html += "<td>" + stat.JdbcUpdateCount + "</td>";
|
||||
html += "</tr>";
|
||||
}
|
||||
$("#dataTable tbody").html(html);
|
||||
druid.common.stripes();
|
||||
}
|
||||
}
|
||||
}();
|
||||
|
||||
$(document).ready(function() {
|
||||
druid.weburi.init();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user