Merge remote-tracking branch 'origin/master'

This commit is contained in:
geek 2017-12-27 17:10:26 +09:00
commit 146d97d286
11 changed files with 482 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,51 @@
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';
import { SensorConfig} from '@overflow/sensor/react/components/sensor_config';
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: 'sc Test', render: () => <Tab.Pane attached={false}><SensorConfig /></Tab.Pane> },
{ 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>
);
}
}

View File

@ -0,0 +1,47 @@
import * as React from 'react';
import {
Table, Header, Container, Form, Checkbox, Button, Rating,
List, Icon,
} from 'semantic-ui-react';
import {SensorConfigTarget} from './sensor_config_target';
import {SensorConfigCrawler} from './sensor_config_crawler';
import {SensorConfigAuthCrawler} from './sensor_config_auth_crawler';
export interface StateProps {
}
export interface DispatchProps {
}
export type Props = StateProps & DispatchProps;
export interface State {
}
export class SensorConfig extends React.Component<Props, State> {
constructor(props: Props, context: State) {
super(props, context);
this.state = {
selected: null,
};
}
public render(): JSX.Element {
return (
<Container>
Target Select
<SensorConfigTarget />
Crawler Select
<SensorConfigCrawler />
Auth Crawler
<SensorConfigAuthCrawler />
{/* <SensorConfigItem /> */}
{/* <SensorConfigSetting /> */}
</Container>
);
}
}

View File

@ -0,0 +1,37 @@
import * as React from 'react';
import {
Table, Header, Container, Form, Checkbox, Button, Rating,
List, Icon, Radio, CheckboxProps,
} from 'semantic-ui-react';
export interface StateProps {
}
export interface DispatchProps {
}
export type Props = StateProps & DispatchProps;
export interface State {
}
export class SensorConfigAuthCrawler extends React.Component<Props, State> {
constructor(props: Props, context: State) {
super(props, context);
this.state = {
};
}
public render(): JSX.Element {
return (
<Container>
</Container>
);
}
}

View File

@ -0,0 +1,66 @@
import * as React from 'react';
import {
Table, Header, Container, Form, Checkbox, Button, Rating,
List, Icon, Radio, CheckboxProps,
} from 'semantic-ui-react';
export interface StateProps {
}
export interface DispatchProps {
}
export type Props = StateProps & DispatchProps;
export interface State {
selectedValue: number|string;
}
export class SensorConfigCrawler extends React.Component<Props, State> {
constructor(props: Props, context: State) {
super(props, context);
this.state = {
selectedValue: null,
};
}
public handleChange = (event: React.FormEvent<HTMLInputElement>, data: CheckboxProps) => {
this.setState({ selectedValue: data.value });
}
public render(): JSX.Element {
return (
<Container>
<Form>
<Form.Field>
Selected Crawler : <b>{this.state.selectedValue}</b>
</Form.Field>
<Form.Field>
<Radio
label='SSH Crawler'
name='radioGroup'
value='SSH Crawler'
checked={this.state.selectedValue === 'SSH Crawler'}
onChange={this.handleChange}
/>
</Form.Field>
<Form.Field>
<Radio
label='WMI Crawler'
name='radioGroup'
value='WMI Crawler'
checked={this.state.selectedValue === 'WMI Crawler'}
onChange={this.handleChange}
/>
</Form.Field>
</Form>
</Container>
);
}
}

View File

@ -0,0 +1,61 @@
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';
export interface StateProps {
}
export interface DispatchProps {
}
export type Props = StateProps & DispatchProps;
export interface State {
}
export class SensorConfigTarget extends React.Component<Props, State> {
constructor(props: Props, context: State) {
super(props, context);
this.state = {
selected: null,
};
}
public render(): JSX.Element {
return (
<Container>
<List>
<List.Item >
<List.Icon name={true ? 'chevron up' : 'chevron down'}
onClick={null} />
<List.Content>
<List.Header>
Host
</List.Header>
<List.Description style={{ marginLeft: '26px' }}></List.Description>
<List.List onClick={null}>
<List.Item >
<List.Content>
<List.Header>
<Checkbox label={'192.168.1.1 | Linux'} checked={false} onChange={null} />
</List.Header>
<List.Description style={{ marginLeft: '26px' }}>
</List.Description>
</List.Content>
</List.Item>
</List.List>
</List.Content>
</List.Item>
</List>
</Container>
);
}
}