added sensor config

This commit is contained in:
snoop 2017-12-26 19:00:24 +09:00
parent f51c0676b5
commit 196944a697
5 changed files with 213 additions and 0 deletions

View File

@ -5,6 +5,7 @@ Tab,
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 {
}
@ -20,6 +21,7 @@ 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> },
];

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>
);
}
}