diff --git a/src/ts/@overflow/discovery/api/service/DiscoveryService.ts b/src/ts/@overflow/discovery/api/service/DiscoveryService.ts index 9bb18cc..1f65ff8 100644 --- a/src/ts/@overflow/discovery/api/service/DiscoveryService.ts +++ b/src/ts/@overflow/discovery/api/service/DiscoveryService.ts @@ -17,6 +17,10 @@ export class DiscoveryService extends Service { // state change test } + public discoveryIngTest(params: any): void { + console.log(params); + } + public discoveryIngHost(params: any): void { let host: Host = params; diff --git a/src/ts/@overflow/discovery/react/Discovery.tsx b/src/ts/@overflow/discovery/react/Discovery.tsx index 176eb66..ffbb9d6 100644 --- a/src/ts/@overflow/discovery/react/Discovery.tsx +++ b/src/ts/@overflow/discovery/react/Discovery.tsx @@ -26,6 +26,10 @@ export function mapDispatchToProps(dispatch: Dispatch): DiscoveryDispatchPr dispatch(asyncRequestActions.request('TargetDiscoveryService', 'saveAllTarget', InfraTargetRegistAllActionTypes.REQUEST, JSON.stringify(hosts), JSON.stringify(probe))); }, + onTestDiscovery: (types: string, obj: string) => { + dispatch(asyncRequestActions.request('DiscoveryService', 'testDiscovery', + 'DiscoveryTTTTTEEEESSSTTT', types, obj)); + }, }; } diff --git a/src/ts/@overflow/discovery/react/components/Discovery.tsx b/src/ts/@overflow/discovery/react/components/Discovery.tsx index fa78816..289e21c 100644 --- a/src/ts/@overflow/discovery/react/components/Discovery.tsx +++ b/src/ts/@overflow/discovery/react/components/Discovery.tsx @@ -23,6 +23,7 @@ export interface StateProps { export interface DispatchProps { onCreateTarget?(hosts: Host[], probe: Probe): void; + onTestDiscovery?(types: string, obj: string): void; } export type Props = StateProps & DispatchProps; @@ -78,6 +79,10 @@ export class Discovery extends React.Component { public handleCancel = () => this.setState({ startPopup: false }); + public handleTest = () => { + this.props.onTestDiscovery('1', 'host json'); + } + public handlePopupClose = () => this.setState({ startPopup: false }); public render(): JSX.Element { @@ -98,6 +103,7 @@ export class Discovery extends React.Component { +