ㅇ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 {
startPopup:boolean;
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 = {
const probeTemp:Object = {
'id': '11',
'metaProbeStatus': {
'name': 'STARTED',
@ -52,11 +37,28 @@ export class DiscoveryDetails extends React.Component<Props, State> {
'description': 'description1111111111',
'lastPollingAt': '2017-07-12 14:20',
'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);
this.setState({ startPopup:true });
this.submitData = obj;
@ -74,7 +76,7 @@ export class DiscoveryDetails extends React.Component<Props, State> {
return (
<Container fluid>
<Header as='h3' dividing> Discovery Details</Header>
<DiscoveryProbe probe={this.probeTemp}/>
<DiscoveryProbe probe={this.state.probeTemp}/>
<br />
<DiscoveryTable onProbeChange={this.handleProbeChange.bind(this)} />

View File

@ -1,23 +1,37 @@
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);
this.state = {};
}
// componentWillMount() {
// console.log(this.props.probe);
// }
public componentWillMount():void {
super.componentWillMount();
console.log(this.props.probe);
}
handle() {
public handle():void {
this.props.onProbeChange();
}
render() {
public render(): JSX.Element {
return (
<Container fluid>
<Header as='h4' color='grey'> Probe</Header>