From 254a786c4725e5239ae71269812099b62a97d398 Mon Sep 17 00:00:00 2001 From: snoop Date: Fri, 29 Sep 2017 14:59:59 +0900 Subject: [PATCH] added start discovery --- src/ts/@overflow/discovery/api/model/DiscoveryStartInfo.ts | 2 +- src/ts/@overflow/discovery/react/DiscoveryTable.tsx | 6 +++--- src/ts/@overflow/discovery/react/components/Discovery.tsx | 2 +- .../@overflow/discovery/react/components/DiscoveryTable.tsx | 3 ++- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/ts/@overflow/discovery/api/model/DiscoveryStartInfo.ts b/src/ts/@overflow/discovery/api/model/DiscoveryStartInfo.ts index 8bc3085..5284cd6 100644 --- a/src/ts/@overflow/discovery/api/model/DiscoveryStartInfo.ts +++ b/src/ts/@overflow/discovery/api/model/DiscoveryStartInfo.ts @@ -5,7 +5,7 @@ interface DiscoveryStartInfo { excludeIp: string; startPort: string; endPort: string; - services: Array; + services: Array; } export default DiscoveryStartInfo; diff --git a/src/ts/@overflow/discovery/react/DiscoveryTable.tsx b/src/ts/@overflow/discovery/react/DiscoveryTable.tsx index 4dcb2ce..c22b67d 100644 --- a/src/ts/@overflow/discovery/react/DiscoveryTable.tsx +++ b/src/ts/@overflow/discovery/react/DiscoveryTable.tsx @@ -11,15 +11,15 @@ import * as StartActionTypes from '../redux/action/start'; export function mapStateToProps(state: any, props: any): DiscoveryTableStateProps { return { - onProbeChange: props.onProbeChange, + // onProbeChange: props.onProbeChange, }; } export function mapDispatchToProps(dispatch: Dispatch): DiscoveryTableDispatchProps { return { - onProbeChange : (state: DiscoveryStartInfo) => { + onDiscoveryStart : (dsi: DiscoveryStartInfo) => { dispatch(asyncRequestActions.request('DiscoveryService', 'startDiscovery', - StartActionTypes.REQUEST, JSON.stringify(state))); + StartActionTypes.REQUEST, JSON.stringify(dsi))); }, }; } diff --git a/src/ts/@overflow/discovery/react/components/Discovery.tsx b/src/ts/@overflow/discovery/react/components/Discovery.tsx index 0ff024f..fa78816 100644 --- a/src/ts/@overflow/discovery/react/components/Discovery.tsx +++ b/src/ts/@overflow/discovery/react/components/Discovery.tsx @@ -106,7 +106,7 @@ export class Discovery extends React.Component { - + {/* */} diff --git a/src/ts/@overflow/discovery/react/components/DiscoveryTable.tsx b/src/ts/@overflow/discovery/react/components/DiscoveryTable.tsx index 1fffdc4..0df89aa 100644 --- a/src/ts/@overflow/discovery/react/components/DiscoveryTable.tsx +++ b/src/ts/@overflow/discovery/react/components/DiscoveryTable.tsx @@ -16,10 +16,11 @@ import * as _ from 'lodash'; import DiscoveryStartInfo from '../../api/model/DiscoveryStartInfo'; export interface StateProps { + onProbeChange?(state: DiscoveryStartInfo): void; } export interface DispatchProps { - onProbeChange?(state: DiscoveryStartInfo): void; + onDiscoveryStart?(state: DiscoveryStartInfo): void; } export type Props = StateProps & DispatchProps;