mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
web stat support
This commit is contained in:
@@ -37,8 +37,8 @@ public class WebStatFilter implements Filter {
|
||||
public final static String PARAM_NAME_SESSION_STAT_ENABLE = "sessionStatEnable";
|
||||
public final static String PARAM_NAME_SESSION_STAT_MAX_COUNT = "sessionStatMaxCount";
|
||||
public static final String PARAM_NAME_EXCLUSIONS = "exclusions";
|
||||
public static final String PARAM_NAME_PRINCIPAL_SESSION_NAME = "princialSessionName";
|
||||
public static final String PARAM_NAME_PRINCIPAL_COOKIE_NAME = "princialCookieName";
|
||||
public static final String PARAM_NAME_PRINCIPAL_SESSION_NAME = "principalSessionName";
|
||||
public static final String PARAM_NAME_PRINCIPAL_COOKIE_NAME = "principalCookieName";
|
||||
|
||||
public final static int DEFAULT_MAX_STAT_SESSION_COUNT = 1000 * 100;
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ public class WebSessionStat {
|
||||
StringBuilder buf = new StringBuilder();
|
||||
for (String item : remoteAddresses) {
|
||||
if (buf.length() != 0) {
|
||||
buf.append(",");
|
||||
buf.append(";");
|
||||
}
|
||||
buf.append(item);
|
||||
}
|
||||
@@ -261,6 +261,7 @@ public class WebSessionStat {
|
||||
Map<String, Object> data = new LinkedHashMap<String, Object>();
|
||||
|
||||
data.put("SESSIONID", this.getSessionId());
|
||||
data.put("Principal", this.getPrincipal());
|
||||
data.put("RunningCount", this.getRunningCount());
|
||||
data.put("ConcurrentMax", this.getConcurrentMax());
|
||||
data.put("RequestCount", this.getRequestCount());
|
||||
|
||||
@@ -96,6 +96,7 @@ function ajaxResponseForDataSourceSqlStatInfo() {
|
||||
var newRow = sqlStatTable.insertRow(-1);
|
||||
newRow.insertCell(-1).innerHTML = i+1;
|
||||
newRow.insertCell(-1).innerHTML = sqlStat.SESSIONID;
|
||||
newRow.insertCell(-1).innerHTML = sqlStat.Principal;
|
||||
newRow.insertCell(-1).innerHTML = sqlStat.CreateTime;
|
||||
newRow.insertCell(-1).innerHTML = sqlStat.RemoteAddress;
|
||||
newRow.insertCell(-1).innerHTML = sqlStat.RequestCount;
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
<tr>
|
||||
<th class="td_lable">N--</th>
|
||||
<th class="td_lable"><a id="SESSIONID" href="javascript:void(0)" onclick="setOrderBy('SESSIONID');">SESSIONID</a></th>
|
||||
<th class="td_lable" width="50"><a id="th-Principal" href="javascript:void(0)" onclick="setOrderBy('Principal');">Principal</a></th>
|
||||
<th class="td_lable" width="50"><a id="CreateTime" href="javascript:void(0)" onclick="setOrderBy('CreateTime');">CreateTime</a></th>
|
||||
<th class="td_lable" width="50"><a id="RemoteAddress" href="javascript:void(0)" onclick="setOrderBy('RemoteAddress');">RemoteAddress</a></th>
|
||||
<th class="td_lable" width="50"><a id="RequestCount" href="javascript:void(0)" onclick="setOrderBy('RequestCount');">Request Count</a></th>
|
||||
|
||||
Reference in New Issue
Block a user