|
|
@ -2,7 +2,7 @@ import * as classNames from "classnames"; |
|
|
|
import {observer} from "mobx-react"; |
|
|
|
import {observer} from "mobx-react"; |
|
|
|
import * as React from "react"; |
|
|
|
import * as React from "react"; |
|
|
|
import {Header, Item} from "semantic-ui-react"; |
|
|
|
import {Header, Item} from "semantic-ui-react"; |
|
|
|
import {ProgramTable, RunSectionForm, SectionTable} from "."; |
|
|
|
import {ProgramTable, RunSectionForm, SectionTable, SectionRunnerView} from "."; |
|
|
|
|
|
|
|
|
|
|
|
import {SprinklersDevice} from "../sprinklers"; |
|
|
|
import {SprinklersDevice} from "../sprinklers"; |
|
|
|
import FontAwesome = require("react-fontawesome"); |
|
|
|
import FontAwesome = require("react-fontawesome"); |
|
|
@ -21,7 +21,7 @@ const ConnectionState = ({connected}: { connected: boolean }) => |
|
|
|
@observer |
|
|
|
@observer |
|
|
|
export default class DeviceView extends React.PureComponent<{ device: SprinklersDevice }, {}> { |
|
|
|
export default class DeviceView extends React.PureComponent<{ device: SprinklersDevice }, {}> { |
|
|
|
render() { |
|
|
|
render() { |
|
|
|
const {id, connected, sections, programs} = this.props.device; |
|
|
|
const {id, connected, sections, programs, sectionRunner} = this.props.device; |
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<Item> |
|
|
|
<Item> |
|
|
|
<Item.Image src={require<string>("app/images/raspberry_pi.png")}/> |
|
|
|
<Item.Image src={require<string>("app/images/raspberry_pi.png")}/> |
|
|
@ -33,6 +33,7 @@ export default class DeviceView extends React.PureComponent<{ device: Sprinklers |
|
|
|
<Item.Meta> |
|
|
|
<Item.Meta> |
|
|
|
|
|
|
|
|
|
|
|
</Item.Meta> |
|
|
|
</Item.Meta> |
|
|
|
|
|
|
|
<SectionRunnerView sectionRunner={sectionRunner}/> |
|
|
|
<SectionTable sections={sections}/> |
|
|
|
<SectionTable sections={sections}/> |
|
|
|
<RunSectionForm sections={sections}/> |
|
|
|
<RunSectionForm sections={sections}/> |
|
|
|
<ProgramTable programs={programs}/> |
|
|
|
<ProgramTable programs={programs}/> |
|
|
|