This commit is contained in:
crusader 2018-06-14 13:38:51 +09:00
parent 33a66ce300
commit 561d2b7180
7 changed files with 15 additions and 22 deletions

View File

@ -1,6 +1,5 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { Observable, Subject } from 'rxjs'; import { Observable, Subject } from 'rxjs';
import { catchError, exhaustMap, map, tap } from 'rxjs/operators';
import { RPCSubscriber } from '@loafer/ng-rpc'; import { RPCSubscriber } from '@loafer/ng-rpc';
import { LoggerService } from '@loafer/ng-logger'; import { LoggerService } from '@loafer/ng-logger';

View File

@ -18,14 +18,14 @@ export class InfraService {
return this.rpcService.call<Infra>('InfraService.regist', infra); return this.rpcService.call<Infra>('InfraService.regist', infra);
} }
public read(id: string): Observable<Infra> {
return this.rpcService.call<Infra>('InfraService.read', id);
}
public registDiscoverd(probeID: number, hosts: Host[], services: Service[]): Observable<Infra[]> { public registDiscoverd(probeID: number, hosts: Host[], services: Service[]): Observable<Infra[]> {
return this.rpcService.call<Infra[]>('InfraService.registDiscoverd', probeID, hosts, services); return this.rpcService.call<Infra[]>('InfraService.registDiscoverd', probeID, hosts, services);
} }
public read(id: string): Observable<Infra> {
return this.rpcService.call<Infra>('InfraService.read', id);
}
public readAllByProbeID(probeID: number, pageParams: PageParams): Observable<Page<Infra>> { public readAllByProbeID(probeID: number, pageParams: PageParams): Observable<Page<Infra>> {
return this.rpcService.call<Page<Infra>>('InfraService.readAllByProbeID', probeID, pageParams); return this.rpcService.call<Page<Infra>>('InfraService.readAllByProbeID', probeID, pageParams);
} }

View File

@ -40,7 +40,6 @@ export class MemberService {
} }
public sendEmailResetPassword(email: string): Observable<Member> { public sendEmailResetPassword(email: string): Observable<Member> {
// return this.rpcService.call<Member>('MemberService.sendEmailForPassword', email);
return this.restService.request<Member>('post', '/account/send_email_pw', { return this.restService.request<Member>('post', '/account/send_email_pw', {
body: { body: {
signinID: email, signinID: email,
@ -48,7 +47,6 @@ export class MemberService {
}); });
} }
public resetPassword(token: string, pw: string, confirmPw: string): Observable<Member> { public resetPassword(token: string, pw: string, confirmPw: string): Observable<Member> {
// return this.rpcService.call<Member>('MemberService.sendEmailForPassword', email);
return this.restService.request<Member>('post', '/account/reset_password', { return this.restService.request<Member>('post', '/account/reset_password', {
body: { body: {
token: token, token: token,

View File

@ -102,7 +102,7 @@ export class NoAuthProbeListComponent implements OnInit, OnDestroy {
icon: isAccept ? 'fa-check' : 'fa fa-trash', icon: isAccept ? 'fa-check' : 'fa fa-trash',
accept: () => { accept: () => {
if (isAccept) { if (isAccept) {
this.noAuthProbeService.acceptNoAuthProbe(selected.id) this.noAuthProbeService.acceptNoAuthProbe(selected.id, '')
.pipe( .pipe(
tap(() => { tap(() => {
this.pending$ = of(true); this.pending$ = of(true);

View File

@ -21,11 +21,11 @@ export class NoAuthProbeService {
return this.rpcService.call<NoAuthProbe[]>('NoAuthProbeService.readAllByDomainID', domainID); return this.rpcService.call<NoAuthProbe[]>('NoAuthProbeService.readAllByDomainID', domainID);
} }
public acceptNoAuthProbe(noAuthProbeID: number): Observable<NoAuthProbe[]> { public acceptNoAuthProbe(id: number, zoneCIDR: string): Observable<NoAuthProbe[]> {
return this.rpcService.call<NoAuthProbe[]>('NoAuthProbeService.acceptNoAuthProbe', noAuthProbeID); return this.rpcService.call<NoAuthProbe[]>('NoAuthProbeService.acceptNoAuthProbe', id, zoneCIDR);
} }
public denyNoauthProbe(noAuthProbeID: number): Observable<NoAuthProbe[]> { public denyNoauthProbe(id: number): Observable<NoAuthProbe[]> {
return this.rpcService.call<NoAuthProbe[]>('NoAuthProbeService.denyNoauthProbe', noAuthProbeID); return this.rpcService.call<NoAuthProbe[]>('NoAuthProbeService.denyNoauthProbe', id);
} }
} }

View File

@ -14,6 +14,10 @@ export class ProbeHostService {
} }
public read(id: number): Observable<ProbeHost> {
return this.rpcService.call<ProbeHost>('ProbeHostService.read', id);
}
public readByProbeID(probeID: number): Observable<Probe> { public readByProbeID(probeID: number): Observable<Probe> {
return this.rpcService.call<ProbeHost>('ProbeHostService.readByProbeID', probeID); return this.rpcService.call<ProbeHost>('ProbeHostService.readByProbeID', probeID);
} }
@ -22,8 +26,4 @@ export class ProbeHostService {
return this.rpcService.call<ProbeHost[]>('ProbeHostService.readAllByDomainID', domainID); return this.rpcService.call<ProbeHost[]>('ProbeHostService.readAllByDomainID', domainID);
} }
public read(id: number): Observable<ProbeHost> {
return this.rpcService.call<ProbeHost>('ProbeHostService.read', id);
}
} }

View File

@ -17,8 +17,8 @@ export class ProbeService {
} }
public readAllByDomain(domain: Domain): Observable<Probe[]> { public readAllByDomainID(domainID: number): Observable<Probe[]> {
return this.rpcService.call<Probe[]>('ProbeService.readAllByDomain', domain); return this.rpcService.call<Probe[]>('ProbeService.readAllByDomainID', domainID);
} }
public read(id: number): Observable<Probe> { public read(id: number): Observable<Probe> {
@ -33,8 +33,4 @@ export class ProbeService {
return this.rpcService.call<boolean>('ProbeService.remove', id); return this.rpcService.call<boolean>('ProbeService.remove', id);
} }
public modifyDisplayName(id: number, displayName: string): Observable<Probe> {
return this.rpcService.call<Probe>('ProbeService.modifyDisplayName', id, displayName);
}
} }