added start discovery
This commit is contained in:
parent
3f061ba3df
commit
254a786c47
|
@ -5,7 +5,7 @@ interface DiscoveryStartInfo {
|
||||||
excludeIp: string;
|
excludeIp: string;
|
||||||
startPort: string;
|
startPort: string;
|
||||||
endPort: string;
|
endPort: string;
|
||||||
services: Array<number | string>;
|
services: Array<string>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default DiscoveryStartInfo;
|
export default DiscoveryStartInfo;
|
||||||
|
|
|
@ -11,15 +11,15 @@ import * as StartActionTypes from '../redux/action/start';
|
||||||
|
|
||||||
export function mapStateToProps(state: any, props: any): DiscoveryTableStateProps {
|
export function mapStateToProps(state: any, props: any): DiscoveryTableStateProps {
|
||||||
return {
|
return {
|
||||||
onProbeChange: props.onProbeChange,
|
// onProbeChange: props.onProbeChange,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export function mapDispatchToProps(dispatch: Dispatch<any>): DiscoveryTableDispatchProps {
|
export function mapDispatchToProps(dispatch: Dispatch<any>): DiscoveryTableDispatchProps {
|
||||||
return {
|
return {
|
||||||
onProbeChange : (state: DiscoveryStartInfo) => {
|
onDiscoveryStart : (dsi: DiscoveryStartInfo) => {
|
||||||
dispatch(asyncRequestActions.request('DiscoveryService', 'startDiscovery',
|
dispatch(asyncRequestActions.request('DiscoveryService', 'startDiscovery',
|
||||||
StartActionTypes.REQUEST, JSON.stringify(state)));
|
StartActionTypes.REQUEST, JSON.stringify(dsi)));
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,7 +106,7 @@ export class Discovery extends React.Component<Props, State> {
|
||||||
</Modal.Content>
|
</Modal.Content>
|
||||||
<Modal.Actions>
|
<Modal.Actions>
|
||||||
<Button onClick={() => this.props.onClosePopup(false)}>Cancel</Button>
|
<Button onClick={() => this.props.onClosePopup(false)}>Cancel</Button>
|
||||||
<Button primary >Done</Button>
|
{/* <Button primary >Done</Button> */}
|
||||||
</Modal.Actions>
|
</Modal.Actions>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|
||||||
|
|
|
@ -16,10 +16,11 @@ import * as _ from 'lodash';
|
||||||
import DiscoveryStartInfo from '../../api/model/DiscoveryStartInfo';
|
import DiscoveryStartInfo from '../../api/model/DiscoveryStartInfo';
|
||||||
|
|
||||||
export interface StateProps {
|
export interface StateProps {
|
||||||
|
onProbeChange?(state: DiscoveryStartInfo): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface DispatchProps {
|
export interface DispatchProps {
|
||||||
onProbeChange?(state: DiscoveryStartInfo): void;
|
onDiscoveryStart?(state: DiscoveryStartInfo): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type Props = StateProps & DispatchProps;
|
export type Props = StateProps & DispatchProps;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user