Fleet & trackingVehicles
Vehicle history
Historical route, fuel, camera captures, and stops for a vehicle.
Path: /dashboard/fleet-management/vehicles/:vehicleId/history
Purpose
Review time-range–based history: animated route positions, optional fuel events, camera captures, and stops, with a synchronized map.
Prerequisites
view_vehicle(same as vehicle detail).- APIs:
Vehicles.history,Vehicles.stops(when Stops view active),Vehicles.fuelHistory(when Fuel view active),Vehicles.cameraCaptures(when Camera view active).
Date and time range
- Open the Vehicle history tab.
- If
startDate/endDateare not in the URL, the app fills defaults (last 12 hours) and writes them to the search string. - Use the history date filter in the tab bar (calendar control):
- Adjust start and end datetime.
- Quick presets include Today, Yesterday, Last 7 days, Last 12 hours (exact labels match the UI).
- Apply navigates on the same route with ISO timestamps in
startDateandendDate.
Default (route) view
- Loads history frames for the range.
- Shows vehicle snapshot card (including chassis, odometer, ignition, speed, movement, timestamp when available in the current frame).
- Timeline: step through history frames (controls in the UI) to move the vehicle along the route on the map.
- Quick links switch to specialized views (below).
Fuel history
- From the default view, choose Fuel history.
- Data loads via
fuelHistorywith query paramsstartDate,endDate, andmode:- Smoothed (default) vs raw is controlled by a toggle in the UI (
smoothed/rawAPI mode).
- Smoothed (default) vs raw is controlled by a toggle in the UI (
- Selecting a fuel event can fly the map to the event coordinates when latitude/longitude exist.
Camera history
- Choose Camera history.
- Data loads via
cameraCapturesfor the range. - Selecting footage can center the map on the capture location when coordinates exist.
Stops
- Choose Stops.
stopsquery runs for the range.- Selecting a stop can center the map on that stop.
Map behavior
- The map shows route/history path, and optional overlays for fuel, stops, or camera depending on the active view.
- Fly-to targets reset when you pick different items.
Troubleshooting
- Loading spinner stuck: History request slow or failing; check network and retry.
- Empty fuel or camera: No data in range, device without camera, or backend returned an empty list—try widening the date range.
- Timeline does not move: No history frames; verify telematics ingestion for the period.