CEC-5205 display DTC snapshots. (#463)
* CEC-5205 display DTC snapshots. * Apply suggestions from code review * Update src/components/DTCTimeline/DTCTimeline/index.jsx
This commit is contained in:
@@ -607,6 +607,12 @@ exports[`Render Render 1`] = `
|
|||||||
</svg>
|
</svg>
|
||||||
</span>
|
</span>
|
||||||
</th>
|
</th>
|
||||||
|
<th
|
||||||
|
class="MuiTableCell-root MuiTableCell-head MuiTableCell-alignCenter"
|
||||||
|
scope="col"
|
||||||
|
>
|
||||||
|
DTC Snapshot
|
||||||
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody
|
<tbody
|
||||||
|
|||||||
@@ -69,6 +69,11 @@ const MainForm = ({ vin }) => {
|
|||||||
id: "created_at",
|
id: "created_at",
|
||||||
label: "Cloud Time",
|
label: "Cloud Time",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: "snapshot",
|
||||||
|
label: "DTC Snapshot",
|
||||||
|
no_sort: true,
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const handleSort = (_event, property) => {
|
const handleSort = (_event, property) => {
|
||||||
@@ -304,6 +309,7 @@ const MainForm = ({ vin }) => {
|
|||||||
{(dtc.voltage || dtc.voltage === 0) && <TableCell>{dtc.voltage + " V"}</TableCell>}
|
{(dtc.voltage || dtc.voltage === 0) && <TableCell>{dtc.voltage + " V"}</TableCell>}
|
||||||
<TableCell>{formatDate(dtc.epoch_usec)}</TableCell>
|
<TableCell>{formatDate(dtc.epoch_usec)}</TableCell>
|
||||||
<TableCell>{formatDate(dtc.created_at)}</TableCell>
|
<TableCell>{formatDate(dtc.created_at)}</TableCell>
|
||||||
|
{dtc.snapshot && <TableCell style={{ wordBreak: "break-all" }}>{dtc.snapshot}</TableCell>}
|
||||||
</TableRow>
|
</TableRow>
|
||||||
))}
|
))}
|
||||||
</TableBody>
|
</TableBody>
|
||||||
|
|||||||
Reference in New Issue
Block a user