diff --git a/src/components/App/__snapshots__/App.test.js.snap b/src/components/App/__snapshots__/App.test.js.snap
index c6da07d..527320d 100644
--- a/src/components/App/__snapshots__/App.test.js.snap
+++ b/src/components/App/__snapshots__/App.test.js.snap
@@ -2484,30 +2484,12 @@ exports[`App Route /package-create authenticated 1`] = `
>
Version
-
- Part Number
- |
-
- Serial
- |
Hardware
|
-
- Vendor
- |
- |
-
- |
-
-
- |
@@ -3110,28 +3048,6 @@ exports[`App Route /package-create authenticated 1`] = `
|
-
-
- |
|
- |
- BLVERSION
- |
HWVERSION
|
-
- VENDOR
- |
CONFIG
|
-
- FINGERPRINT
- |
-
- SERIAL
- |
@@ -7547,44 +7352,22 @@ exports[`App Route /vehicle-status authenticated 1`] = `
>
|
- ECUB
- |
+ />
SWVERSION
|
-
- BLVERSION
- |
HWVERSION
|
-
- VENDOR
- |
CONFIG
|
-
- FINGERPRINT
- |
-
- SERIAL
- |
diff --git a/src/components/Cars/CarECUs/index.jsx b/src/components/Cars/CarECUs/index.jsx
index 3259490..0b6d3b6 100644
--- a/src/components/Cars/CarECUs/index.jsx
+++ b/src/components/Cars/CarECUs/index.jsx
@@ -22,32 +22,20 @@ const tableColumns = [
label: "ECU",
},
{
- id: "sw_version",
+ id: "version",
label: "SW Version",
},
- {
- id: "boot_loader_version",
- label: "BL Version",
- },
{
id: "hw_version",
label: "HW Version",
},
{
- id: "vendor",
- label: "Vendor",
+ id: "mode",
+ label: "Flash Mode",
},
{
- id: "config",
- label: "Config",
- },
- {
- id: "fingerprint",
- label: "Fingerprint",
- },
- {
- id: "serial_number",
- label: "Serial",
+ id: "self_download",
+ label: "Flash Mode",
},
{
id: "created_at",
@@ -133,13 +121,10 @@ const CarECUs = ({ vin, token }) => {
{ecus.map((row) => (
{row.ecu}
- {row.sw_version}
- {row.boot_loader_version}
+ {row.version}
{row.hw_version}
- {row.vendor}
- {row.config}
- {row.fingerprint}
- {row.serial_number}
+ {row.mode}
+ {row.self_download}
{LocalDateTimeString(row.created)}
diff --git a/src/components/Contexts/ManifestCreateContext.jsx b/src/components/Contexts/ManifestCreateContext.jsx
index f6ee12a..6243787 100644
--- a/src/components/Contexts/ManifestCreateContext.jsx
+++ b/src/components/Contexts/ManifestCreateContext.jsx
@@ -22,13 +22,10 @@ const checkExistingManifest = async (data, token) => {
const ECUTemplate = {
name: "AGS",
- part_number: "",
version: "",
- serial_number: "",
hw_version: "",
- vendor: "",
+ configuration_mask: "",
configuration: "",
- fingerprint: "",
files: [],
manifest_id: 0,
};
diff --git a/src/components/Contexts/ManifestsContext.jsx b/src/components/Contexts/ManifestsContext.jsx
index c1dbde0..e996456 100644
--- a/src/components/Contexts/ManifestsContext.jsx
+++ b/src/components/Contexts/ManifestsContext.jsx
@@ -46,16 +46,16 @@ export const ManifestsProvider = ({ children }) => {
const deleteManifest = async (package_id, token) => {
let result;
- const index = manifests.findIndex((element) => {
- return element.id === package_id;
- });
- manifests.splice(index, 1);
-
try {
setBusy(true);
result = await api.deleteManifest(package_id, token);
if (result.error)
throw new Error(`Delete manifest error. ${result.message}`);
+
+ const index = manifests.findIndex((element) => {
+ return element.id === package_id;
+ });
+ manifests.splice(index, 1);
} finally {
setBusy(false);
}
diff --git a/src/components/Contexts/__mocks__/CarUpdatesContext.jsx b/src/components/Contexts/__mocks__/CarUpdatesContext.jsx
index befabba..009a01f 100644
--- a/src/components/Contexts/__mocks__/CarUpdatesContext.jsx
+++ b/src/components/Contexts/__mocks__/CarUpdatesContext.jsx
@@ -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(),
});
diff --git a/src/components/Contexts/__mocks__/ManifestCreateContext.jsx b/src/components/Contexts/__mocks__/ManifestCreateContext.jsx
index 54f872c..87a5f78 100644
--- a/src/components/Contexts/__mocks__/ManifestCreateContext.jsx
+++ b/src/components/Contexts/__mocks__/ManifestCreateContext.jsx
@@ -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,
},
],
diff --git a/src/components/Contexts/__mocks__/VehicleContext.jsx b/src/components/Contexts/__mocks__/VehicleContext.jsx
index 1f385d5..526d4f7 100644
--- a/src/components/Contexts/__mocks__/VehicleContext.jsx
+++ b/src/components/Contexts/__mocks__/VehicleContext.jsx
@@ -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,
diff --git a/src/components/Controls/CarECUsTable/index.jsx b/src/components/Controls/CarECUsTable/index.jsx
index a022a83..9ea5ac9 100644
--- a/src/components/Controls/CarECUsTable/index.jsx
+++ b/src/components/Controls/CarECUsTable/index.jsx
@@ -24,30 +24,14 @@ const tableColumns = [
id: "sw_version",
label: "SW Version",
},
- {
- id: "boot_loader_version",
- label: "BL Version",
- },
{
id: "hw_version",
label: "HW Version",
},
- {
- id: "vendor",
- label: "Vendor",
- },
{
id: "config",
label: "Config",
},
- {
- id: "fingerprint",
- label: "Fingerprint",
- },
- {
- id: "serial_number",
- label: "Serial",
- },
{
id: "created_at",
label: "Created",
@@ -128,16 +112,12 @@ const CarECUsTable = ({ vin, token, classes }) => {
onSortRequest={handleSort}
/>
- {ecus.map((row) => (
-
+ {ecus.map((row, i) => (
+
{row.ecu}
{row.sw_version}
- {row.boot_loader_version}
{row.hw_version}
- {row.vendor}
{row.config}
- {row.fingerprint}
- {row.serial_number}
{LocalDateTimeString(row.created)}
diff --git a/src/components/Controls/CarUpdateStatusTable/__snapshots__/CarUpdateStatusTable.test.jsx.snap b/src/components/Controls/CarUpdateStatusTable/__snapshots__/CarUpdateStatusTable.test.jsx.snap
index cec400e..f3b8196 100644
--- a/src/components/Controls/CarUpdateStatusTable/__snapshots__/CarUpdateStatusTable.test.jsx.snap
+++ b/src/components/Controls/CarUpdateStatusTable/__snapshots__/CarUpdateStatusTable.test.jsx.snap
@@ -153,6 +153,28 @@ exports[`CarUpdateStatusTable Render 1`] = `
class="MuiTableCell-root MuiTableCell-body MuiTableCell-alignCenter"
/>
+
+ |
+ 8/23/2021 5:06:38 PM
+ |
+
+ install_approval_await
+ |
+
+ TEST
+ |
+ |
+
| |