CEC-3933 - use VehiclePaths for location drawing (#306)
* CEC-3933 - Parse VehiclePaths location data * changes * fixes * stuff * sort of works * fix * progress * refactor * fix vehicle paths query * digital twin shows map * new dashboard * wider digital twin map * snapshot * latest; using polylines * lag lng changes * stuff * path showing up * stuff * things * revert home page * whitespace * validation * more stuff * fix button issue * tests pass without mocking data * fix code smells * remove map from digital twin, add to tab * fix bug * marker click event working * individual colors * possible fix * fix warning * merge and remove unused code * small fixes * re add dashboard * snaps
This commit is contained in:
@@ -55,13 +55,15 @@ const ecusData = [
|
||||
},
|
||||
];
|
||||
|
||||
const signals = {data:[
|
||||
{
|
||||
timestamp: "2021-07-14T20:09:40.98187Z",
|
||||
name: "signal",
|
||||
value: 123
|
||||
},
|
||||
]};
|
||||
const signals = {
|
||||
data: [
|
||||
{
|
||||
timestamp: "2021-07-14T20:09:40.98187Z",
|
||||
name: "signal",
|
||||
value: 123
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
const trexLogs = {
|
||||
RealOffset: 0,
|
||||
@@ -127,6 +129,12 @@ const vehiclesAPI = {
|
||||
.mockResolvedValue([
|
||||
{ altitude: 5, longitude: 10, latitude: 15, vin: "TESTVIN123" },
|
||||
]),
|
||||
getLocationsVehiclePaths: async () => {
|
||||
return {
|
||||
'3FAFP13P31R199430': [[16.891136999999986, 26.832352999999955], [56.891136999999986, 66.832352999999955], [26.891136999999986, 36.832352999999955]],
|
||||
'3FAFP13P71R199060': [[36.891136999999986, 46.832352999999955], [76.891136999999986, 16.832352999999955]],
|
||||
};
|
||||
},
|
||||
getVehicle: async (vin) => {
|
||||
const index = data.findIndex(element => element.vin === vin);
|
||||
return data[index];
|
||||
@@ -134,7 +142,7 @@ const vehiclesAPI = {
|
||||
getVehicles: async () => {
|
||||
return { data };
|
||||
},
|
||||
getFleets: async (vin) => {return { data: ["fleet1", "fleet2"]}},
|
||||
getFleets: async (vin) => { return { data: ["fleet1", "fleet2"] } },
|
||||
getYears: async () => {
|
||||
return {
|
||||
data: [2021, 2022],
|
||||
@@ -152,29 +160,29 @@ const vehiclesAPI = {
|
||||
return vehicle;
|
||||
},
|
||||
getCANSignals: async (vin, vehicle) => {
|
||||
return signals;
|
||||
return signals;
|
||||
},
|
||||
getTRexLogs: async (vin, date, offset, count, direction, token) => {
|
||||
return trexLogs;
|
||||
},
|
||||
getVersionLog: async (vin) => ({
|
||||
"data": [
|
||||
{
|
||||
"id": 1,
|
||||
"vin": "${vin}",
|
||||
"version_source": "TREX",
|
||||
"version": "0.9.56",
|
||||
"created_at": "2023-01-13T02:11:33.327214Z"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"vin": "${vin}",
|
||||
"version_source": "DBC",
|
||||
"version": "386c18977a1be3cda60c953e5902c680dbe82b89523f2527e80cd9db863db991",
|
||||
"created_at": "2023-01-13T02:11:33.330932Z"
|
||||
}
|
||||
],
|
||||
"total": 2
|
||||
"data": [
|
||||
{
|
||||
"id": 1,
|
||||
"vin": "${vin}",
|
||||
"version_source": "TREX",
|
||||
"version": "0.9.56",
|
||||
"created_at": "2023-01-13T02:11:33.327214Z"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"vin": "${vin}",
|
||||
"version_source": "DBC",
|
||||
"version": "386c18977a1be3cda60c953e5902c680dbe82b89523f2527e80cd9db863db991",
|
||||
"created_at": "2023-01-13T02:11:33.330932Z"
|
||||
}
|
||||
],
|
||||
"total": 2
|
||||
})
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user