mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Merge branch 'master' into 'master'
Sort device analytics data Closes product-iots#140 See merge request entgra/carbon-device-mgt!238
This commit is contained in:
commit
11e6e11714
@ -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