added sensor detail

This commit is contained in:
snoop 2017-07-24 17:41:40 +09:00
parent fa7cb087e8
commit 1f33fa7d2f
2 changed files with 34 additions and 3 deletions

View File

@ -6,6 +6,7 @@ import { Footer } from './Footer';
import { TitleBar } from './TitleBar';
import LeftMenu from './LeftMenu';
import SensorSetup from '../monitoring/sensor/Setup';
import SensorDetail from '../monitoring/sensor/Detail';
export interface Props extends RouteComponentProps<any> {
}
@ -37,9 +38,9 @@ class SensorDetailLayout extends React.Component<Props, State> {
<Header />
<TitleBar title='Probe Details' sub={sub} />
<Switch>
{/*<Route path={`${this.props.match.url}/:id/`} component={SignIn}/>
<Route path={`${this.props.match.url}/:id/info/`} component={SignUp}/>
<Route path={`${this.props.match.url}/:id/history/`} component={EmailConfirm}/>*/}
<Route path={`${this.props.match.url}/:id/`} component={SensorDetail}/>
<Route path={`${this.props.match.url}/:id/info/`} component={SensorDetail}/>
{/*<Route path={`${this.props.match.url}/:id/history/`} component={EmailConfirm}/>*/}
<Route path={`${this.props.match.url}/setup/`} component={SensorSetup} />
</Switch>
<Footer />

View File

@ -0,0 +1,30 @@
import * as React from 'react';
import { RouteComponentProps } from 'react-router';
import SensorDetailContainer from '@overflow/sensor/react/SensorDetail';
import WebSocketRPC from '@overflow/commons/websocket/WebSocketRPC';
import AppContext from '@overflow/commons/context';
import inject from '@overflow/commons/context/decorator/inject';
class SensorDetail extends React.Component<RouteComponentProps<object>, object> {
@inject()
private client: WebSocketRPC;
public constructor(props?: RouteComponentProps<object>, context?: object) {
super(props, context);
let con = AppContext.get<WebSocketRPC>();
}
public render(): JSX.Element {
return (
<SensorDetailContainer />
);
}
private test(@inject() c: WebSocketRPC): void {
console.log('');
}
}
export default SensorDetail;