discovery view

This commit is contained in:
geek 2017-07-21 13:31:50 +09:00
parent d5be7681dc
commit 7e2d9eee39
6 changed files with 35 additions and 9 deletions

View File

@ -8,6 +8,7 @@ import SensorList from '../views/monitoring/sensor/List';
import SensorSetup from '../views/monitoring/sensor/Setup';
import ProbeList from '../views/monitoring/probe/List';
import TargetList from '../views/infrastructure/target/List';
import Discovery from '../../temp/react/components/Discovery';
// import { SignUp } from '@overflow/member/react/components/SignUp';
// import { SignIn } from '@overflow/member/react/components/SignIn';
@ -52,6 +53,8 @@ const routes = (
<Route exact path='/test2' component={SignUp} />
<Route exact path='/test3' component={SignIn} />
<Route exact path='/test4' component={PWChange} />
<Route exact path='/test24' component={Discovery} />
<Route exact path='/probe_list' component={ProbeList} />
<Route exact path='/sensor_list' component={SensorList} />
<Route exact path='/target_list' component={TargetList} />

View File

@ -79,7 +79,7 @@ export class LeftMenu extends React.Component<any, any> {
<Dropdown.Item href='#/test4'> PWChange </Dropdown.Item>
<Dropdown.Item href='#/test5'>ProbeDown</Dropdown.Item>
<Dropdown.Item href='#/test14'> Insanity </Dropdown.Item>
<Dropdown.Item href='#/test6'>DiscoveryDetails</Dropdown.Item>
<Dropdown.Item href='#/test24'>Discovery</Dropdown.Item>
<Dropdown.Item href='#/test7'>Tree</Dropdown.Item>
<Dropdown.Item href='#/test8'>TableExampleSortable</Dropdown.Item>
<Dropdown.Item href='#/sensor_list'>SensorList</Dropdown.Item>

View File

@ -13,7 +13,6 @@ export interface StateProps {
}
export interface DispatchProps {
}
export type Props = StateProps & DispatchProps;
@ -58,8 +57,6 @@ export class Discovery extends React.Component<Props, State> {
}
public componentWillMount():void {
super.componentWillMount();
}

View File

@ -23,10 +23,10 @@ export class DiscoveryProbe extends React.Component<Props, State> {
this.state = {};
}
public componentWillMount():void {
super.componentWillMount();
console.log(this.props.probe);
}
// public componentWillMount():void {
// super.componentWillMount();
// console.log(this.props.probe);
// }
public handle():void {
this.props.onProbeChange(this.state);

View File

@ -39,7 +39,7 @@ export class DiscoveryTable extends React.Component<Props, State> {
}
public componentWillMount():void {
super.componentWillMount();
// super.componentWillMount();
this.serviceTemp = [
{ key: 'http', text: 'HTTP', value: 'http' },
{ key: 'ftp', text: 'FTP', value: 'ftp' },

View File

@ -0,0 +1,26 @@
import * as React from 'react';
import { RouteComponentProps } from 'react-router';
import DiscoveryContainer from '@overflow/discovery/react/Discovery';
import WebSocketRPC from '@overflow/commons/websocket/WebSocketRPC';
import AppContext from '@overflow/commons/context';
import inject from '@overflow/commons/context/decorator/inject';
class Discovery 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 (
<DiscoveryContainer/>
);
}
}
export default Discovery;