added target, probe history

This commit is contained in:
snoop 2017-08-22 14:03:58 +09:00
parent 82c80888fd
commit dd2683eada
3 changed files with 9 additions and 2 deletions

View File

@ -10,6 +10,7 @@ import ProbeDetail from '../../views/monitoring/probe/Detail';
import ProbeHost from '../../views/monitoring/probe/Host'; import ProbeHost from '../../views/monitoring/probe/Host';
import ProbeHistory from '../../views/monitoring/probe/History'; import ProbeHistory from '../../views/monitoring/probe/History';
import TargetList from '../../views/infrastructure/target/List'; import TargetList from '../../views/infrastructure/target/List';
import HistoryView from '../../views/history/List';
export interface Props extends RouteComponentProps<any> { export interface Props extends RouteComponentProps<any> {
} }
@ -56,7 +57,7 @@ export class ProbeDetailLayout extends React.Component<Props, State> {
<Switch> <Switch>
<Route exact={true} path={`${this.props.match.url}/:id`} component={ProbeDetail} /> <Route exact={true} path={`${this.props.match.url}/:id`} component={ProbeDetail} />
<Route exact={true} path={`${this.props.match.url}/:id/host`} component={ProbeHost} /> <Route exact={true} path={`${this.props.match.url}/:id/host`} component={ProbeHost} />
<Route exact={true} path={`${this.props.match.url}/:id/history`} component={ProbeHistory} /> <Route exact={true} path={`${this.props.match.url}/:id/history`} component={HistoryView} />
<Route exact={true} path={`${this.props.match.url}/:id/targets`} component={TargetList} /> <Route exact={true} path={`${this.props.match.url}/:id/targets`} component={TargetList} />
</Switch> </Switch>
</Segment> </Segment>

View File

@ -8,7 +8,7 @@ import LeftMenu from './LeftMenu';
import TargetDetail from '../../views/infrastructure/target/Detail'; import TargetDetail from '../../views/infrastructure/target/Detail';
import SensorList from '../../views/monitoring/sensor/List'; import SensorList from '../../views/monitoring/sensor/List';
import HistoryView from '../../views/history/List';
export interface Props extends RouteComponentProps<any> { export interface Props extends RouteComponentProps<any> {
} }
@ -36,6 +36,10 @@ export class TargetDetailLayout extends React.Component<Props, State> {
'name': 'Sensor', 'name': 'Sensor',
'path': this.state.currUrl + '/sensor', 'path': this.state.currUrl + '/sensor',
}, },
{
'name': 'History',
'path': this.state.currUrl + '/history',
},
]; ];
return ( return (
<Container fluid> <Container fluid>
@ -47,6 +51,7 @@ export class TargetDetailLayout extends React.Component<Props, State> {
<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/sensor`} component={SensorList} /> <Route exact={true} path={`${this.props.match.url}/:id/sensor`} component={SensorList} />
<Route exact={true} path={`${this.props.match.url}/:id/history`} component={HistoryView} />
</Switch> </Switch>
</Segment> </Segment>
<Footer /> <Footer />

View File

@ -61,6 +61,7 @@ export class HistoryList extends React.Component<Props, State> {
</Table.Row> </Table.Row>
)) : ''} )) : ''}
</Table.Body> </Table.Body>
<Table.Footer>1 2 3 ...</Table.Footer>
</Table> </Table>
</Container> </Container>