fixed inframap

This commit is contained in:
snoop 2017-12-26 17:06:07 +09:00
parent 23e106db8f
commit f51c0676b5
7 changed files with 269 additions and 73 deletions

View File

@ -3,7 +3,7 @@ import {
InfraMap,
StateProps as StateProps,
DispatchProps as DispatchProps,
} from './components/InfraMap';
} from './components/infra_map';
import { push as routerPush } from 'react-router-redux';
import * as asyncRequestActions from '@overflow/commons/redux/action/asyncRequest';

View File

@ -1,72 +0,0 @@
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>
);
}
}

View File

@ -0,0 +1,49 @@
import * as React from 'react';
import { Table, Header, Container, Form, Checkbox, Button, Rating,
Tab,
} from 'semantic-ui-react';
import { ListContainer } from '@overflow/commons/react/component/ListContainer';
import { InfraMapZoneTable } from './infra_map_zone_table';
import { InfraMapHostTable } from './infra_map_host_table';
export interface StateProps {
}
export interface DispatchProps {
}
export type Props = StateProps & DispatchProps;
export interface State {
}
export class InfraMap extends React.Component<Props, State> {
private panes: any = [
{ menuItem: 'Zone', render: () => <Tab.Pane attached={false}><InfraMapZoneTable /></Tab.Pane> },
{ menuItem: 'Host', render: () => <Tab.Pane attached={false}><InfraMapHostTable /></Tab.Pane> },
];
constructor(props: Props, context: State) {
super(props, context);
this.state = {
selected: null,
};
}
public render(): JSX.Element {
return (
<Container>
<Tab menu={{ pointing: true }} panes={this.panes} />
</Container>
);
}
}

View File

@ -0,0 +1,48 @@
import * as React from 'react';
import {
Table, Header, Container, Form, Checkbox, Button, Rating,
List, Icon,
} from 'semantic-ui-react';
import { ListContainer } from '@overflow/commons/react/component/ListContainer';
import {InfraMapHostTableRow} from './infra_map_host_table_row';
export interface StateProps {
}
export interface DispatchProps {
}
export type Props = StateProps & DispatchProps;
export interface State {
}
export class InfraMapHostTable 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>Host : 192.168.1.106</Table.HeaderCell>
</Table.Row>
</Table.Header>
<Table.Body>
<InfraMapHostTableRow />
<InfraMapHostTableRow />
</Table.Body>
</Table>
);
}
}

View File

@ -0,0 +1,58 @@
import * as React from 'react';
import {
Table, Header, Container, Form, Checkbox, Button, Rating,
List, Icon,
} from 'semantic-ui-react';
export interface StateProps {
}
export interface DispatchProps {
}
export type Props = StateProps & DispatchProps;
export interface State {
}
export class InfraMapHostTableRow extends React.Component<Props, State> {
constructor(props: Props, context: State) {
super(props, context);
this.state = {
selected: null,
};
}
public render(): JSX.Element {
return (
<Table.Row>
<Table.Cell>
<Header textAlign='center'>MySQL</Header>
</Table.Cell>
<Table.Cell>
<List>
<List.Item>Port : 3306 | TCP | TLS</List.Item>
<List.Item>Sensors(2) :
<List horizontal>
<List.Item>
<Icon link name='square' />Health Crawler
</List.Item>
<List.Item>
<Icon link name='square outline' />MySQL
</List.Item>
</List>
<Button.Group floated='right'>
<Button>Add Sensor</Button>
</Button.Group>
</List.Item>
</List>
</Table.Cell>
</Table.Row>
);
}
}

View File

@ -0,0 +1,48 @@
import * as React from 'react';
import {
Table, Header, Container, Form, Checkbox, Button, Rating,
List, Icon,
} from 'semantic-ui-react';
import { ListContainer } from '@overflow/commons/react/component/ListContainer';
import {InfraMapZoneTableRow} from './infra_map_zone_table_row';
export interface StateProps {
}
export interface DispatchProps {
}
export type Props = StateProps & DispatchProps;
export interface State {
}
export class InfraMapZoneTable 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>
<InfraMapZoneTableRow />
<InfraMapZoneTableRow />
</Table.Body>
</Table>
);
}
}

View File

@ -0,0 +1,65 @@
import * as React from 'react';
import {
Table, Header, Container, Form, Checkbox, Button, Rating,
List, Icon,
} from 'semantic-ui-react';
export interface StateProps {
}
export interface DispatchProps {
}
export type Props = StateProps & DispatchProps;
export interface State {
}
export class InfraMapZoneTableRow extends React.Component<Props, State> {
constructor(props: Props, context: State) {
super(props, context);
this.state = {
selected: null,
};
}
public render(): JSX.Element {
return (
<Table.Row>
<Table.Cell>
<Header textAlign='center'>Windows / Probe</Header>
</Table.Cell>
<Table.Cell>
<List>
<List.Item>Host : 192.168.1.106</List.Item>
<List.Item>Service :
<List horizontal>
<List.Item>FTP</List.Item>
<List.Item>MySQL</List.Item>
<List.Item>SMB</List.Item>
</List>
</List.Item>
<List.Item>Sensors(2) :
<List horizontal>
<List.Item>
<Icon link name='square' />FTP
</List.Item>
<List.Item>
<Icon link name='square outline' />MySQL
</List.Item>
</List>
<Button.Group floated='right'>
<Button>Add Sensor</Button>
</Button.Group>
</List.Item>
</List>
</Table.Cell>
</Table.Row>
);
}
}