ㅇtslint

This commit is contained in:
geek 2017-07-20 12:45:11 +09:00
parent f01f185ed6
commit 33cb865a57
2 changed files with 47 additions and 31 deletions

View File

@ -15,25 +15,10 @@ export interface Props {
export interface State { export interface State {
startPopup:boolean; startPopup:boolean;
probeTemp: Object;
} }
const probeTemp:Object = {
export class DiscoveryDetails extends React.Component<Props, State> {
private probeTemp: any;
private submitData: any;
public constructor(props: Props, context: State) {
super(props, context);
this.handleProbeChange.bind(this);
this.state = {
startPopup:false,
};
}
public componentWillMount():void {
super.componentWillMount();
this.probeTemp = {
'id': '11', 'id': '11',
'metaProbeStatus': { 'metaProbeStatus': {
'name': 'STARTED', 'name': 'STARTED',
@ -52,11 +37,28 @@ export class DiscoveryDetails extends React.Component<Props, State> {
'description': 'description1111111111', 'description': 'description1111111111',
'lastPollingAt': '2017-07-12 14:20', 'lastPollingAt': '2017-07-12 14:20',
'nextPollingAt': '2017-07-12 14:30', 'nextPollingAt': '2017-07-12 14:30',
};
export class DiscoveryDetails extends React.Component<Props, State> {
private submitData: any;
public constructor(props: Props, context: State) {
super(props, context);
this.handleProbeChange.bind(this);
this.state = {
startPopup:false,
probeTemp:probeTemp,
}; };
}
public componentWillMount():void {
super.componentWillMount();
} }
public handleProbeChange(obj: any): void { public handleProbeChange(obj: Object): void {
console.log(obj); console.log(obj);
this.setState({ startPopup:true }); this.setState({ startPopup:true });
this.submitData = obj; this.submitData = obj;
@ -74,7 +76,7 @@ export class DiscoveryDetails extends React.Component<Props, State> {
return ( return (
<Container fluid> <Container fluid>
<Header as='h3' dividing> Discovery Details</Header> <Header as='h3' dividing> Discovery Details</Header>
<DiscoveryProbe probe={this.probeTemp}/> <DiscoveryProbe probe={this.state.probeTemp}/>
<br /> <br />
<DiscoveryTable onProbeChange={this.handleProbeChange.bind(this)} /> <DiscoveryTable onProbeChange={this.handleProbeChange.bind(this)} />

View File

@ -1,23 +1,37 @@
import * as React from 'react'; import * as React from 'react';
import { Table, Label, Header, Container, Icon } from 'semantic-ui-react'; import {
Table,
Label,
Header,
Container,
Icon,
} from 'semantic-ui-react';
export interface Props {
probe: Object;
onProbeChange():void;
}
export class DiscoveryProbe extends React.Component<any, any> { export interface State {
}
constructor(props: any, context: any) { export class DiscoveryProbe extends React.Component<Props, State> {
constructor(props: Props, context: State) {
super(props, context); super(props, context);
this.state = {}; this.state = {};
} }
// componentWillMount() { public componentWillMount():void {
// console.log(this.props.probe); super.componentWillMount();
// } console.log(this.props.probe);
}
handle() { public handle():void {
this.props.onProbeChange(); this.props.onProbeChange();
} }
render() { public render(): JSX.Element {
return ( return (
<Container fluid> <Container fluid>
<Header as='h4' color='grey'> Probe</Header> <Header as='h4' color='grey'> Probe</Header>