test inframap
This commit is contained in:
parent
78cd806c0f
commit
23e106db8f
|
@ -0,0 +1,19 @@
|
|||
import * as React from 'react';
|
||||
import { RouteComponentProps } from 'react-router';
|
||||
import InfraMapContainer from '@overflow/infra/react/InfraMap';
|
||||
|
||||
class InfraMaps extends React.Component<RouteComponentProps<object>, object> {
|
||||
|
||||
public constructor(props?: RouteComponentProps<object>, context?: object) {
|
||||
super(props, context);
|
||||
}
|
||||
|
||||
public render(): JSX.Element {
|
||||
return (
|
||||
<InfraMapContainer params={this.props.match.params}/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export default InfraMaps;
|
|
@ -17,6 +17,7 @@ import SensorSetup from '../../views/monitoring/sensor/Setup';
|
|||
import NotificationList from '../../views/notification/Notification';
|
||||
import Metric from '../../views/metric/Metric';
|
||||
import TomcatMetric from '../../views/metric/TomcatMetric';
|
||||
import InfraMaps from '../../views/infrastructure/maps/Maps';
|
||||
|
||||
export interface Props extends RouteComponentProps<any> {
|
||||
}
|
||||
|
@ -43,6 +44,7 @@ export class AppLayout extends React.Component<Props, State> {
|
|||
<Switch>
|
||||
<Route exact={true} path={`${this.props.match.url}`} component={Home}/>
|
||||
<Route exact={true} path={`${this.props.match.url}probes`} component={ProbeList}/>
|
||||
<Route exact={true} path={`${this.props.match.url}maps`} component={InfraMaps}/>
|
||||
<Route exact={true} path={`${this.props.match.url}targets`} component={TargetList}/>
|
||||
<Route exact={true} path={`${this.props.match.url}sensors`} component={SensorList}/>
|
||||
<Route exact={true} path={`${this.props.match.url}noauth_probes`} component={NoauthList}/>
|
||||
|
|
|
@ -98,7 +98,7 @@ class LeftMenu extends React.Component<Props, State> {
|
|||
<Header inverted sub icon='sitemap' content='Infrastructure' />
|
||||
</Menu.Header>
|
||||
<Menu.Menu>
|
||||
<Menu.Item href='#/' style={{ 'marginLeft': '30px' }}>Maps</Menu.Item>
|
||||
<Menu.Item onClick={(e) => this.props.onChangeUrl('/maps')} style={{ 'marginLeft': '30px' }}>Maps</Menu.Item>
|
||||
<Menu.Item onClick={(e) => this.props.onChangeUrl('/targets')} style={{ 'marginLeft': '30px' }}>Targets</Menu.Item>
|
||||
</Menu.Menu>
|
||||
</Menu.Item>
|
||||
|
|
25
src/ts/@overflow/infra/react/InfraMap.tsx
Normal file
25
src/ts/@overflow/infra/react/InfraMap.tsx
Normal file
|
@ -0,0 +1,25 @@
|
|||
import { connect, Dispatch } from 'react-redux';
|
||||
import {
|
||||
InfraMap,
|
||||
StateProps as StateProps,
|
||||
DispatchProps as DispatchProps,
|
||||
} from './components/InfraMap';
|
||||
|
||||
import { push as routerPush } from 'react-router-redux';
|
||||
import * as asyncRequestActions from '@overflow/commons/redux/action/asyncRequest';
|
||||
import PageParams from '@overflow/commons/api/model/PageParams';
|
||||
|
||||
|
||||
export function mapStateToProps(state: any, props: any): StateProps {
|
||||
return {
|
||||
probeId: props.params.id,
|
||||
infraList: state.infraList,
|
||||
};
|
||||
}
|
||||
|
||||
export function mapDispatchToProps(dispatch: Dispatch<any>): DispatchProps {
|
||||
return {
|
||||
};
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(InfraMap);
|
72
src/ts/@overflow/infra/react/components/InfraMap.tsx
Normal file
72
src/ts/@overflow/infra/react/components/InfraMap.tsx
Normal file
|
@ -0,0 +1,72 @@
|
|||
import * as React from 'react';
|
||||
import { Table, Header, Container, Form, Checkbox, Button, Rating } from 'semantic-ui-react';
|
||||
import { ListContainer } from '@overflow/commons/react/component/ListContainer';
|
||||
|
||||
export interface StateProps {
|
||||
}
|
||||
|
||||
export interface DispatchProps {
|
||||
}
|
||||
|
||||
export type Props = StateProps & DispatchProps;
|
||||
|
||||
export interface State {
|
||||
}
|
||||
|
||||
export class InfraMap extends React.Component<Props, State> {
|
||||
|
||||
constructor(props: Props, context: State) {
|
||||
super(props, context);
|
||||
|
||||
this.state = {
|
||||
selected: null,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
public render(): JSX.Element {
|
||||
return (
|
||||
<Table celled padded>
|
||||
<Table.Header>
|
||||
<Table.Row>
|
||||
<Table.HeaderCell singleLine>Zone : 192.168.1.0/24</Table.HeaderCell>
|
||||
</Table.Row>
|
||||
</Table.Header>
|
||||
<Table.Body>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Header as='h2' textAlign='center'>Windows / Probe</Header>
|
||||
</Table.Cell>
|
||||
<Table.Cell>
|
||||
Creatine supplementation is the reference compound for increasing muscular creatine levels; there is
|
||||
variability in this increase, however, with some nonresponders.
|
||||
</Table.Cell>
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Header as='h2' textAlign='center'>Windows</Header>
|
||||
</Table.Cell>
|
||||
<Table.Cell>
|
||||
Creatine is the reference compound for power improvement, with numbers from one meta-analysis to assess
|
||||
potency
|
||||
</Table.Cell>
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Header as='h2' textAlign='center'>Linux</Header>
|
||||
</Table.Cell>
|
||||
<Table.Cell>
|
||||
Creatine is the reference compound for power improvement, with numbers from one meta-analysis to assess
|
||||
potency
|
||||
</Table.Cell>
|
||||
</Table.Row>
|
||||
</Table.Body>
|
||||
</Table>
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user