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 { Observable, Subject } from 'rxjs';
import { catchError, exhaustMap, map, tap } from 'rxjs/operators';
import { RPCSubscriber } from '@loafer/ng-rpc';
import { LoggerService } from '@loafer/ng-logger';

View File

@ -18,14 +18,14 @@ export class InfraService {
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[]> {
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>> {
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> {
// return this.rpcService.call<Member>('MemberService.sendEmailForPassword', email);
return this.restService.request<Member>('post', '/account/send_email_pw', {
body: {
signinID: email,
@ -48,7 +47,6 @@ export class MemberService {
});
}
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', {
body: {
token: token,

View File

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

View File

@ -21,11 +21,11 @@ export class NoAuthProbeService {
return this.rpcService.call<NoAuthProbe[]>('NoAuthProbeService.readAllByDomainID', domainID);
}
public acceptNoAuthProbe(noAuthProbeID: number): Observable<NoAuthProbe[]> {
return this.rpcService.call<NoAuthProbe[]>('NoAuthProbeService.acceptNoAuthProbe', noAuthProbeID);
public acceptNoAuthProbe(id: number, zoneCIDR: string): Observable<NoAuthProbe[]> {
return this.rpcService.call<NoAuthProbe[]>('NoAuthProbeService.acceptNoAuthProbe', id, zoneCIDR);
}
public denyNoauthProbe(noAuthProbeID: number): Observable<NoAuthProbe[]> {
return this.rpcService.call<NoAuthProbe[]>('NoAuthProbeService.denyNoauthProbe', noAuthProbeID);
public denyNoauthProbe(id: number): Observable<NoAuthProbe[]> {
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> {
return this.rpcService.call<ProbeHost>('ProbeHostService.readByProbeID', probeID);
}
@ -22,8 +26,4 @@ export class ProbeHostService {
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[]> {
return this.rpcService.call<Probe[]>('ProbeService.readAllByDomain', domain);
public readAllByDomainID(domainID: number): Observable<Probe[]> {
return this.rpcService.call<Probe[]>('ProbeService.readAllByDomainID', domainID);
}
public read(id: number): Observable<Probe> {
@ -33,8 +33,4 @@ export class ProbeService {
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);
}
}