|
|
|
@ -1,11 +1,15 @@
@@ -1,11 +1,15 @@
|
|
|
|
|
import { observer } from "mobx-react"; |
|
|
|
|
import * as React from "react"; |
|
|
|
|
import { Item } from "semantic-ui-react"; |
|
|
|
|
import { Item, Button } from "semantic-ui-react"; |
|
|
|
|
|
|
|
|
|
import { DeviceView } from "@client/components"; |
|
|
|
|
import { AppState, injectState } from "@client/state"; |
|
|
|
|
|
|
|
|
|
class DevicesPage extends React.Component<{ appState: AppState }> { |
|
|
|
|
refreshDevices = () => { |
|
|
|
|
this.props.appState.sprinklersRpc.doAuthenticate(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
render() { |
|
|
|
|
const { appState } = this.props; |
|
|
|
|
const { userData } = appState.userStore; |
|
|
|
@ -21,7 +25,7 @@ class DevicesPage extends React.Component<{ appState: AppState }> {
@@ -21,7 +25,7 @@ class DevicesPage extends React.Component<{ appState: AppState }> {
|
|
|
|
|
} |
|
|
|
|
return ( |
|
|
|
|
<React.Fragment> |
|
|
|
|
<h1>Devices</h1> |
|
|
|
|
<h1 className="devices-header">Devices <Button icon="refresh" onClick={this.refreshDevices}></Button></h1> |
|
|
|
|
<Item.Group>{deviceNodes}</Item.Group> |
|
|
|
|
</React.Fragment> |
|
|
|
|
); |
|
|
|
|