CEC-2628 - Display IP in digital twin in portal (#251)
This commit is contained in:
@@ -130,6 +130,17 @@ exports[`DigitalTwinTab Render 1`] = `
|
||||
1000000
|
||||
</p>
|
||||
</div>
|
||||
<div
|
||||
class="makeStyles-popupSection-0"
|
||||
>
|
||||
<p>
|
||||
<b>
|
||||
Trex IP
|
||||
</b>
|
||||
:
|
||||
172.20.0.17:49850
|
||||
</p>
|
||||
</div>
|
||||
<div
|
||||
class="makeStyles-popupSection-0"
|
||||
>
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
@@ -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 (
|
||||
<div>
|
||||
@@ -51,6 +51,11 @@ const DigitalTwin = (props) => {
|
||||
{keyValueTemplate("Trex Version", trex_version)}
|
||||
</div>
|
||||
)}
|
||||
{ip && (
|
||||
<div className={classes.popupSection}>
|
||||
{keyValueTemplate("Trex IP", ip)}
|
||||
</div>
|
||||
)}
|
||||
{updated != null && (
|
||||
<div className={classes.popupSection}>
|
||||
{keyValueTemplate("Updated at", LocalDateTimeString(updated))}
|
||||
|
||||
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user