Merge branch 'master' of https://git.loafle.net/overflow/overflow_app
This commit is contained in:
commit
f71fcfb0f8
|
@ -83,7 +83,7 @@ export class Discovery extends React.Component<Props, State> {
|
||||||
<DiscoveryTable onProbeChange={this.handleProbeChange.bind(this)} />
|
<DiscoveryTable onProbeChange={this.handleProbeChange.bind(this)} />
|
||||||
|
|
||||||
<Modal size='small' open={this.state.startPopup} onClose={this.handlePopupClose}>
|
<Modal size='small' open={this.state.startPopup} onClose={this.handlePopupClose}>
|
||||||
<Modal.Header>Change your password Enter email address.</Modal.Header>
|
<Modal.Header>Discovery.</Modal.Header>
|
||||||
<Modal.Content >
|
<Modal.Content >
|
||||||
<Checkbox label='IP' />
|
<Checkbox label='IP' />
|
||||||
</Modal.Content>
|
</Modal.Content>
|
||||||
|
|
|
@ -20,6 +20,7 @@ export type Props = StateProps & DispatchProps;
|
||||||
|
|
||||||
export interface State {
|
export interface State {
|
||||||
selected: Probe;
|
selected: Probe;
|
||||||
|
targetTemp: any;
|
||||||
isDetail: boolean;
|
isDetail: boolean;
|
||||||
list: Probe[];
|
list: Probe[];
|
||||||
}
|
}
|
||||||
|
@ -31,11 +32,38 @@ export class TargetDetail extends React.Component<Props, State> {
|
||||||
super(props, context);
|
super(props, context);
|
||||||
this.state = {
|
this.state = {
|
||||||
selected: null,
|
selected: null,
|
||||||
|
targetTemp: null,
|
||||||
isDetail: false,
|
isDetail: false,
|
||||||
list: null,
|
list: null,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public componentWillMount(): void {
|
||||||
|
let data = {
|
||||||
|
'id': '1',
|
||||||
|
'probe': {
|
||||||
|
'id': '1',
|
||||||
|
'status': {
|
||||||
|
'id': '1',
|
||||||
|
'name': 'INITIAL',
|
||||||
|
},
|
||||||
|
'description': 'snoop probe',
|
||||||
|
'domain': {
|
||||||
|
'id': '1',
|
||||||
|
'name': 'overFlow`s domain',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'infra': {
|
||||||
|
'id': '1',
|
||||||
|
'type': {
|
||||||
|
'id': '1',
|
||||||
|
'name': 'MACHINE',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
this.setState({targetTemp: data});
|
||||||
|
}
|
||||||
public handleBack(): void {
|
public handleBack(): void {
|
||||||
console.log('handleBack');
|
console.log('handleBack');
|
||||||
}
|
}
|
||||||
|
@ -51,13 +79,13 @@ export class TargetDetail extends React.Component<Props, State> {
|
||||||
}
|
}
|
||||||
|
|
||||||
const items = [
|
const items = [
|
||||||
{ name: 'Info', child: <TargetBasicInfo probe={this.props.probe} /> },
|
{ name: 'Info', child: <TargetBasicInfo target={this.state.targetTemp} /> },
|
||||||
{ name: 'Sensors', child: <SensorList target={this.props.target} /> },
|
{ name: 'Sensors', child: <SensorList target={this.props.target} /> },
|
||||||
];
|
];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Container fluid>
|
<Container fluid>
|
||||||
<TargetBasicInfo probe={this.props.probe} />
|
<TargetBasicInfo target={this.state.targetTemp} />
|
||||||
<SensorList target={this.props.target} />
|
<SensorList target={this.props.target} />
|
||||||
</Container>
|
</Container>
|
||||||
);
|
);
|
||||||
|
@ -66,7 +94,7 @@ export class TargetDetail extends React.Component<Props, State> {
|
||||||
|
|
||||||
|
|
||||||
export interface TargetBasicInfoProps {
|
export interface TargetBasicInfoProps {
|
||||||
probe?: Probe;
|
target?: Target;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface TargetBasicInfoState {
|
export interface TargetBasicInfoState {
|
||||||
|
@ -81,6 +109,7 @@ export class TargetBasicInfo extends React.Component<TargetBasicInfoProps, Targe
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public handleRemoveTarget(): void {
|
public handleRemoveTarget(): void {
|
||||||
alert('remove');
|
alert('remove');
|
||||||
}
|
}
|
||||||
|
@ -96,7 +125,7 @@ export class TargetBasicInfo extends React.Component<TargetBasicInfoProps, Targe
|
||||||
<Header size='small'>Name</Header>
|
<Header size='small'>Name</Header>
|
||||||
</Table.Cell>
|
</Table.Cell>
|
||||||
<Table.Cell>
|
<Table.Cell>
|
||||||
???
|
{this.props.target.probe.domain.name}
|
||||||
</Table.Cell>
|
</Table.Cell>
|
||||||
</Table.Row>
|
</Table.Row>
|
||||||
|
|
||||||
|
@ -105,7 +134,7 @@ export class TargetBasicInfo extends React.Component<TargetBasicInfoProps, Targe
|
||||||
<Header size='small'>Type</Header>
|
<Header size='small'>Type</Header>
|
||||||
</Table.Cell>
|
</Table.Cell>
|
||||||
<Table.Cell>
|
<Table.Cell>
|
||||||
????
|
{this.props.target.infra.type.name}
|
||||||
</Table.Cell>
|
</Table.Cell>
|
||||||
</Table.Row>
|
</Table.Row>
|
||||||
|
|
||||||
|
@ -114,7 +143,7 @@ export class TargetBasicInfo extends React.Component<TargetBasicInfoProps, Targe
|
||||||
<Header size='small'>Sensor count</Header>
|
<Header size='small'>Sensor count</Header>
|
||||||
</Table.Cell>
|
</Table.Cell>
|
||||||
<Table.Cell>
|
<Table.Cell>
|
||||||
???
|
1
|
||||||
</Table.Cell>
|
</Table.Cell>
|
||||||
</Table.Row>
|
</Table.Row>
|
||||||
|
|
||||||
|
@ -123,13 +152,20 @@ export class TargetBasicInfo extends React.Component<TargetBasicInfoProps, Targe
|
||||||
<Header size='small'>Created at</Header>
|
<Header size='small'>Created at</Header>
|
||||||
</Table.Cell>
|
</Table.Cell>
|
||||||
<Table.Cell>
|
<Table.Cell>
|
||||||
???
|
{this.props.target.createDate}
|
||||||
</Table.Cell>
|
</Table.Cell>
|
||||||
</Table.Row>
|
</Table.Row>
|
||||||
|
|
||||||
</Table.Body>
|
</Table.Body>
|
||||||
|
<Table.Footer>
|
||||||
|
<Table.Row>
|
||||||
|
<Table.HeaderCell colSpan='2'>
|
||||||
|
<Button primary floated={'right'} negative onClick={this.handleRemoveTarget}>Remove</Button>
|
||||||
|
</Table.HeaderCell>
|
||||||
|
</Table.Row>
|
||||||
|
</Table.Footer>
|
||||||
</Table>
|
</Table>
|
||||||
<Button primary floated={'right'} negative onClick={this.handleRemoveTarget}>Remove</Button>
|
|
||||||
</Container>
|
</Container>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user