Sensor # to #

This commit is contained in:
proddy
2020-10-25 18:29:33 +01:00
parent e5d16cd69a
commit a97b7351ec

View File

@@ -80,7 +80,7 @@ function formatTemp(t: string) {
class EMSESPDevicesForm extends Component< class EMSESPDevicesForm extends Component<
EMSESPDevicesFormProps, EMSESPDevicesFormProps,
EMSESPDevicesFormState EMSESPDevicesFormState
> { > {
state: EMSESPDevicesFormState = { state: EMSESPDevicesFormState = {
confirmScanDevices: false, confirmScanDevices: false,
processing: false, processing: false,
@@ -130,7 +130,11 @@ class EMSESPDevicesForm extends Component<
onClick={() => this.handleRowClick(device.id)} onClick={() => this.handleRowClick(device.id)}
> >
<TableCell component="th" scope="row"> <TableCell component="th" scope="row">
<Tooltip title="click for details..." arrow placement="right-end"> <Tooltip
title="click for details..."
arrow
placement="right-end"
>
<Button <Button
startIcon={<ListIcon />} startIcon={<ListIcon />}
size="small" size="small"
@@ -145,8 +149,8 @@ class EMSESPDevicesForm extends Component<
<TableCell align="center"> <TableCell align="center">
0x 0x
{("00" + device.deviceid.toString(16).toUpperCase()).slice( {("00" + device.deviceid.toString(16).toUpperCase()).slice(
-2 -2
)} )}
</TableCell> </TableCell>
<TableCell align="center">{device.productid}</TableCell> <TableCell align="center">{device.productid}</TableCell>
<TableCell align="center">{device.version}</TableCell> <TableCell align="center">{device.version}</TableCell>
@@ -195,11 +199,9 @@ class EMSESPDevicesForm extends Component<
{data.sensors.map((sensorData) => ( {data.sensors.map((sensorData) => (
<TableRow key={sensorData.no}> <TableRow key={sensorData.no}>
<TableCell component="th" scope="row"> <TableCell component="th" scope="row">
Sensor&nbsp;{sensorData.no} {sensorData.no}
</TableCell>
<TableCell align="center">
{sensorData.id}
</TableCell> </TableCell>
<TableCell align="center">{sensorData.id}</TableCell>
<TableCell align="right"> <TableCell align="right">
{formatTemp(sensorData.temp)} {formatTemp(sensorData.temp)}
</TableCell> </TableCell>