target
This commit is contained in:
parent
763db4283f
commit
2082914c46
|
@ -23,6 +23,7 @@
|
||||||
"@types/auth0-lock": "^10.16.0",
|
"@types/auth0-lock": "^10.16.0",
|
||||||
"@types/history": "^4.6.0",
|
"@types/history": "^4.6.0",
|
||||||
"@types/jest": "^19.2.4",
|
"@types/jest": "^19.2.4",
|
||||||
|
"@types/lodash": "^4.14.69",
|
||||||
"@types/prop-types": "^15.5.1",
|
"@types/prop-types": "^15.5.1",
|
||||||
"@types/react": "^15.0.38",
|
"@types/react": "^15.0.38",
|
||||||
"@types/react-addons-test-utils": "^0.14.19",
|
"@types/react-addons-test-utils": "^0.14.19",
|
||||||
|
@ -72,6 +73,7 @@
|
||||||
"history": "^4.6.3",
|
"history": "^4.6.3",
|
||||||
"immutable": "^3.8.1",
|
"immutable": "^3.8.1",
|
||||||
"inversify": "^4.2.0",
|
"inversify": "^4.2.0",
|
||||||
|
"lodash": "^4.17.4",
|
||||||
"prop-types": "^15.5.10",
|
"prop-types": "^15.5.10",
|
||||||
"react": "^15.6.1",
|
"react": "^15.6.1",
|
||||||
"react-dom": "^15.6.1",
|
"react-dom": "^15.6.1",
|
||||||
|
|
|
@ -7,7 +7,7 @@ import TitleBarContainer from './TitleBarContainer';
|
||||||
import LeftMenu from './LeftMenu';
|
import LeftMenu from './LeftMenu';
|
||||||
|
|
||||||
import TargetDetail from '../../views/infrastructure/target/Detail';
|
import TargetDetail from '../../views/infrastructure/target/Detail';
|
||||||
import ProbeHistory from '../../views/monitoring/probe/History';
|
import SensorList from '../../views/monitoring/sensor/List';
|
||||||
|
|
||||||
|
|
||||||
export interface Props extends RouteComponentProps<any> {
|
export interface Props extends RouteComponentProps<any> {
|
||||||
|
@ -30,11 +30,11 @@ export class TargetDetailLayout extends React.Component<Props, State> {
|
||||||
const sub = [
|
const sub = [
|
||||||
{
|
{
|
||||||
'name': 'Info',
|
'name': 'Info',
|
||||||
'path': this.state.currUrl + 'info',
|
'path': this.state.currUrl + '/info',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'name': 'History',
|
'name': 'Sensor',
|
||||||
'path': this.state.currUrl + 'history',
|
'path': this.state.currUrl + '/sensor',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
return (
|
return (
|
||||||
|
@ -45,7 +45,7 @@ export class TargetDetailLayout extends React.Component<Props, State> {
|
||||||
<TitleBarContainer title='Target Details' sub={sub} location={this.props.location.pathname} />
|
<TitleBarContainer title='Target Details' sub={sub} location={this.props.location.pathname} />
|
||||||
<Switch>
|
<Switch>
|
||||||
<Route exact={true} path={`${this.props.match.url}/:id`} component={TargetDetail} />
|
<Route exact={true} path={`${this.props.match.url}/:id`} component={TargetDetail} />
|
||||||
<Route exact={true} path={`${this.props.match.url}/:id/history`} component={ProbeHistory} />
|
<Route exact={true} path={`${this.props.match.url}/:id/sensor`} component={SensorList} />
|
||||||
</Switch>
|
</Switch>
|
||||||
<Footer />
|
<Footer />
|
||||||
</Segment>
|
</Segment>
|
||||||
|
|
|
@ -144,8 +144,15 @@ export class DiscoveryTable extends React.Component<Props, State> {
|
||||||
<Table.Cell><Input tabIndex='6' placeholder='End Port' onChange={this.handleInput.bind(this)} /></Table.Cell>
|
<Table.Cell><Input tabIndex='6' placeholder='End Port' onChange={this.handleInput.bind(this)} /></Table.Cell>
|
||||||
</Table.Row>
|
</Table.Row>
|
||||||
</Table.Body>
|
</Table.Body>
|
||||||
|
<Table.Footer>
|
||||||
|
<Table.Row>
|
||||||
|
<Table.HeaderCell colSpan='2'>
|
||||||
|
<Button icon='find' floated='right' labelPosition='left'
|
||||||
|
content='Start' primary onClick={this.discoveryStartHandler.bind(this)} />
|
||||||
|
</Table.HeaderCell>
|
||||||
|
</Table.Row>
|
||||||
|
</Table.Footer>
|
||||||
</Table>
|
</Table>
|
||||||
<Button floated='right' primary onClick={this.discoveryStartHandler.bind(this)}> Start </Button>
|
|
||||||
</Container>
|
</Container>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@ export function mapDispatchToProps(dispatch: Dispatch<any>): DispatchProps {
|
||||||
return {
|
return {
|
||||||
onRead: (id: string) => {
|
onRead: (id: string) => {
|
||||||
dispatch(targetDetailActions.request(id));
|
dispatch(targetDetailActions.request(id));
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -86,7 +86,7 @@ export class TargetDetail extends React.Component<Props, State> {
|
||||||
return (
|
return (
|
||||||
<Container fluid>
|
<Container fluid>
|
||||||
<TargetBasicInfo target={this.state.targetTemp} />
|
<TargetBasicInfo target={this.state.targetTemp} />
|
||||||
<SensorList target={this.props.target} />
|
{/*<SensorList target={this.props.target} />*/}
|
||||||
</Container>
|
</Container>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user