mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
add webapp.html
This commit is contained in:
@@ -135,6 +135,10 @@ public class DruidStatService implements DruidStatServiceMBean {
|
||||
return returnJSONResult(RESULT_CODE_SUCCESS, getWebURIStatData(uri));
|
||||
}
|
||||
|
||||
if (url.startsWith("/webapp.json")) {
|
||||
return returnJSONResult(RESULT_CODE_SUCCESS, getWebAppStatDataList(parameters));
|
||||
}
|
||||
|
||||
if (url.startsWith("/websession.json")) {
|
||||
return returnJSONResult(RESULT_CODE_SUCCESS, getWebSessionStatDataList(parameters));
|
||||
}
|
||||
@@ -183,6 +187,11 @@ public class DruidStatService implements DruidStatServiceMBean {
|
||||
List<Map<String, Object>> array = WebAppStatManager.getInstance().getSessionStatData();
|
||||
return comparatorOrderBy(array, parameters);
|
||||
}
|
||||
|
||||
private List<Map<String, Object>> getWebAppStatDataList(Map<String, String> parameters) {
|
||||
List<Map<String, Object>> array = WebAppStatManager.getInstance().getWebAppStatData();
|
||||
return comparatorOrderBy(array, parameters);
|
||||
}
|
||||
|
||||
private List<Map<String, Object>> comparatorOrderBy(List<Map<String, Object>> array, Map<String, String> parameters) {
|
||||
// when open the stat page before executing some sql
|
||||
|
||||
Reference in New Issue
Block a user