noauthProbe

This commit is contained in:
geek 2017-08-11 16:51:19 +09:00
parent 3fc7439a60
commit 1de2073605
2 changed files with 12 additions and 4 deletions

View File

@ -7,6 +7,7 @@ import {
import Domain from '@overflow/domain/api/model/Domain'; import Domain from '@overflow/domain/api/model/Domain';
import * as asyncRequestActions from '@overflow/commons/redux/action/asyncRequest'; import * as asyncRequestActions from '@overflow/commons/redux/action/asyncRequest';
import * as noauthListActions from '../redux/action/read_all_by_domain'; import * as noauthListActions from '../redux/action/read_all_by_domain';
import NoAuthProbe from '@overflow/noauthprobe/api/model/NoAuthProbe';
export function mapStateToProps(state: any): NoAuthProbeListStateProps { export function mapStateToProps(state: any): NoAuthProbeListStateProps {
return { return {
@ -19,6 +20,12 @@ export function mapDispatchToProps(dispatch: Dispatch<any>): NoAuthProbeListDisp
onReadAllByDomain: (domain: Domain) => { onReadAllByDomain: (domain: Domain) => {
dispatch(asyncRequestActions.request('NoAuthProbeService', 'readAllByDomain', noauthListActions.REQUEST, JSON.stringify(domain))); dispatch(asyncRequestActions.request('NoAuthProbeService', 'readAllByDomain', noauthListActions.REQUEST, JSON.stringify(domain)));
}, },
registNoAuthProbe: (noauthProbe: NoAuthProbe[]) => {
// dispatch(
// asyncRequestActions.request(
// 'NoAuthProbeService', 'registForNoAuthProbes', noauthListActions.REQUEST, JSON.stringify(noauthProbe))
// );
},
}; };
} }

View File

@ -16,6 +16,7 @@ export interface StateProps {
export interface DispatchProps { export interface DispatchProps {
onReadAllByDomain?(domain: Domain):void; onReadAllByDomain?(domain: Domain):void;
registNoAuthProbe?(noauthProbe: NoAuthProbe[]):void;
} }
export type Props = StateProps & DispatchProps; export type Props = StateProps & DispatchProps;
@ -65,14 +66,14 @@ export class NoauthProbeList extends React.Component<Props, State> {
} }
public checkExist(probe: NoAuthProbe): boolean { public checkExist(probe: NoAuthProbe): boolean {
// if (this.state.selected.indexOf(id) === -1) { if (this.state.selected.indexOf(probe) === -1) {
// return false; return false;
// } }
return true; return true;
} }
public handleAccept(): void { public handleAccept(): void {
alert(this.state.selected); this.props.registNoAuthProbe(this.state.selected);
} }
public handleDeny(): void { public handleDeny(): void {