noauthProbe
This commit is contained in:
parent
3fc7439a60
commit
1de2073605
|
@ -7,6 +7,7 @@ import {
|
|||
import Domain from '@overflow/domain/api/model/Domain';
|
||||
import * as asyncRequestActions from '@overflow/commons/redux/action/asyncRequest';
|
||||
import * as noauthListActions from '../redux/action/read_all_by_domain';
|
||||
import NoAuthProbe from '@overflow/noauthprobe/api/model/NoAuthProbe';
|
||||
|
||||
export function mapStateToProps(state: any): NoAuthProbeListStateProps {
|
||||
return {
|
||||
|
@ -19,6 +20,12 @@ export function mapDispatchToProps(dispatch: Dispatch<any>): NoAuthProbeListDisp
|
|||
onReadAllByDomain: (domain: Domain) => {
|
||||
dispatch(asyncRequestActions.request('NoAuthProbeService', 'readAllByDomain', noauthListActions.REQUEST, JSON.stringify(domain)));
|
||||
},
|
||||
registNoAuthProbe: (noauthProbe: NoAuthProbe[]) => {
|
||||
// dispatch(
|
||||
// asyncRequestActions.request(
|
||||
// 'NoAuthProbeService', 'registForNoAuthProbes', noauthListActions.REQUEST, JSON.stringify(noauthProbe))
|
||||
// );
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ export interface StateProps {
|
|||
|
||||
export interface DispatchProps {
|
||||
onReadAllByDomain?(domain: Domain):void;
|
||||
registNoAuthProbe?(noauthProbe: NoAuthProbe[]):void;
|
||||
}
|
||||
|
||||
export type Props = StateProps & DispatchProps;
|
||||
|
@ -65,14 +66,14 @@ export class NoauthProbeList extends React.Component<Props, State> {
|
|||
}
|
||||
|
||||
public checkExist(probe: NoAuthProbe): boolean {
|
||||
// if (this.state.selected.indexOf(id) === -1) {
|
||||
// return false;
|
||||
// }
|
||||
if (this.state.selected.indexOf(probe) === -1) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public handleAccept(): void {
|
||||
alert(this.state.selected);
|
||||
this.props.registNoAuthProbe(this.state.selected);
|
||||
}
|
||||
|
||||
public handleDeny(): void {
|
||||
|
|
Loading…
Reference in New Issue
Block a user