diff --git a/src/components/Cars/Status/__snapshots__/DigitalTwinTab.test.jsx.snap b/src/components/Cars/Status/__snapshots__/DigitalTwinTab.test.jsx.snap index 607b45f..7340395 100644 --- a/src/components/Cars/Status/__snapshots__/DigitalTwinTab.test.jsx.snap +++ b/src/components/Cars/Status/__snapshots__/DigitalTwinTab.test.jsx.snap @@ -130,6 +130,17 @@ exports[`DigitalTwinTab Render 1`] = ` 1000000

+
+

+ + Trex IP + + : + 172.20.0.17:49850 +

+
diff --git a/src/components/Contexts/__mocks__/VehicleContext.jsx b/src/components/Contexts/__mocks__/VehicleContext.jsx index cf6bfba..f31d80c 100644 --- a/src/components/Contexts/__mocks__/VehicleContext.jsx +++ b/src/components/Contexts/__mocks__/VehicleContext.jsx @@ -70,6 +70,7 @@ let vehicleState = { temperature: 26, }, trex_version: "1000000", + ip: "172.20.0.17:49850", updated: "2022-07-26T00:26:38.880381Z", }, }; @@ -146,10 +147,12 @@ export const useVehicleContext = () => ({ command, parameters, })), - getFleets: jest.fn((vin, search,_token) => {return { - data: ["fleet1", "fleet2"], - total: 2, - }}), + getFleets: jest.fn((vin, search, _token) => { + return { + data: ["fleet1", "fleet2"], + total: 2, + } + }), }); export const setBusy = (val) => { diff --git a/src/components/DigitalTwin/index.js b/src/components/DigitalTwin/index.js index 44f0090..8129ce9 100644 --- a/src/components/DigitalTwin/index.js +++ b/src/components/DigitalTwin/index.js @@ -14,7 +14,7 @@ const mapOpenCloseState = (value) => const DigitalTwin = (props) => { const classes = useStyles(); - const { battery, doors, location, trex_version, updated, windows } = props; + const { battery, doors, location, trex_version, ip, updated, windows } = props; return (
@@ -51,6 +51,11 @@ const DigitalTwin = (props) => { {keyValueTemplate("Trex Version", trex_version)}
)} + {ip && ( +
+ {keyValueTemplate("Trex IP", ip)} +
+ )} {updated != null && (
{keyValueTemplate("Updated at", LocalDateTimeString(updated))} diff --git a/src/components/VehicleMap/index.jsx b/src/components/VehicleMap/index.jsx index c685dac..ff61861 100644 --- a/src/components/VehicleMap/index.jsx +++ b/src/components/VehicleMap/index.jsx @@ -193,6 +193,7 @@ const Component = () => { location={carState.location} windows={carState.windows} trex_version={carState.trex_version} + ip={carState.ip} updated={carState.updated} className={classes.popup} onClose={handleClose}