mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Sort device analytics data
This commit is contained in:
parent
0af18b0255
commit
e33f28bf8a
@ -106,7 +106,9 @@ public class DeviceEventManagementServiceImpl implements DeviceEventManagementSe
|
||||
List<String> recordIds = getRecordIds(resultEntries);
|
||||
AnalyticsDataResponse response = analyticsDataAPI.get(tenantId, tableName, 1, null, recordIds);
|
||||
eventRecords.setCount(eventCount);
|
||||
eventRecords.setList(AnalyticsDataAPIUtil.listRecords(analyticsDataAPI, response));
|
||||
List<Record> records = AnalyticsDataAPIUtil.listRecords(analyticsDataAPI, response);
|
||||
records.sort((Record r1, Record r2) -> Long.compare(r2.getTimestamp(), r1.getTimestamp()));
|
||||
eventRecords.setList(records);
|
||||
return eventRecords;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user