From 196944a6973322ea6dadc90d0d548165c767a6fc Mon Sep 17 00:00:00 2001 From: snoop Date: Tue, 26 Dec 2017 19:00:24 +0900 Subject: [PATCH] added sensor config --- .../infra/react/components/infra_map.tsx | 2 + .../sensor/react/components/sensor_config.tsx | 47 +++++++++++++ .../components/sensor_config_auth_crawler.tsx | 37 +++++++++++ .../components/sensor_config_crawler.tsx | 66 +++++++++++++++++++ .../react/components/sensor_config_target.tsx | 61 +++++++++++++++++ 5 files changed, 213 insertions(+) create mode 100644 src/ts/@overflow/sensor/react/components/sensor_config.tsx create mode 100644 src/ts/@overflow/sensor/react/components/sensor_config_auth_crawler.tsx create mode 100644 src/ts/@overflow/sensor/react/components/sensor_config_crawler.tsx create mode 100644 src/ts/@overflow/sensor/react/components/sensor_config_target.tsx diff --git a/src/ts/@overflow/infra/react/components/infra_map.tsx b/src/ts/@overflow/infra/react/components/infra_map.tsx index aae5a3a..f1c2b5d 100644 --- a/src/ts/@overflow/infra/react/components/infra_map.tsx +++ b/src/ts/@overflow/infra/react/components/infra_map.tsx @@ -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 { private panes: any = [ + { menuItem: 'sc Test', render: () => }, { menuItem: 'Zone', render: () => }, { menuItem: 'Host', render: () => }, ]; diff --git a/src/ts/@overflow/sensor/react/components/sensor_config.tsx b/src/ts/@overflow/sensor/react/components/sensor_config.tsx new file mode 100644 index 0000000..0b0e7fa --- /dev/null +++ b/src/ts/@overflow/sensor/react/components/sensor_config.tsx @@ -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 { + + constructor(props: Props, context: State) { + super(props, context); + + this.state = { + selected: null, + }; + } + + + public render(): JSX.Element { + return ( + + Target Select + + Crawler Select + + Auth Crawler + + {/* */} + {/* */} + + ); + } + +} diff --git a/src/ts/@overflow/sensor/react/components/sensor_config_auth_crawler.tsx b/src/ts/@overflow/sensor/react/components/sensor_config_auth_crawler.tsx new file mode 100644 index 0000000..077f696 --- /dev/null +++ b/src/ts/@overflow/sensor/react/components/sensor_config_auth_crawler.tsx @@ -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 { + + constructor(props: Props, context: State) { + super(props, context); + + this.state = { + }; + } + + + public render(): JSX.Element { + return ( + + + ); + } + +} diff --git a/src/ts/@overflow/sensor/react/components/sensor_config_crawler.tsx b/src/ts/@overflow/sensor/react/components/sensor_config_crawler.tsx new file mode 100644 index 0000000..3bee240 --- /dev/null +++ b/src/ts/@overflow/sensor/react/components/sensor_config_crawler.tsx @@ -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 { + + constructor(props: Props, context: State) { + super(props, context); + + this.state = { + selectedValue: null, + }; + } + + public handleChange = (event: React.FormEvent, data: CheckboxProps) => { + this.setState({ selectedValue: data.value }); + } + + + public render(): JSX.Element { + return ( + +
+ + Selected Crawler : {this.state.selectedValue} + + + + + + + +
+
+ ); + } + +} diff --git a/src/ts/@overflow/sensor/react/components/sensor_config_target.tsx b/src/ts/@overflow/sensor/react/components/sensor_config_target.tsx new file mode 100644 index 0000000..a14c36b --- /dev/null +++ b/src/ts/@overflow/sensor/react/components/sensor_config_target.tsx @@ -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 { + + constructor(props: Props, context: State) { + super(props, context); + + this.state = { + selected: null, + }; + } + + + public render(): JSX.Element { + return ( + + + + + + + Host + + + + + + + + + + + + + + + + + + ); + } + +}