fleetmap-reports 2.0.20 → 2.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/speeding-report.js +3 -3
package/package.json
CHANGED
package/src/speeding-report.js
CHANGED
|
@@ -89,7 +89,7 @@ async function createSpeedingReportByDevice (from, to, userData, traccarInstance
|
|
|
89
89
|
let deviceCount = 0
|
|
90
90
|
for (const sliced of _sliced) {
|
|
91
91
|
await Promise.all(sliced.map(async slice => {
|
|
92
|
-
allData.devices = allData.devices.concat(await getEvents(traccarInstance, from, to, slice, userData, deviceCount, devices.length, slice.length
|
|
92
|
+
allData.devices = allData.devices.concat(await getEvents(traccarInstance, from, to, slice, userData, deviceCount, devices.length, slice.length))
|
|
93
93
|
deviceCount = deviceCount + slice.length
|
|
94
94
|
if (processServerSide()) {
|
|
95
95
|
console.log('LOADING_MESSAGE:' + slice[0].name)
|
|
@@ -121,7 +121,7 @@ async function createSpeedingReportByDriver (from, to, userData, traccarInstance
|
|
|
121
121
|
return { drivers: _drivers }
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
-
async function getEvents (traccarInstance, from, to, devices, userData, deviceCount, totalDevices, sliceSize
|
|
124
|
+
async function getEvents (traccarInstance, from, to, devices, userData, deviceCount, totalDevices, sliceSize) {
|
|
125
125
|
if (processServerSide()) {
|
|
126
126
|
const url = `https://${process.env.SERVER_HOST}/reports/speeding-report/getEvents`
|
|
127
127
|
return axios.post(url, { from, to, devices, userData, deviceCount, totalDevices, sliceSize }, { withCredentials: true }).then(d => d.data)
|
|
@@ -150,7 +150,7 @@ async function getEvents (traccarInstance, from, to, devices, userData, deviceCo
|
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
152
|
if (events.length > 0) {
|
|
153
|
-
return processDevices(from, to,
|
|
153
|
+
return processDevices(from, to, devices, events, routes, userData)
|
|
154
154
|
}
|
|
155
155
|
return []
|
|
156
156
|
}
|