ㅇtslint
This commit is contained in:
parent
f01f185ed6
commit
33cb865a57
|
@ -15,12 +15,32 @@ export interface Props {
|
||||||
|
|
||||||
export interface State {
|
export interface State {
|
||||||
startPopup:boolean;
|
startPopup:boolean;
|
||||||
|
probeTemp: Object;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const probeTemp:Object = {
|
||||||
|
'id': '11',
|
||||||
|
'metaProbeStatus': {
|
||||||
|
'name': 'STARTED',
|
||||||
|
},
|
||||||
|
'domain': {
|
||||||
|
'name': 'overFlow\'s domain111',
|
||||||
|
},
|
||||||
|
'host': {
|
||||||
|
'ip': '192.168.1.103',
|
||||||
|
'mac': '44:8a:5b:44:8c:e8',
|
||||||
|
'os': 'Ubuntu 17.04',
|
||||||
|
'name': '?????',
|
||||||
|
},
|
||||||
|
'createAt': '2017-07-12',
|
||||||
|
'probeKey': 'AGBLKDFJ2452ASDGFL2KWJLKSDJ',
|
||||||
|
'description': 'description1111111111',
|
||||||
|
'lastPollingAt': '2017-07-12 14:20',
|
||||||
|
'nextPollingAt': '2017-07-12 14:30',
|
||||||
|
};
|
||||||
|
|
||||||
export class DiscoveryDetails extends React.Component<Props, State> {
|
export class DiscoveryDetails extends React.Component<Props, State> {
|
||||||
|
|
||||||
private probeTemp: any;
|
|
||||||
private submitData: any;
|
private submitData: any;
|
||||||
|
|
||||||
public constructor(props: Props, context: State) {
|
public constructor(props: Props, context: State) {
|
||||||
|
@ -28,35 +48,17 @@ export class DiscoveryDetails extends React.Component<Props, State> {
|
||||||
this.handleProbeChange.bind(this);
|
this.handleProbeChange.bind(this);
|
||||||
this.state = {
|
this.state = {
|
||||||
startPopup:false,
|
startPopup:false,
|
||||||
|
probeTemp:probeTemp,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public componentWillMount():void {
|
public componentWillMount():void {
|
||||||
super.componentWillMount();
|
super.componentWillMount();
|
||||||
this.probeTemp = {
|
|
||||||
'id': '11',
|
|
||||||
'metaProbeStatus': {
|
|
||||||
'name': 'STARTED',
|
|
||||||
},
|
|
||||||
'domain': {
|
|
||||||
'name': 'overFlow\'s domain111',
|
|
||||||
},
|
|
||||||
'host': {
|
|
||||||
'ip': '192.168.1.103',
|
|
||||||
'mac': '44:8a:5b:44:8c:e8',
|
|
||||||
'os': 'Ubuntu 17.04',
|
|
||||||
'name': '?????',
|
|
||||||
},
|
|
||||||
'createAt': '2017-07-12',
|
|
||||||
'probeKey': 'AGBLKDFJ2452ASDGFL2KWJLKSDJ',
|
|
||||||
'description': 'description1111111111',
|
|
||||||
'lastPollingAt': '2017-07-12 14:20',
|
|
||||||
'nextPollingAt': '2017-07-12 14:30',
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
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)} />
|
||||||
|
|
||||||
|
|
|
@ -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>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user