diff --git a/src/ts/@overflow/infra/react/components/infra_map.tsx b/src/ts/@overflow/infra/react/components/infra_map.tsx index f1c2b5d..95c289f 100644 --- a/src/ts/@overflow/infra/react/components/infra_map.tsx +++ b/src/ts/@overflow/infra/react/components/infra_map.tsx @@ -6,6 +6,7 @@ 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'; +import {SensorConfigSetting} from '@overflow/sensor/react/components/sensor_config_setting'; export interface StateProps { } @@ -21,6 +22,7 @@ export interface State { export class InfraMap extends React.Component { private panes: any = [ + { menuItem: 'sc Test2', render: () => }, { 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 index 219a734..fc0db5b 100644 --- a/src/ts/@overflow/sensor/react/components/sensor_config.tsx +++ b/src/ts/@overflow/sensor/react/components/sensor_config.tsx @@ -7,7 +7,8 @@ import { SensorConfigTarget } from './sensor_config_target'; import { SensorConfigCrawler } from './sensor_config_crawler'; import { SensorConfigAuthCrawler } from './sensor_config_auth_crawler'; import { SensorConfigItem } from './sensor_config_item'; -import { SensorConfigSetting } from './sensor_config_setting'; + + export interface StateProps { } @@ -56,11 +57,6 @@ export class SensorConfig extends React.Component { - Sensor Setting - - - - ); } diff --git a/src/ts/@overflow/sensor/react/components/sensor_config_popup.tsx b/src/ts/@overflow/sensor/react/components/sensor_config_popup.tsx index a8d14e9..a7f4b3e 100644 --- a/src/ts/@overflow/sensor/react/components/sensor_config_popup.tsx +++ b/src/ts/@overflow/sensor/react/components/sensor_config_popup.tsx @@ -3,7 +3,8 @@ import { Table, Header, Container, Form, Checkbox, Button, Rating, List, Icon, Grid, Modal, } from 'semantic-ui-react'; -import {SensorConfig} from './sensor_config'; +import { SensorConfig } from './sensor_config'; +import { SensorConfigSetting } from './sensor_config_setting'; export interface StateProps { open?: boolean; @@ -17,6 +18,7 @@ export type Props = StateProps & DispatchProps; export interface State { startPopup: boolean; + step: number; } export class SensorConfigPopup extends React.Component { @@ -26,6 +28,7 @@ export class SensorConfigPopup extends React.Component { this.state = { startPopup: false, + step: 1, }; } @@ -36,7 +39,12 @@ export class SensorConfigPopup extends React.Component { // public handleCancel = () => this.setState({ startPopup: false }); public handleSubmit(): void { - this.setState({ startPopup: false }); + this.setState({ startPopup: false, step: 1 }); + this.props.closeCallback(); + } + + public handleNext(): void { + this.setState({ step: 2 }); } public render(): JSX.Element { @@ -46,25 +54,32 @@ export class SensorConfigPopup extends React.Component { > -
Discovery Details
+
Sensor Config

Discovery - + {this.state.step === 1 ? + + : + + } + - - + + {this.state.step === 1 ? + + : + + }
- - {/* */} ); diff --git a/src/ts/@overflow/sensor/react/components/sensor_config_setting.tsx b/src/ts/@overflow/sensor/react/components/sensor_config_setting.tsx index 74387cf..84ebb34 100644 --- a/src/ts/@overflow/sensor/react/components/sensor_config_setting.tsx +++ b/src/ts/@overflow/sensor/react/components/sensor_config_setting.tsx @@ -2,8 +2,9 @@ import * as React from 'react'; import { Table, Header, Container, Form, Checkbox, Button, Rating, List, Icon, Radio, CheckboxProps, InputOnChangeData, Input, + Grid, } from 'semantic-ui-react'; - +import {Infra} from '@overflow/infra/api/model/Infra'; @@ -32,8 +33,27 @@ export class SensorConfigSetting extends React.Component { public render(): JSX.Element { return ( - Interval select + + + + Interval select + + + Target Info + + + + + + Sensor Item Info + + + + + + + ); } @@ -73,10 +93,10 @@ export class SensorConfigSettingNameInterval extends React.Component - , data: InputOnChangeData) => { - {/* this.onChangeAuth(item.name, data.value); */ } - }} /> + , data: InputOnChangeData) => { + {/* this.onChangeAuth(item.name, data.value); */ } + }} />
; } export class SensorConfigSettingTargetInfo extends React.Component { @@ -131,6 +151,57 @@ export class SensorConfigSettingTargetInfo extends React.Component = this.state.testInfraList; + + if(infraList === undefined || infraList.length <= 0) { + return null; + } + + let elems: Array = new Array(); + + + infraList.map((infra: Infra, idx: number) => { + console.log(''); + }); + + return elems; + } + + public render(): JSX.Element { + return ( + + {this.renderInfra()} + + ); + } + +} + + +export interface TargetInfoHostStateProps { +} + +export interface TargetInfoHostDispatchProps { +} + +export type TargetInfoHostProps = TargetInfoHostStateProps & TargetInfoHostDispatchProps; + +export interface TargetInfoHostState { + +} + +export class SensorConfigSettingTargetInfoHost extends React.Component { + + constructor(props: TargetInfoHostProps, context: TargetInfoHostState) { + super(props, context); + this.state = { }; @@ -178,3 +249,579 @@ export class SensorConfigSettingSensorItemInfo extends React.Component