updating the proto and adding a button on the device page to test the scan i2c command
This commit is contained in:
parent
10b9cb951d
commit
2c3ba2c1f5
5 changed files with 30 additions and 6 deletions
|
|
@ -73,6 +73,7 @@ import ComponentOrder from "component/ComponentOrder";
|
|||
import ArcGISDeviceData from "./ArcGISDeviceData";
|
||||
import UpgradeDevice from "./UpgradeDevice";
|
||||
import { DevicePageData } from "pages/Device";
|
||||
import { quack } from "protobuf-ts/quack";
|
||||
|
||||
const useStyles = makeStyles((_theme: Theme) => {
|
||||
// const isMobile = useMobile()
|
||||
|
|
@ -113,6 +114,7 @@ interface Props {
|
|||
preferences: pond.DevicePreferences;
|
||||
isLoading: boolean;
|
||||
toggleNotificationPreference: Function;
|
||||
scanFunction: () => void
|
||||
}
|
||||
|
||||
interface DialogState {
|
||||
|
|
@ -145,7 +147,8 @@ export default function DeviceActions(props: Props) {
|
|||
permissions,
|
||||
preferences,
|
||||
isLoading,
|
||||
toggleNotificationPreference
|
||||
toggleNotificationPreference,
|
||||
scanFunction
|
||||
} = props;
|
||||
const classes = useStyles();
|
||||
const [{ user }] = useGlobalState();
|
||||
|
|
@ -251,7 +254,7 @@ export default function DeviceActions(props: Props) {
|
|||
</MenuItem>
|
||||
)}
|
||||
{canWrite &&
|
||||
user.hasAdmin() && ( //TODO: once the resync issue has been resolved remove the admin check
|
||||
user.hasAdmin() && (
|
||||
<MenuItem onClick={() => openDialog("isSyncDeviceDialogOpen")} dense>
|
||||
<ListItemIcon>
|
||||
<SyncDeviceIcon className={classes.amberIcon} />
|
||||
|
|
@ -517,6 +520,9 @@ export default function DeviceActions(props: Props) {
|
|||
const buttons = () => {
|
||||
return (
|
||||
<React.Fragment>
|
||||
<IconButton onClick={() => {
|
||||
scanFunction()
|
||||
}}>0</IconButton>
|
||||
{showSupport() && <Tooltip title="Support">
|
||||
<IconButton onClick={() => navigate("support", { state: {device: device, devicePageData: devicePageData }})}>
|
||||
<Visibility />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue