diff --git a/src/ts/@overflow/sensor/react/SensorDetail.tsx b/src/ts/@overflow/sensor/react/SensorDetail.tsx deleted file mode 100644 index 7c2a594..0000000 --- a/src/ts/@overflow/sensor/react/SensorDetail.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import { connect, Dispatch } from 'react-redux'; -import { - SensorDetail, - SensorDetailStateProps, - SensorDetailDispatchProps, -} from './components/SensorDetail'; -import State from '../redux/state/Read'; - -import * as ReadActions from '../redux/action/read'; -import Target from '@overflow/target/api/model/Target'; -import Sensor from '@overflow/sensor/api/model/Sensor'; - -export function mapStateToProps(state: any): SensorDetailStateProps { - return { - sensor:state.sensor, - }; -} - -export function mapDispatchToProps(dispatch: Dispatch): SensorDetailDispatchProps { - return { - onRead: (id: number) => { - dispatch(ReadActions.request(id)); - }, - }; -} - - -export default connect(mapStateToProps, mapDispatchToProps)(SensorDetail); diff --git a/src/ts/@overflow/sensor/react/components/SensorDetail.tsx b/src/ts/@overflow/sensor/react/components/SensorDetail.tsx deleted file mode 100644 index 2392a8b..0000000 --- a/src/ts/@overflow/sensor/react/components/SensorDetail.tsx +++ /dev/null @@ -1,194 +0,0 @@ -import * as React from 'react'; -import { Button, Table, Label, Segment, Header, Container } from 'semantic-ui-react'; -import { DetailContainer } from '@overflow/commons/react/component/DetailContainer'; -import { SensorDetailItems } from './SensorDetailItems'; -import Sensor from '@overflow/sensor/api/model/Sensor'; -import Probe from '@overflow/probe/api/model/Probe'; - -export interface SensorDetailStateProps { - sensor?: Sensor; - probe?: Probe; -} - -export interface SensorDetailDispatchProps { - onRead?(id: number): void; -} - - -export type SensorDetailProps = SensorDetailStateProps & SensorDetailDispatchProps; - -export interface SensorDetailsState { - -} - - -export class SensorDetail extends React.Component { - - constructor(props: SensorDetailProps, context: SensorDetailsState) { - super(props, context); - this.state = { - }; - } - - public componentWillMount(): void { - console.log(''); - } - - public render(): JSX.Element { - const items = [ - { name: 'Info', child: }, - { name: 'Sensor Items', child: }, - ]; - const data = { 'probe': this.props.probe }; - return ( - - ); - } -} - - -export interface SensorBasicInfoProps { - sensor?: Sensor; - probe?: Probe; - onBack?(): void; -} - -export interface SensorBasicInfoState { - sensor: Sensor; -} - -export class SensorBasicInfo extends React.Component { - - constructor(props: SensorBasicInfoProps, context: SensorBasicInfoState) { - super(props, context); - this.state = { - sensor: SensorDetailJson, - }; - } - - public handleStartStop(event: any, data: any): void { - console.log(event); - } - public handleDiscovery(event: any, data: any): void { - alert('Discovery'); - } - - public handleBack(event: any, data: any): void { - this.props.onBack(); - } - - public componentWillMount(): void { - console.log(''); - } - - - public showStartStopBtn(): JSX.Element { - if (this.state.sensor.status.name === 'STARTED') { - return