mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Adding temporary development code bits for dashboard analytics feature
This commit is contained in:
parent
274aa0ecd3
commit
c3bc22519a
@ -42,4 +42,8 @@ public interface GadgetDataService {
|
|||||||
|
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
int getUnmonitoredDeviceCount();
|
int getUnmonitoredDeviceCount();
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
|
Map<String, Integer> getNonCompliantDeviceCountsByFeatures();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -89,7 +89,7 @@ class GadgetDataServiceDAOImpl implements GadgetDataServiceDAO {
|
|||||||
Map<String, Integer> filteredNonCompliantDeviceCountsByFeatures = new HashMap<>();
|
Map<String, Integer> filteredNonCompliantDeviceCountsByFeatures = new HashMap<>();
|
||||||
try {
|
try {
|
||||||
con = this.getConnection();
|
con = this.getConnection();
|
||||||
String sql = "SELECT FEATURE_CODE, COUNT(DEVICE_ID) AS DEVICE_COUNT FROM DEVICES_VIEW_1 " +
|
String sql = "SELECT FEATURE_CODE, COUNT(DEVICE_ID) AS DEVICE_COUNT FROM DEVICES_VIEW_2 " +
|
||||||
"WHERE TENANT_ID = ? GROUP BY FEATURE_CODE";
|
"WHERE TENANT_ID = ? GROUP BY FEATURE_CODE";
|
||||||
stmt = con.prepareStatement(sql);
|
stmt = con.prepareStatement(sql);
|
||||||
stmt.setInt(1, tenantId);
|
stmt.setInt(1, tenantId);
|
||||||
|
|||||||
@ -131,4 +131,19 @@ class GadgetDataServiceImpl implements GadgetDataService {
|
|||||||
return unmonitoredDeviceCount;
|
return unmonitoredDeviceCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Integer> getNonCompliantDeviceCountsByFeatures() {
|
||||||
|
Map<String, Integer> nonCompliantDeviceCountsByFeatures = null;
|
||||||
|
try {
|
||||||
|
GadgetDataServiceDAOFactory.openConnection();
|
||||||
|
nonCompliantDeviceCountsByFeatures =
|
||||||
|
GadgetDataServiceDAOFactory.getGadgetDataServiceDAO().getNonCompliantDeviceCountsByFeatures();
|
||||||
|
} catch (GadgetDataServiceDAOException | SQLException e) {
|
||||||
|
return null;
|
||||||
|
} finally {
|
||||||
|
GadgetDataServiceDAOFactory.closeConnection();
|
||||||
|
}
|
||||||
|
return nonCompliantDeviceCountsByFeatures;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user