CEC-1050 New manifest format (#117)

* CEC-1050 Manifest changes

* Fix delete bug

* Add approve update button

* Code smell

* Remove update approval
This commit is contained in:
John Wu
2022-03-01 16:56:25 -08:00
committed by GitHub
parent a858b842c6
commit 3b9252097a
17 changed files with 155 additions and 346 deletions

View File

@@ -44,8 +44,17 @@ let carUpdateLog = {
created: "2021-08-23T17:06:38.030052Z",
updated: "2021-08-23T17:06:38.030052Z",
},
{
id: 88,
carupdate_id: 284,
status: "install_approval_await",
error_code: 0,
info: "TEST",
created: "2021-08-23T17:06:38.030052Z",
updated: "2021-08-23T17:06:38.030052Z",
},
],
total: 2,
total: 3,
};
export const CarUpdatesProvider = ({ children }) => {
@@ -64,4 +73,5 @@ export const useCarUpdatesContext = () => ({
getVINUpdates: jest.fn(() => carUpdates),
startMonitor: jest.fn(),
stopMonitor: jest.fn(),
approveUpdate: jest.fn(),
});

View File

@@ -7,13 +7,8 @@ let ecus = [
{
data_id: 0,
name: "AGS",
part_number: "",
version: "",
serial_number: "",
hw_version: "",
vendor: "",
configuration: "",
fingerprint: "",
manifest_id: 0,
files: [
{
@@ -21,6 +16,8 @@ let ecus = [
order: 0,
offset: "0",
checksum: "",
self_download: false,
mode: "D",
type: 1,
},
],

View File

@@ -31,28 +31,19 @@ export const useVehicleContext = () => ({
return {
data: [
{
boot_loader_version: "BLVERSION",
config: "CONFIG",
created: "2021-07-14T20:09:40.98187Z",
ecu: "ECUA",
fingerprint: "FINGERPRINT",
hw_version: "HWVERSION",
serial_number: "SERIAL",
sw_version: "SWVERSION",
updated: "2021-07-14T20:09:40.98187Z",
vendor: "VENDOR",
},
{
boot_loader_version: "BLVERSION",
config: "CONFIG",
created: "2021-07-14T20:09:40.98187Z",
ecu: "ECUB",
fingerprint: "FINGERPRINT",
hw_version: "HWVERSION",
serial_number: "SERIAL",
sw_version: "SWVERSION",
updated: "2021-07-14T20:09:40.98187Z",
vendor: "VENDOR",
},
],
total: 2,