noauthProbe
This commit is contained in:
parent
3fc7439a60
commit
1de2073605
|
@ -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))
|
||||||
|
// );
|
||||||
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user