mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
add WebSessionStat support
This commit is contained in:
@@ -86,6 +86,10 @@ public class JSONDruidStatService {
|
||||
if (url.startsWith("/weburi.json")) {
|
||||
return returnJSONResult(RESULT_CODE_SUCCESS, getWebURIStatDataList(parameters));
|
||||
}
|
||||
|
||||
if (url.startsWith("/websession.json")) {
|
||||
return returnJSONResult(RESULT_CODE_SUCCESS, getWebSessionStatDataList(parameters));
|
||||
}
|
||||
|
||||
return returnJSONResult(RESULT_CODE_ERROR, "Do not support this request, please contact with administrator.");
|
||||
}
|
||||
@@ -94,6 +98,11 @@ public class JSONDruidStatService {
|
||||
List<Map<String, Object>> array = WebAppStatManager.getInstance().getURIStatData();
|
||||
return array;
|
||||
}
|
||||
|
||||
private List<Map<String, Object>> getWebSessionStatDataList(Map<String, String> parameters) {
|
||||
List<Map<String, Object>> array = WebAppStatManager.getInstance().getSessionStatData();
|
||||
return array;
|
||||
}
|
||||
|
||||
private List<Map<String, Object>> getSqlStatDataList(Map<String, String> parameters) {
|
||||
List<Map<String, Object>> array = druidStatManager.getSqlStatDataList();
|
||||
|
||||
Reference in New Issue
Block a user