mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
Merge branch 'master' of https://github.com/wenshao/druid
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>druid</artifactId>
|
||||
<version>0.2.23-SNAPSHOT</version>
|
||||
<version>0.2.24-SNAPSHOT</version>
|
||||
|
||||
<packaging>jar</packaging>
|
||||
<name>druid</name>
|
||||
@@ -527,5 +527,12 @@
|
||||
<version>2.0.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>1.1.33</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
||||
@@ -19,7 +19,7 @@ public final class VERSION {
|
||||
|
||||
public final static int MajorVersion = 0;
|
||||
public final static int MinorVersion = 2;
|
||||
public final static int RevisionVersion = 23;
|
||||
public final static int RevisionVersion = 24;
|
||||
|
||||
public static String getVersionNumber() {
|
||||
return VERSION.MajorVersion + "." + VERSION.MinorVersion + "." + VERSION.RevisionVersion;
|
||||
|
||||
@@ -268,6 +268,36 @@
|
||||
<td>{{=datasourceNow.BlobOpenCount}}</td>
|
||||
<td class="lang" langKey="BlobOpenCountDesc"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" class="td_lable"><span class="lang" langKey="ActiveConnectionStackTrace">ActiveConnection StackTrace</span></td>
|
||||
<td>
|
||||
<a href="activeConnectionStackTrace.html?datasourceId=25211438">View</a>
|
||||
</td>
|
||||
<td>
|
||||
StackTrace for active Connection.
|
||||
<a href="activeConnectionStackTrace-{{=datasourceNow.Identity}}.json" target="_blank">[View JSON API]</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" class="td_lable"><span class="lang" langKey="PollingConnectionInfo">PollingConnection Info</span></td>
|
||||
<td>
|
||||
<a href="connectionInfo.html?datasourceId={{=datasourceNow.Identity}}">View</a>
|
||||
</td>
|
||||
<td>
|
||||
Info for polling connection.
|
||||
<a href="connectionInfo-{{=datasourceNow.Identity}}.json" target="_blank">[View JSON API]</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" class="td_lable"><span class="lang" langKey="SQLList">SQL List</span></td>
|
||||
<td>
|
||||
<a href="sql.html?dataSourceId={{=datasourceNow.Identity}}">View</a>
|
||||
</td>
|
||||
<td>
|
||||
Info for SQL.
|
||||
<a href="sql.json?dataSourceId={{=datasourceNow.Identity}}" target="_blank">[View JSON API]</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@@ -277,29 +307,7 @@
|
||||
<script type="text/javascript">
|
||||
$.namespace("druid.datasource");
|
||||
druid.datasource = function () {
|
||||
var keys = ["UserName", "URL", "DbType", "DriverClassName", "FilterClassNames", "TestOnBorrow", "TestWhileIdle", "TestOnReturn",
|
||||
"InitialSize", "MinIdle", "MaxActive", "QueryTimeout", "TransactionQueryTimeout", "LoginTimeout", "ValidConnectionCheckerClassName",
|
||||
"ExceptionSorterClassName", "DefaultAutoCommit", "DefaultReadOnly", "DefaultTransactionIsolation", "NotEmptyWaitCount",
|
||||
"NotEmptyWaitMillis", "WaitThreadCount", "StartTransactionCount", "TransactionHistogram", "PoolingCount", "PoolingPeak",
|
||||
"PoolingPeakTime", "ActiveCount", "ActivePeak", "ActivePeakTime", "LogicConnectCount", "LogicCloseCount", "LogicConnectErrorCount",
|
||||
"PhysicalConnectCount", "PhysicalCloseCount", "PhysicalConnectErrorCount", "ExecuteCount", "ErrorCount", "CommitCount",
|
||||
"RollbackCount", "PSCacheAccessCount", "PSCacheHitCount", "PSCacheMissCount", "ConnectionHoldTimeHistogram",
|
||||
"ClobOpenCount", "BlobOpenCount"
|
||||
]
|
||||
var descs = ["Specify the username used when creating a new connection.",
|
||||
"The JDBC driver connection URL", "database type", "The fully qualifed name of the JDBC driver class",
|
||||
"All the fully qualifed name of the filter classes", " Test or not when borrow a connection", "Test or not when a connection is idle for a while",
|
||||
"Test or not when return a connection","The size of datasource connections to create when initial a datasource",
|
||||
"The minimum number of connections a pool should hold. ", "The maximum number of connections for a pool", "", "", "", "",
|
||||
"", "", "", "", "Total times for wait to get a connection","Total millins for wait to get a connection", "The current waiting thread count",
|
||||
"The count of start transaction", "The histogram values of transaction time, [0-10 ms, 10-100 ms, 100-1 s, 1-10 s, 10-100 s, >100 s]",
|
||||
"The current usefull connection count", "The usefull connection peak count",
|
||||
"The usefull connection peak time", "The current active connection count", "The current active connection peak count", "The active connection peak time",
|
||||
"Total connect times from datasource", "Total close connect times from datasource", "Total connect error times",
|
||||
"Create physical connnection count", "Close physical connnection count", "Total physical connect error times", "", "", "",
|
||||
"", "PerpareStatement access count", "PerpareStatement hit count", "PerpareStatement miss count", "The histogram values of connection hold time, [0-1 ms, 1-10 ms, 10-100 ms, 100ms-1s, 1-10 s, 10-100 s, 100-1000 s, >1000 s]",
|
||||
"", ""
|
||||
]
|
||||
|
||||
return {
|
||||
init : function() {
|
||||
druid.common.buildHead(1);
|
||||
@@ -311,17 +319,7 @@
|
||||
type: 'POST',
|
||||
url: "datasource.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.Identity, i);
|
||||
// }
|
||||
// tab += '</ul>';
|
||||
// content += '</div>';
|
||||
|
||||
var tmpl = $('#datasource-tmpl').html();
|
||||
var doTtmpl = doT.template(tmpl);
|
||||
var contentHtml = doTtmpl(data);
|
||||
@@ -336,60 +334,8 @@
|
||||
},
|
||||
dataType: "json"
|
||||
});
|
||||
},
|
||||
|
||||
generateDataSourceTab : function(datasourceId, index) {
|
||||
if(index == 0)
|
||||
return '<li class="active"><a href="#dstab' + datasourceId + '">DataSource-'+datasourceId+'</a></li>';
|
||||
else
|
||||
return '<li><a href="#dstab' + datasourceId + '">DataSource-'+datasourceId+'</a></li>';
|
||||
},
|
||||
|
||||
generateDataSourceTable : function(datasource, index) {
|
||||
var datasourceId = datasource.Identity;
|
||||
|
||||
if(index == 0)
|
||||
var html = '<div class="tab-pane active" id="dstab' + datasourceId + '">';
|
||||
else
|
||||
var html = '<div class="tab-pane" id="dstab' + datasourceId + '">';
|
||||
|
||||
html += '<h4>Basic Info For DataSource-' + datasourceId + '<a href="datasource-' + datasourceId + '.json" target="_blank">View JSON API</a></h4>';
|
||||
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 = "";
|
||||
|
||||
if(i<19)
|
||||
html += '<tr><td valign="top" class="td_lable">* ' + keys[i] + '</td><td>' + value + '</td><td>' + descs[i] + '</td></tr>'
|
||||
else
|
||||
html += '<tr><td valign="top" class="td_lable">' + keys[i] + '</td><td>' + value + '</td><td>' + descs[i] + '</td></tr>'
|
||||
}
|
||||
|
||||
if (datasource.RemoveAbandoned == true)
|
||||
html += '<tr>'
|
||||
+'<td valign="top" class="td_lable">ActiveConnection StackTrace</td>'
|
||||
+'<td><a href="activeConnectionStackTrace.html?datasourceId=' + datasource.Identity + '">View</a></td>'
|
||||
+'<td>StackTrace for active Connection. <a href="activeConnectionStackTrace-'
|
||||
+ datasourceId + '.json" target="_blank">[View JSON API]</a></td>'
|
||||
+'</tr>';
|
||||
else
|
||||
html += '<tr>'
|
||||
+'<td valign="top" class="td_lable">ActiveConnection StackTrace</td>'
|
||||
+'<td>require set removeAbandoned=true</td>'
|
||||
+'<td>StackTrace for active Connection. <a href="activeConnectionStackTrace-'
|
||||
+ datasourceId + '.json" target="_blank">[View JSON API]</a></td>'
|
||||
+'</tr>';
|
||||
|
||||
html += '<tr><td valign="top" class="td_lable">PollingConnection Info</td><td><a href="connectionInfo.html?datasourceId=' + datasourceId+
|
||||
'">View</a></td><td>Info for polling connection. <a href="connectionInfo-' + datasourceId + '.json" target="_blank">[View JSON API]</a></td></tr>'
|
||||
html += '<tr><td valign="top" class="td_lable">SQL List</td><td><a href="sql.html?dataSourceId=' + datasourceId+
|
||||
'">View</a></td><td>Info for SQL. <a href="sql.json?dataSourceId=' + datasourceId + '" target="_blank">[View JSON API]</a></td></tr>'
|
||||
|
||||
html += '</table></div>';
|
||||
return html;
|
||||
}
|
||||
|
||||
}
|
||||
}();
|
||||
|
||||
|
||||
@@ -72,7 +72,10 @@ druid.lang = function() {
|
||||
'ConnectionHoldTimeHistogram' : ['ConnectionHoldTimeHistogram', '连接持有时间分布'],
|
||||
'ClobOpenCount' : ['ClobOpenCount', 'Clob打开次数'],
|
||||
'BlobOpenCount' : ['BlobOpenCount', 'Blob打开次数'],
|
||||
|
||||
'ActiveConnectionStackTrace' : ['ActiveConnection StackTrace', '活跃连接堆栈查看'],
|
||||
'PollingConnectionInfo' : ['PollingConnection Info', '连接池中连接信息'],
|
||||
'SQLList' : ['SQL List', 'sql列表'],
|
||||
|
||||
'UserNameDesc' : ['Specify the username used when creating a new connection.', '指定建立连接是使用的用户名'],
|
||||
'URLDesc' : ['The JDBC driver connection URL', 'jdbc连接字符串'],
|
||||
'DbTypeDesc' : ['database type', '数据库类型'],
|
||||
|
||||
Reference in New Issue
Block a user