added start discovery

This commit is contained in:
snoop 2017-09-29 14:59:59 +09:00
parent 3f061ba3df
commit 254a786c47
4 changed files with 7 additions and 6 deletions

View File

@ -5,7 +5,7 @@ interface DiscoveryStartInfo {
excludeIp: string;
startPort: string;
endPort: string;
services: Array<number | string>;
services: Array<string>;
}
export default DiscoveryStartInfo;

View File

@ -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<any>): DiscoveryTableDispatchProps {
return {
onProbeChange : (state: DiscoveryStartInfo) => {
onDiscoveryStart : (dsi: DiscoveryStartInfo) => {
dispatch(asyncRequestActions.request('DiscoveryService', 'startDiscovery',
StartActionTypes.REQUEST, JSON.stringify(state)));
StartActionTypes.REQUEST, JSON.stringify(dsi)));
},
};
}

View File

@ -106,7 +106,7 @@ export class Discovery extends React.Component<Props, State> {
</Modal.Content>
<Modal.Actions>
<Button onClick={() => this.props.onClosePopup(false)}>Cancel</Button>
<Button primary >Done</Button>
{/* <Button primary >Done</Button> */}
</Modal.Actions>
</Modal>

View File

@ -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;