mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
sql.html & sql.json support parameter : dataSourceId
This commit is contained in:
@@ -133,9 +133,13 @@ public class DruidStatManagerFacade {
|
||||
return null;
|
||||
}
|
||||
|
||||
public List<Map<String, Object>> getSqlStatDataList() {
|
||||
public List<Map<String, Object>> getSqlStatDataList(Integer dataSourceId) {
|
||||
List<Map<String, Object>> result = new ArrayList<Map<String, Object>>();
|
||||
for (Object datasource : getDruidDataSourceInstances()) {
|
||||
if (dataSourceId != null && dataSourceId.intValue() != System.identityHashCode(datasource)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
for (Object sqlStat : DruidDataSourceUtils.getSqlStatMap(datasource).values()) {
|
||||
|
||||
Map<String, Object> data = JdbcSqlStatUtils.getData(sqlStat);
|
||||
|
||||
Reference in New Issue
Block a user