fleetmap-reports 1.0.359 → 1.0.360
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/trip-report.js +0 -1
- package/src/util/traccar.js +2 -0
package/package.json
CHANGED
package/src/trip-report.js
CHANGED
|
@@ -124,7 +124,6 @@ function processDevices(from, to, devices, data, userData) {
|
|
|
124
124
|
const stops = data.stops.filter(s => s.deviceId === d.id)
|
|
125
125
|
|
|
126
126
|
console.log('LOADING_MESSAGE:' + d.name)
|
|
127
|
-
console.log(`PROGRESS_PERC:${index/devices.length*100}`)
|
|
128
127
|
|
|
129
128
|
addNearestPOIs(trips, userData)
|
|
130
129
|
|
package/src/util/traccar.js
CHANGED
|
@@ -75,9 +75,11 @@ async function getAllInOne(traccar, from, to, devices, getRoutes, getTrips, getS
|
|
|
75
75
|
console.log('LOADING_MESSAGE:' + devices.map(d => d.name).join(', '))
|
|
76
76
|
|
|
77
77
|
const sliced = automaticReports.sliceArray(devices)
|
|
78
|
+
let deviceCount = 0
|
|
78
79
|
const requests = sliced.map(a =>
|
|
79
80
|
traccar.axios.get(url + '&' + a.map(d => `deviceId=${d.id}`).join('&')).then(r => r.data).then(x => {
|
|
80
81
|
console.log('LOADING_MESSAGE:' + a.map(d => d.name).join(', '))
|
|
82
|
+
console.log(`PROGRESS_PERC:${++deviceCount/sliced.length*100}`)
|
|
81
83
|
return x
|
|
82
84
|
}))
|
|
83
85
|
const result = await Promise.all(requests)
|