ㅇtslint

This commit is contained in:
geek 2017-07-20 13:30:15 +09:00
parent fdf176d745
commit 35acbdb599
3 changed files with 37 additions and 13 deletions

View File

@ -15,7 +15,7 @@ export interface Props {
export interface State {
startPopup:boolean;
probeTemp: Object;
probeTemp: any;
}
const probeTemp:Object = {

View File

@ -6,10 +6,11 @@ import {
Container,
Icon,
} from 'semantic-ui-react';
import {object} from 'prop-types';
export interface Props {
probe: Object;
onProbeChange():void;
probe?: any;
onProbeChange?:((obj:object) => void);
}
export interface State {
@ -28,7 +29,7 @@ export class DiscoveryProbe extends React.Component<Props, State> {
}
public handle():void {
this.props.onProbeChange();
this.props.onProbeChange(this.state);
}
public render(): JSX.Element {

View File

@ -1,22 +1,45 @@
import * as React from 'react';
import {Table, Button, Input, InputProps, ButtonProps, Dropdown, Container, Header } from 'semantic-ui-react';
import {
Table,
Button,
Input,
InputProps,
ButtonProps,
Dropdown,
Container,
Header,
} from 'semantic-ui-react';
export class DiscoveryTable extends React.Component<any, any> {
export interface Props {
onProbeChange?(state:object):void;
}
export interface State {
startIp: string;
endIP: string;
excludeIp: string;
startPort: string;
endPort: string;
}
export class DiscoveryTable extends React.Component<Props, State> {
private serviceTemp: any;
constructor(props: any, context: any) {
constructor(props: Props, context: State) {
super(props, context);
this.state = {
startIp: null,
endIP: null,
excludeIp: null,
startPort: null,
endPort: null
endPort: null,
};
}
componentWillMount() {
public componentWillMount():void {
super.componentWillMount();
this.serviceTemp = [
{ key: 'http', text: 'HTTP', value: 'http' },
{ key: 'ftp', text: 'FTP', value: 'ftp' },
@ -35,7 +58,7 @@ export class DiscoveryTable extends React.Component<any, any> {
];
}
handleInput(event: React.SyntheticEvent<HTMLInputElement>, data: InputProps) {
public handleInput(event: React.SyntheticEvent<HTMLInputElement>, data: InputProps):void {
// console.log( data.value);
// console.log( event.target);
// console.log(data.tabIndex);
@ -73,7 +96,7 @@ export class DiscoveryTable extends React.Component<any, any> {
break;
}
default:{
console.log("Error");
console.log('Error');
break;
}
}
@ -81,11 +104,11 @@ export class DiscoveryTable extends React.Component<any, any> {
console.log(this.state.startPort);
}
discoveryStartHandler(event: React.SyntheticEvent<HTMLButtonElement>, data: ButtonProps) {
public discoveryStartHandler(event: React.SyntheticEvent<HTMLButtonElement>, data: ButtonProps): void {
this.props.onProbeChange(this.state);
}
render() {
public render(): JSX.Element {
return (
<Container fluid>
<Header as='h4' color='grey'> Discovery</Header>