fixed lint
This commit is contained in:
parent
94d737fc3a
commit
75b7a6e27e
|
@ -11,18 +11,18 @@ export class SensorDetails extends React.Component<any, any> {
|
|||
};
|
||||
}
|
||||
|
||||
componentWillMount() {
|
||||
|
||||
public componentWillMount(): void {
|
||||
super.componentWillMount();
|
||||
}
|
||||
|
||||
render() {
|
||||
public render(): JSX.Element {
|
||||
const items = [
|
||||
{ name: 'Info', child: <Button sensor={this.props.sensor}/> },
|
||||
{ name: 'Sensor Items', child: <SensorItems sensor={this.props.sensor}/> },
|
||||
{ name: 'Info', child: <Button sensor={this.props.sensor} /> },
|
||||
{ name: 'Sensor Items', child: <SensorItems sensor={this.props.sensor} /> },
|
||||
];
|
||||
const data = {'probe':this.props.probe};
|
||||
const data = { 'probe': this.props.probe };
|
||||
return (
|
||||
<DetailContainer panes={items} data={data}/>
|
||||
<DetailContainer panes={items} data={data} />
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -35,19 +35,19 @@ export class SensorBasicInfo extends React.Component<any, any> {
|
|||
};
|
||||
}
|
||||
|
||||
handleStartStop(event: any, data: any) {
|
||||
public handleStartStop = (event: any, data: any) => {
|
||||
console.log(event);
|
||||
}
|
||||
handleDiscovery(event: any, data: any) {
|
||||
public handleDiscovery = (event: any, data: any) => {
|
||||
alert('Discovery');
|
||||
}
|
||||
|
||||
handleBack(event: any, data: any) {
|
||||
public handleBack = (event: any, data: any) => {
|
||||
this.props.onBack();
|
||||
}
|
||||
|
||||
|
||||
showStartStopBtn() {
|
||||
public showStartStopBtn = () => {
|
||||
if (this.props.probe.metaProbeStatus.name === 'STARTED') {
|
||||
return <Button content='Stop' icon='stop' labelPosition='left' color={'blue'} floated={'right'} onClick={this.handleStartStop} />;
|
||||
} else {
|
||||
|
@ -55,7 +55,7 @@ export class SensorBasicInfo extends React.Component<any, any> {
|
|||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
public render(): JSX.Element {
|
||||
return (
|
||||
<Container fluid>
|
||||
<Header as='h3' dividing>Sensor Details</Header>
|
||||
|
@ -107,4 +107,4 @@ export class SensorBasicInfo extends React.Component<any, any> {
|
|||
</Container>
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,8 +9,8 @@ export class SensorItems extends React.Component<any, any> {
|
|||
};
|
||||
}
|
||||
|
||||
public componentWillMount() {
|
||||
console.log('componentWillMount');
|
||||
public componentWillMount():void {
|
||||
super.componentWillMount();
|
||||
}
|
||||
|
||||
public render(): JSX.Element {
|
||||
|
|
|
@ -14,7 +14,8 @@ export class Sensors extends React.Component<any, any> {
|
|||
};
|
||||
}
|
||||
|
||||
public componentWillMount = () => {
|
||||
public componentWillMount():void {
|
||||
super.componentWillMount();
|
||||
this.data = [
|
||||
{
|
||||
'id': '111',
|
||||
|
|
|
@ -11,10 +11,6 @@ export class Targets extends React.Component<any, any> {
|
|||
};
|
||||
}
|
||||
|
||||
public componentWillMount = ():void => {
|
||||
console.log('componentWillMount');
|
||||
}
|
||||
|
||||
public handleAddTarget = (event: React.MouseEvent<HTMLButtonElement>, data: ButtonProps) => {
|
||||
this.setState({
|
||||
openAddTarget: true,
|
||||
|
@ -53,6 +49,10 @@ export class Targets extends React.Component<any, any> {
|
|||
</Container>
|
||||
);
|
||||
}
|
||||
|
||||
public componentWillMount():void {
|
||||
super.componentWillMount();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -86,7 +86,38 @@ export class TargetTable extends React.Component<any, any> {
|
|||
});
|
||||
}
|
||||
|
||||
public componentWillMount = () => {
|
||||
public render(): JSX.Element {
|
||||
return (
|
||||
<Container fluid>
|
||||
<Header as='h3' dividing>Targets</Header>
|
||||
<Input icon='search' placeholder='Search...' onChange={this.handleSearch.bind(this)} />
|
||||
<Table celled selectable striped>
|
||||
<Table.Header>
|
||||
<Table.Row>
|
||||
<Table.HeaderCell textAlign={'center'}>No.</Table.HeaderCell>
|
||||
<Table.HeaderCell textAlign={'center'}>Type</Table.HeaderCell>
|
||||
<Table.HeaderCell textAlign={'center'}>Name</Table.HeaderCell>
|
||||
<Table.HeaderCell textAlign={'center'}>Version</Table.HeaderCell>
|
||||
</Table.Row>
|
||||
</Table.Header>
|
||||
|
||||
<Table.Body>
|
||||
{this.state.list.map((target: any, index: number) => (
|
||||
<Table.Row key={index} onClick={this.handleSelect.bind(this, target)}>
|
||||
<Table.Cell textAlign={'center'}>{index + 1}</Table.Cell>
|
||||
<Table.Cell textAlign={'center'}>{target.infra.metaInfraType.name}</Table.Cell>
|
||||
<Table.Cell>todo</Table.Cell>
|
||||
<Table.Cell>todo</Table.Cell>
|
||||
</Table.Row>
|
||||
))}
|
||||
</Table.Body>
|
||||
</Table>
|
||||
</Container>
|
||||
);
|
||||
}
|
||||
|
||||
public componentWillMount():void {
|
||||
super.componentWillMount();
|
||||
this.data = [
|
||||
{
|
||||
'id': '1',
|
||||
|
@ -127,36 +158,6 @@ export class TargetTable extends React.Component<any, any> {
|
|||
list: this.data,
|
||||
});
|
||||
}
|
||||
|
||||
public render(): JSX.Element {
|
||||
return (
|
||||
<Container fluid>
|
||||
<Header as='h3' dividing>Targets</Header>
|
||||
<Input icon='search' placeholder='Search...' onChange={this.handleSearch.bind(this)} />
|
||||
<Table celled selectable striped>
|
||||
<Table.Header>
|
||||
<Table.Row>
|
||||
<Table.HeaderCell textAlign={'center'}>No.</Table.HeaderCell>
|
||||
<Table.HeaderCell textAlign={'center'}>Type</Table.HeaderCell>
|
||||
<Table.HeaderCell textAlign={'center'}>Name</Table.HeaderCell>
|
||||
<Table.HeaderCell textAlign={'center'}>Version</Table.HeaderCell>
|
||||
</Table.Row>
|
||||
</Table.Header>
|
||||
|
||||
<Table.Body>
|
||||
{this.state.list.map((target: any, index: number) => (
|
||||
<Table.Row key={index} onClick={this.handleSelect.bind(this, target)}>
|
||||
<Table.Cell textAlign={'center'}>{index + 1}</Table.Cell>
|
||||
<Table.Cell textAlign={'center'}>{target.infra.metaInfraType.name}</Table.Cell>
|
||||
<Table.Cell>todo</Table.Cell>
|
||||
<Table.Cell>todo</Table.Cell>
|
||||
</Table.Row>
|
||||
))}
|
||||
</Table.Body>
|
||||
</Table>
|
||||
</Container>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user