CEC-2628 - Display IP in digital twin in portal (#251)
This commit is contained in:
@@ -130,6 +130,17 @@ exports[`DigitalTwinTab Render 1`] = `
|
|||||||
1000000
|
1000000
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
<div
|
||||||
|
class="makeStyles-popupSection-0"
|
||||||
|
>
|
||||||
|
<p>
|
||||||
|
<b>
|
||||||
|
Trex IP
|
||||||
|
</b>
|
||||||
|
:
|
||||||
|
172.20.0.17:49850
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
<div
|
<div
|
||||||
class="makeStyles-popupSection-0"
|
class="makeStyles-popupSection-0"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ let vehicleState = {
|
|||||||
temperature: 26,
|
temperature: 26,
|
||||||
},
|
},
|
||||||
trex_version: "1000000",
|
trex_version: "1000000",
|
||||||
|
ip: "172.20.0.17:49850",
|
||||||
updated: "2022-07-26T00:26:38.880381Z",
|
updated: "2022-07-26T00:26:38.880381Z",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -146,10 +147,12 @@ export const useVehicleContext = () => ({
|
|||||||
command,
|
command,
|
||||||
parameters,
|
parameters,
|
||||||
})),
|
})),
|
||||||
getFleets: jest.fn((vin, search,_token) => {return {
|
getFleets: jest.fn((vin, search, _token) => {
|
||||||
data: ["fleet1", "fleet2"],
|
return {
|
||||||
total: 2,
|
data: ["fleet1", "fleet2"],
|
||||||
}}),
|
total: 2,
|
||||||
|
}
|
||||||
|
}),
|
||||||
});
|
});
|
||||||
|
|
||||||
export const setBusy = (val) => {
|
export const setBusy = (val) => {
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ const mapOpenCloseState = (value) =>
|
|||||||
|
|
||||||
const DigitalTwin = (props) => {
|
const DigitalTwin = (props) => {
|
||||||
const classes = useStyles();
|
const classes = useStyles();
|
||||||
const { battery, doors, location, trex_version, updated, windows } = props;
|
const { battery, doors, location, trex_version, ip, updated, windows } = props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
@@ -51,6 +51,11 @@ const DigitalTwin = (props) => {
|
|||||||
{keyValueTemplate("Trex Version", trex_version)}
|
{keyValueTemplate("Trex Version", trex_version)}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
{ip && (
|
||||||
|
<div className={classes.popupSection}>
|
||||||
|
{keyValueTemplate("Trex IP", ip)}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
{updated != null && (
|
{updated != null && (
|
||||||
<div className={classes.popupSection}>
|
<div className={classes.popupSection}>
|
||||||
{keyValueTemplate("Updated at", LocalDateTimeString(updated))}
|
{keyValueTemplate("Updated at", LocalDateTimeString(updated))}
|
||||||
|
|||||||
@@ -193,6 +193,7 @@ const Component = () => {
|
|||||||
location={carState.location}
|
location={carState.location}
|
||||||
windows={carState.windows}
|
windows={carState.windows}
|
||||||
trex_version={carState.trex_version}
|
trex_version={carState.trex_version}
|
||||||
|
ip={carState.ip}
|
||||||
updated={carState.updated}
|
updated={carState.updated}
|
||||||
className={classes.popup}
|
className={classes.popup}
|
||||||
onClose={handleClose}
|
onClose={handleClose}
|
||||||
|
|||||||
Reference in New Issue
Block a user