This commit is contained in:
crusader 2018-06-04 17:55:47 +09:00
parent ffcee6564e
commit 9990650925
34 changed files with 127 additions and 103 deletions

View File

@ -1,13 +1,17 @@
import { import {
Component, Input, Output, EventEmitter, OnDestroy, ViewChild, Component, Input, Output, EventEmitter, OnDestroy, ViewChild,
} from '@angular/core'; } from '@angular/core';
import { Probe, ProbeHost } from '@overflow/commons-typescript/model/probe';
import { Anim } from './animation';
import { Store, select } from '@ngrx/store'; import { Store, select } from '@ngrx/store';
import { Observable, of, Subscription } from 'rxjs'; import { Observable, of, Subscription } from 'rxjs';
import { DiscoveryService } from '../service/discovery.service'; import { catchError, exhaustMap, map, tap, take } from 'rxjs/operators';
import { catchError, exhaustMap, map, tap } from 'rxjs/operators';
import { Probe, ProbeHost } from '@overflow/commons-typescript/model/probe';
import { DiscoverZone, Zone, Host, Port, Service } from '@overflow/commons-typescript/model/discovery'; import { DiscoverZone, Zone, Host, Port, Service } from '@overflow/commons-typescript/model/discovery';
import { Anim } from './animation';
import { DiscoveryService } from '../service/discovery.service';
import { DiscoverySubscriber, DiscoveryNotify } from '../subscriber/discovery.subscriber'; import { DiscoverySubscriber, DiscoveryNotify } from '../subscriber/discovery.subscriber';
import { SearchResultComponent } from './search-result.component'; import { SearchResultComponent } from './search-result.component';
import { SearchFilterComponent } from './search-filter.component'; import { SearchFilterComponent } from './search-filter.component';

View File

@ -5,13 +5,17 @@ import {
SimpleChanges, SimpleChanges,
OnInit, OnInit,
} from '@angular/core'; } from '@angular/core';
import { Anim } from './animation';
import { TreeNode } from 'primeng/primeng';
import { DiscoveryNotify } from '../subscriber/discovery.subscriber';
import { DiscoverZone, Zone, Host, Port, Service } from '@overflow/commons-typescript/model/discovery';
import { Subscription } from 'rxjs'; import { Subscription } from 'rxjs';
import { DiscoverZone, Zone, Host, Port, Service } from '@overflow/commons-typescript/model/discovery';
import { TreeNode } from 'primeng/primeng';
import { ProbeHost } from '@overflow/commons-typescript/model/probe'; import { ProbeHost } from '@overflow/commons-typescript/model/probe';
import { Anim } from './animation';
import { DiscoveryNotify } from '../subscriber/discovery.subscriber';
@Component({ @Component({
selector: 'of-discovery-result', selector: 'of-discovery-result',
templateUrl: './search-result.component.html', templateUrl: './search-result.component.html',

View File

@ -9,7 +9,7 @@ import {
} from '@angular/core'; } from '@angular/core';
import { Store, select, StateObservable } from '@ngrx/store'; import { Store, select, StateObservable } from '@ngrx/store';
import { Observable, of } from 'rxjs'; import { Observable, of } from 'rxjs';
import { catchError, exhaustMap, map, tap } from 'rxjs/operators'; import { catchError, exhaustMap, map, tap, take } from 'rxjs/operators';
import { RPCClientError } from '@loafer/ng-rpc'; import { RPCClientError } from '@loafer/ng-rpc';
import { MetaCrawler } from '@overflow/commons-typescript/model/meta'; import { MetaCrawler } from '@overflow/commons-typescript/model/meta';
@ -55,7 +55,8 @@ export class ServiceSelectorComponent implements OnInit, AfterContentInit, OnDes
this.includeServices = this.metaCrawlers.slice(); this.includeServices = this.metaCrawlers.slice();
this.change.emit(this.includeServices); this.change.emit(this.includeServices);
}), }),
).take(1).subscribe(); take(1),
).subscribe();
} }
ngOnDestroy() { ngOnDestroy() {

View File

@ -1,7 +1,7 @@
import { Component, Input, Output, EventEmitter, OnInit } from '@angular/core'; import { Component, Input, Output, EventEmitter, OnInit } from '@angular/core';
import { Store, select } from '@ngrx/store'; import { Store, select } from '@ngrx/store';
import { Observable, of, Subscription } from 'rxjs'; import { Observable, of, Subscription } from 'rxjs';
import { catchError, exhaustMap, map, tap } from 'rxjs/operators'; import { catchError, exhaustMap, map, tap, take } from 'rxjs/operators';
import { AuthSelector } from '@overflow/shared/auth/store'; import { AuthSelector } from '@overflow/shared/auth/store';
import { DomainMember } from '@overflow/commons-typescript/model/domain'; import { DomainMember } from '@overflow/commons-typescript/model/domain';
@ -46,7 +46,8 @@ export class InfraHostComponent implements OnInit {
tap(() => { tap(() => {
this.pending$ = of(false); this.pending$ = of(false);
}), }),
).take(1).subscribe(); take(1),
).subscribe();
} else { } else {
// error // error
} }

View File

@ -1,8 +1,6 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import 'rxjs/add/operator/map';
import { RPCService } from '@loafer/ng-rpc'; import { RPCService } from '@loafer/ng-rpc';
import { Infra } from '@overflow/commons-typescript/model/infra'; import { Infra } from '@overflow/commons-typescript/model/infra';

View File

@ -1,7 +1,7 @@
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { Store, select } from '@ngrx/store'; import { Store, select } from '@ngrx/store';
import { Observable, of } from 'rxjs'; import { Observable, of } from 'rxjs';
import { catchError, exhaustMap, map, tap } from 'rxjs/operators'; import { catchError, exhaustMap, map, tap, take } from 'rxjs/operators';
import { FormBuilder } from '@angular/forms'; import { FormBuilder } from '@angular/forms';
import { EmailAuthService } from '../service/email-auth.service'; import { EmailAuthService } from '../service/email-auth.service';
import { EmailAuth } from '@overflow/commons-typescript/model/email/EmailAuth'; import { EmailAuth } from '@overflow/commons-typescript/model/email/EmailAuth';
@ -40,7 +40,8 @@ export class MemberConfirmResetPasswordComponent implements OnInit {
tap(() => { tap(() => {
this.pending$ = of(false); this.pending$ = of(false);
}), }),
).take(1).subscribe(); take(1),
).subscribe();
} }
onModifyPassword() { onModifyPassword() {

View File

@ -1,7 +1,7 @@
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { Store, select } from '@ngrx/store'; import { Store, select } from '@ngrx/store';
import { Observable, of } from 'rxjs'; import { Observable, of } from 'rxjs';
import { catchError, exhaustMap, map, tap } from 'rxjs/operators'; import { catchError, exhaustMap, map, tap, take } from 'rxjs/operators';
import { FormBuilder } from '@angular/forms'; import { FormBuilder } from '@angular/forms';
import { EmailAuthService } from '../service/email-auth.service'; import { EmailAuthService } from '../service/email-auth.service';
import { EmailAuth } from '@overflow/commons-typescript/model/email/EmailAuth'; import { EmailAuth } from '@overflow/commons-typescript/model/email/EmailAuth';
@ -39,7 +39,8 @@ export class MemberConfirmSignupComponent implements OnInit {
tap(() => { tap(() => {
this.pending$ = of(false); this.pending$ = of(false);
}), }),
).take(1).subscribe(); take(1),
).subscribe();
} }
onSignin() { onSignin() {

View File

@ -3,7 +3,7 @@ import { FormGroup, FormBuilder, Validators, FormControl, ValidationErrors, Abst
import { Member } from '@overflow/commons-typescript/model/member'; import { Member } from '@overflow/commons-typescript/model/member';
import { Store, select } from '@ngrx/store'; import { Store, select } from '@ngrx/store';
import { Observable, of } from 'rxjs'; import { Observable, of } from 'rxjs';
import { catchError, exhaustMap, map, tap } from 'rxjs/operators'; import { catchError, exhaustMap, map, tap, take } from 'rxjs/operators';
import { MemberService } from '../service/member.service'; import { MemberService } from '../service/member.service';
@ -95,7 +95,8 @@ export class MemberModifyPasswordComponent implements OnInit {
tap(() => { tap(() => {
this.pending$ = of(false); this.pending$ = of(false);
}), }),
).take(1).subscribe(); take(1),
).subscribe();
} }
onSignin() { onSignin() {

View File

@ -1,12 +1,16 @@
import { Component, OnInit, OnDestroy, Input, Output, EventEmitter } from '@angular/core'; import { Component, OnInit, OnDestroy, Input, Output, EventEmitter } from '@angular/core';
import { Member } from '@overflow/commons-typescript/model/member';
import { AbstractControl, FormBuilder, FormGroup, Validators} from '@angular/forms'; import { AbstractControl, FormBuilder, FormGroup, Validators} from '@angular/forms';
import { DomainMember } from '@overflow/commons-typescript/model/domain';
import { Observable, of } from 'rxjs';
import { Store } from '@ngrx/store'; import { Store } from '@ngrx/store';
import { Observable, of } from 'rxjs';
import { catchError, map, tap, take } from 'rxjs/operators';
import { Member } from '@overflow/commons-typescript/model/member';
import { DomainMember } from '@overflow/commons-typescript/model/domain';
import { AuthSelector } from '@overflow/shared/auth/store'; import { AuthSelector } from '@overflow/shared/auth/store';
import * as AuthStore from '@overflow/shared/auth/store/auth'; import * as AuthStore from '@overflow/shared/auth/store/auth';
import { catchError, map, tap } from 'rxjs/operators';
import { MemberService } from '../service/member.service'; import { MemberService } from '../service/member.service';
@Component({ @Component({
@ -98,7 +102,8 @@ export class MemberProfileComponent implements OnInit, OnDestroy {
tap(() => { tap(() => {
this.pending$ = of(false); this.pending$ = of(false);
}), }),
).take(1).subscribe(); take(1),
).subscribe();
} }
private checkProfile(formValue: any): boolean { private checkProfile(formValue: any): boolean {

View File

@ -12,7 +12,7 @@ import {
} from '@angular/forms'; } from '@angular/forms';
import { Store, select } from '@ngrx/store'; import { Store, select } from '@ngrx/store';
import { Observable, of } from 'rxjs'; import { Observable, of } from 'rxjs';
import { catchError, exhaustMap, map, tap } from 'rxjs/operators'; import { catchError, exhaustMap, map, tap, take } from 'rxjs/operators';
import { Member } from '@overflow/commons-typescript/model/member'; import { Member } from '@overflow/commons-typescript/model/member';
import { MemberService } from '../service/member.service'; import { MemberService } from '../service/member.service';
@ -71,7 +71,8 @@ export class MemberResetPasswordComponent implements OnInit {
tap(() => { tap(() => {
this.pending$ = of(false); this.pending$ = of(false);
}), }),
).take(1).subscribe(); take(1),
).subscribe();
} }
onSignin() { onSignin() {

View File

@ -2,7 +2,7 @@ import { Component, OnInit, Output, EventEmitter, Input } from '@angular/core';
import { FormGroup, FormBuilder, Validators, AbstractControl } from '@angular/forms'; import { FormGroup, FormBuilder, Validators, AbstractControl } from '@angular/forms';
import { Store, select } from '@ngrx/store'; import { Store, select } from '@ngrx/store';
import { Observable, of } from 'rxjs'; import { Observable, of } from 'rxjs';
import { catchError, exhaustMap, map, tap } from 'rxjs/operators'; import { catchError, exhaustMap, map, tap, take } from 'rxjs/operators';
import { MemberService } from '../service/member.service'; import { MemberService } from '../service/member.service';
import {DomainMember} from '@overflow/commons-typescript/model/domain'; import {DomainMember} from '@overflow/commons-typescript/model/domain';
import * as AuthStore from '../../shared/auth/store/auth'; import * as AuthStore from '../../shared/auth/store/auth';
@ -80,7 +80,8 @@ export class MemberSigninComponent implements OnInit {
tap(() => { tap(() => {
this.pending$ = of(false); this.pending$ = of(false);
}), }),
).take(1).subscribe(); take(1),
).subscribe();
} }
onResetPassword() { onResetPassword() {

View File

@ -9,7 +9,7 @@ import { FormGroup, FormBuilder, Validators, AbstractControl, FormControl, Valid
import { Member } from '@overflow/commons-typescript/model/member'; import { Member } from '@overflow/commons-typescript/model/member';
import { Store, select } from '@ngrx/store'; import { Store, select } from '@ngrx/store';
import { Observable, of } from 'rxjs'; import { Observable, of } from 'rxjs';
import { catchError, exhaustMap, map, tap } from 'rxjs/operators'; import { catchError, exhaustMap, map, tap, take } from 'rxjs/operators';
import { MemberService } from '../service/member.service'; import { MemberService } from '../service/member.service';
@Component({ @Component({
@ -146,7 +146,8 @@ export class MemberSignupComponent implements OnInit, OnDestroy {
tap(() => { tap(() => {
this.pending$ = of(false); this.pending$ = of(false);
}), }),
).take(1).subscribe(); take(1),
).subscribe();
} }
termsDisplayOpen() { termsDisplayOpen() {

View File

@ -1,11 +1,15 @@
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { Store } from '@ngrx/store';
import { Observable, of } from 'rxjs';
import { catchError, map, tap } from 'rxjs/operators';
import { DomainMember } from '@overflow/commons-typescript/model/domain'; import { DomainMember } from '@overflow/commons-typescript/model/domain';
import { Member } from '@overflow/commons-typescript/model/member'; import { Member } from '@overflow/commons-typescript/model/member';
import {AuthSelector} from '../../shared/auth/store';
import { Observable, of } from 'rxjs';
import { Store } from '@ngrx/store';
import * as AuthStore from '@overflow/shared/auth/store/auth'; import * as AuthStore from '@overflow/shared/auth/store/auth';
import { catchError, map, tap } from 'rxjs/operators';
import {AuthSelector} from '../../shared/auth/store';
@Component({ @Component({
selector: 'of-member-totp', selector: 'of-member-totp',

View File

@ -1,8 +1,6 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import 'rxjs/add/operator/map';
import { RESTService } from '@loafer/ng-rest'; import { RESTService } from '@loafer/ng-rest';
import { RPCService } from '@loafer/ng-rpc'; import { RPCService } from '@loafer/ng-rpc';
import { DomainMember } from '@overflow/commons-typescript/model/domain'; import { DomainMember } from '@overflow/commons-typescript/model/domain';

View File

@ -1,7 +1,7 @@
import { Component, Input, Output, EventEmitter, AfterContentInit, OnInit, OnDestroy } from '@angular/core'; import { Component, Input, Output, EventEmitter, AfterContentInit, OnInit, OnDestroy } from '@angular/core';
import { Store, select } from '@ngrx/store'; import { Store, select } from '@ngrx/store';
import { Observable, of, Subscription } from 'rxjs'; import { Observable, of, Subscription } from 'rxjs';
import { catchError, exhaustMap, map, tap } from 'rxjs/operators'; import { catchError, exhaustMap, map, tap, take } from 'rxjs/operators';
import { ConfirmationService, Message } from 'primeng/primeng'; import { ConfirmationService, Message } from 'primeng/primeng';
import { NoAuthProbe } from '@overflow/commons-typescript/model/noauth'; import { NoAuthProbe } from '@overflow/commons-typescript/model/noauth';
@ -53,7 +53,8 @@ export class NoAuthProbeListComponent implements OnInit, OnDestroy {
tap(() => { tap(() => {
this.pending$ = of(false); this.pending$ = of(false);
}), }),
).take(1).subscribe(); take(1),
).subscribe();
this.noauthProbeSubscription = this.noAuthProbeSubscriber.observable().pipe( this.noauthProbeSubscription = this.noAuthProbeSubscriber.observable().pipe(
tap((noAuthProbeNotify: NoAuthProbeNotify) => { tap((noAuthProbeNotify: NoAuthProbeNotify) => {
@ -104,7 +105,8 @@ export class NoAuthProbeListComponent implements OnInit, OnDestroy {
tap(() => { tap(() => {
this.pending$ = of(false); this.pending$ = of(false);
}), }),
).take(1).subscribe(); take(1),
).subscribe();
} else { } else {
this.noAuthProbeService.denyNoauthProbe(selected.id) this.noAuthProbeService.denyNoauthProbe(selected.id)
.pipe( .pipe(
@ -121,7 +123,8 @@ export class NoAuthProbeListComponent implements OnInit, OnDestroy {
tap(() => { tap(() => {
this.pending$ = of(false); this.pending$ = of(false);
}), }),
).take(1).subscribe(); take(1),
).subscribe();
} }
}, },
reject: () => { reject: () => {

View File

@ -1,8 +1,6 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import 'rxjs/add/operator/map';
import { RPCService } from '@loafer/ng-rpc'; import { RPCService } from '@loafer/ng-rpc';
import { Domain } from '@overflow/commons-typescript/model/domain'; import { Domain } from '@overflow/commons-typescript/model/domain';

View File

@ -1,8 +1,6 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import 'rxjs/add/operator/map';
import { RPCService } from '@loafer/ng-rpc'; import { RPCService } from '@loafer/ng-rpc';
import { Notification } from '@overflow/commons-typescript/model/notification'; import { Notification } from '@overflow/commons-typescript/model/notification';

View File

@ -4,15 +4,8 @@ import { Router } from '@angular/router';
import { Effect, Actions, ofType } from '@ngrx/effects'; import { Effect, Actions, ofType } from '@ngrx/effects';
import { Action } from '@ngrx/store'; import { Action } from '@ngrx/store';
import { Observable } from 'rxjs'; import { of } from 'rxjs';
import { of } from 'rxjs/observable/of'; import { catchError, exhaustMap, map, tap } from 'rxjs/operators';
import 'rxjs/add/operator/catch';
import 'rxjs/add/operator/do';
import 'rxjs/add/operator/exhaustMap';
import 'rxjs/add/operator/switchMap';
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/take';
import { RPCClientError } from '@loafer/ng-rpc'; import { RPCClientError } from '@loafer/ng-rpc';
@ -39,26 +32,35 @@ export class Effects {
) { } ) { }
@Effect() @Effect()
readAllByMember$: Observable<Action> = this.actions$ readAllByMember$ = this.actions$.pipe(
.ofType(ActionType.ReadAllByMember) ofType(ActionType.ReadAllByMember),
.map((action: ReadAllByMember) => action.payload) map((action: ReadAllByMember) => action.payload),
.switchMap(payload => this.notificationService.readAllByMember(payload.member, payload.pageParams)) exhaustMap(payload =>
.map(page => { this.notificationService
return new ReadAllByMemberSuccess(page); .readAllByMember(payload.member, payload.pageParams)
}) .pipe(
.catch((error: RPCClientError) => { map(page => {
return of(new ReadAllByMemberFailure(error)); return new ReadAllByMemberSuccess(page);
}); }),
catchError(error => of(new ReadAllByMemberFailure(error)))
)
)
);
@Effect() @Effect()
markAllAsRead$: Observable<Action> = this.actions$ markAllAsRead$ = this.actions$.pipe(
.ofType(ActionType.MarkAllAsRead) ofType(ActionType.MarkAllAsRead),
.map((action: MarkAllAsRead) => action.payload) map((action: MarkAllAsRead) => action.payload),
.switchMap(payload => this.notificationService.markAllAsRead(payload.member, payload.pageParams)) exhaustMap(payload =>
.map(page => { this.notificationService
return new MarkAllAsReadSuccess(page); .markAllAsRead(payload.member, payload.pageParams)
}) .pipe(
.catch((error: RPCClientError) => { map(page => {
return of(new MarkAllAsReadFailure(error)); return new MarkAllAsReadSuccess(page);
}); }),
catchError(error => of(new MarkAllAsReadFailure(error)))
)
)
);
} }

View File

@ -2,7 +2,7 @@ import { Component, Input, Output, EventEmitter, OnInit } from '@angular/core';
import { Probe, ProbeHost } from '@overflow/commons-typescript/model/probe'; import { Probe, ProbeHost } from '@overflow/commons-typescript/model/probe';
import { Store, select } from '@ngrx/store'; import { Store, select } from '@ngrx/store';
import { Observable, of, Subscription } from 'rxjs'; import { Observable, of, Subscription } from 'rxjs';
import { catchError, exhaustMap, map, tap } from 'rxjs/operators'; import { catchError, exhaustMap, map, tap, take } from 'rxjs/operators';
import { AuthSelector } from '@overflow/shared/auth/store'; import { AuthSelector } from '@overflow/shared/auth/store';
import { DomainMember } from '@overflow/commons-typescript/model/domain'; import { DomainMember } from '@overflow/commons-typescript/model/domain';
import { ProbeHostService } from '../service/probe-host.service'; import { ProbeHostService } from '../service/probe-host.service';
@ -42,7 +42,8 @@ export class ProbeDetailComponent implements OnInit {
tap(() => { tap(() => {
this.pending$ = of(false); this.pending$ = of(false);
}), }),
).take(1).subscribe(); take(1),
).subscribe();
} }
modifiedGeneral(probe: Probe) { modifiedGeneral(probe: Probe) {

View File

@ -2,7 +2,7 @@ import { Component, Input, Output, EventEmitter, OnInit } from '@angular/core';
import { Probe, ProbeHost } from '@overflow/commons-typescript/model/probe'; import { Probe, ProbeHost } from '@overflow/commons-typescript/model/probe';
import { Store, select } from '@ngrx/store'; import { Store, select } from '@ngrx/store';
import { Observable, of, Subscription } from 'rxjs'; import { Observable, of, Subscription } from 'rxjs';
import { catchError, exhaustMap, map, tap } from 'rxjs/operators'; import { catchError, exhaustMap, map, tap, take } from 'rxjs/operators';
import { AuthSelector } from '@overflow/shared/auth/store'; import { AuthSelector } from '@overflow/shared/auth/store';
import { DomainMember } from '@overflow/commons-typescript/model/domain'; import { DomainMember } from '@overflow/commons-typescript/model/domain';
import { ProbeHostService } from '../service/probe-host.service'; import { ProbeHostService } from '../service/probe-host.service';
@ -54,7 +54,8 @@ export class ProbeGeneralComponent implements OnInit {
tap(() => { tap(() => {
this.pending$ = of(false); this.pending$ = of(false);
}), }),
).take(1).subscribe(); take(1),
).subscribe();
} else { } else {
// error // error
} }
@ -101,7 +102,8 @@ export class ProbeGeneralComponent implements OnInit {
tap(() => { tap(() => {
this.pending$ = of(false); this.pending$ = of(false);
}), }),
).take(1).subscribe(); take(1),
).subscribe();
} }
checkValidDisplayName(value: string): string | null { checkValidDisplayName(value: string): string | null {

View File

@ -1,11 +1,14 @@
import { Component, OnInit, Output, EventEmitter, Input } from '@angular/core'; import { Component, OnInit, Output, EventEmitter, Input } from '@angular/core';
import { ProbeHost, Probe } from '@overflow/commons-typescript/model/probe';
import { Store, select } from '@ngrx/store'; import { Store, select } from '@ngrx/store';
import { Observable, of } from 'rxjs'; import { Observable, of } from 'rxjs';
import { ProbeHostService } from '../service/probe-host.service'; import { catchError, exhaustMap, map, tap, take } from 'rxjs/operators';
import { AuthSelector } from '@overflow/shared/auth/store'; import { AuthSelector } from '@overflow/shared/auth/store';
import { DomainMember } from '@overflow/commons-typescript/model/domain'; import { DomainMember } from '@overflow/commons-typescript/model/domain';
import { catchError, exhaustMap, map, tap } from 'rxjs/operators'; import { ProbeHost, Probe } from '@overflow/commons-typescript/model/probe';
import { ProbeHostService } from '../service/probe-host.service';
@Component({ @Component({
selector: 'of-probe-list', selector: 'of-probe-list',
@ -45,7 +48,8 @@ export class ProbeListComponent implements OnInit {
tap(() => { tap(() => {
this.pending$ = of(false); this.pending$ = of(false);
}), }),
).take(1).subscribe(); take(1),
).subscribe();
} }
onProbeSelect(event) { onProbeSelect(event) {

View File

@ -2,7 +2,7 @@ import { Component, Input, Output, EventEmitter, OnChanges, SimpleChanges, OnIni
import { ProbeHost, Probe } from '@overflow/commons-typescript/model/probe'; import { ProbeHost, Probe } from '@overflow/commons-typescript/model/probe';
import { Store, select } from '@ngrx/store'; import { Store, select } from '@ngrx/store';
import { Observable, of, Subscription } from 'rxjs'; import { Observable, of, Subscription } from 'rxjs';
import { catchError, exhaustMap, map, tap } from 'rxjs/operators'; import { catchError, exhaustMap, map, tap, take } from 'rxjs/operators';
import { AuthSelector } from '@overflow/shared/auth/store'; import { AuthSelector } from '@overflow/shared/auth/store';
import { DomainMember } from '@overflow/commons-typescript/model/domain'; import { DomainMember } from '@overflow/commons-typescript/model/domain';
import { ProbeHostService } from '../service/probe-host.service'; import { ProbeHostService } from '../service/probe-host.service';
@ -52,7 +52,8 @@ export class ProbeSelectorComponent implements OnInit, OnChanges {
this.generate(); this.generate();
this.pending$ = of(false); this.pending$ = of(false);
}), }),
).take(1).subscribe(); take(1),
).subscribe();
} }
ngOnChanges(changes: SimpleChanges): void { ngOnChanges(changes: SimpleChanges): void {

View File

@ -1,6 +1,5 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import 'rxjs/add/operator/map';
import { RPCService } from '@loafer/ng-rpc'; import { RPCService } from '@loafer/ng-rpc';
import { Probe, ProbeHost } from '@overflow/commons-typescript/model/probe'; import { Probe, ProbeHost } from '@overflow/commons-typescript/model/probe';
import { Domain } from '@overflow/commons-typescript/model/domain'; import { Domain } from '@overflow/commons-typescript/model/domain';

View File

@ -1,8 +1,6 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import 'rxjs/add/operator/map';
import { RPCService } from '@loafer/ng-rpc'; import { RPCService } from '@loafer/ng-rpc';
import { Domain } from '@overflow/commons-typescript/model/domain'; import { Domain } from '@overflow/commons-typescript/model/domain';

View File

@ -3,7 +3,7 @@ import { Component, OnInit, Inject, AfterContentInit, OnDestroy, Input } from '@
import { Store, select } from '@ngrx/store'; import { Store, select } from '@ngrx/store';
import { Observable, of, Subscription } from 'rxjs'; import { Observable, of, Subscription } from 'rxjs';
import { catchError, exhaustMap, map, tap } from 'rxjs/operators'; import { catchError, exhaustMap, map, tap, take } from 'rxjs/operators';
import { ConfirmationService } from 'primeng/primeng'; import { ConfirmationService } from 'primeng/primeng';
@ -50,7 +50,8 @@ export class SensorDetailComponent implements OnInit, OnDestroy {
tap(() => { tap(() => {
this.pending$ = of(false); this.pending$ = of(false);
}), }),
).take(1).subscribe(); take(1),
).subscribe();
} }
ngOnDestroy() { ngOnDestroy() {

View File

@ -2,7 +2,7 @@ import { Component, Input, OnInit, OnChanges, SimpleChanges, Output, EventEmitte
import { Store, select } from '@ngrx/store'; import { Store, select } from '@ngrx/store';
import { Observable, of, Subscription } from 'rxjs'; import { Observable, of, Subscription } from 'rxjs';
import { catchError, exhaustMap, map, tap } from 'rxjs/operators'; import { catchError, exhaustMap, map, tap, take } from 'rxjs/operators';
import { AuthSelector } from '@overflow/shared/auth/store'; import { AuthSelector } from '@overflow/shared/auth/store';
@ -66,7 +66,8 @@ export class SensorListComponent implements OnInit, OnChanges {
tap(() => { tap(() => {
this.pending$ = of(false); this.pending$ = of(false);
}), }),
).take(1).subscribe(); take(1),
).subscribe();
} }

View File

@ -1,8 +1,6 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import 'rxjs/add/operator/map';
import { RPCService } from '@loafer/ng-rpc'; import { RPCService } from '@loafer/ng-rpc';
// import { PageParams, Page } from 'app/commons/model'; // import { PageParams, Page } from 'app/commons/model';

View File

@ -1,8 +1,6 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import 'rxjs/add/operator/map';
import { RPCService } from '@loafer/ng-rpc'; import { RPCService } from '@loafer/ng-rpc';
import { Target } from '@overflow/commons-typescript/model/target'; import { Target } from '@overflow/commons-typescript/model/target';

View File

@ -1,7 +1,7 @@
import { Component, OnDestroy } from '@angular/core'; import { Component, OnDestroy } from '@angular/core';
import { AppComponent } from '../../../../app.component'; import { AppComponent } from '../../../../app.component';
import { BreadcrumbService } from '@app/commons/service/breadcrumb.service'; import { BreadcrumbService } from '@app/commons/service/breadcrumb.service';
import { Subscription } from 'rxjs/Subscription'; import { Subscription } from 'rxjs';
import { MenuItem } from 'primeng/primeng'; import { MenuItem } from 'primeng/primeng';
@Component({ @Component({

View File

@ -1,6 +1,5 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { Subject } from 'rxjs/Subject'; import { Observable, Subject } from 'rxjs';
import { Observable } from 'rxjs';
import { MenuItem } from 'primeng/primeng'; import { MenuItem } from 'primeng/primeng';
@Injectable() @Injectable()

View File

@ -1,6 +1,6 @@
import { Component, OnDestroy } from '@angular/core'; import { Component, OnDestroy } from '@angular/core';
import { Router, NavigationEnd } from '@angular/router'; import { Router, NavigationEnd } from '@angular/router';
import { Subscription } from 'rxjs/Subscription'; import { Subscription } from 'rxjs';
@Component({ @Component({
selector: 'of-pages-probe-tab', selector: 'of-pages-probe-tab',

View File

@ -1,6 +1,6 @@
import { Component, OnDestroy } from '@angular/core'; import { Component, OnDestroy } from '@angular/core';
import { Router, ActivatedRoute, NavigationEnd } from '@angular/router'; import { Router, ActivatedRoute, NavigationEnd } from '@angular/router';
import { Subscription } from 'rxjs/Subscription'; import { Subscription } from 'rxjs';
import { ProbeHost, Probe } from '@overflow/commons-typescript/model/probe'; import { ProbeHost, Probe } from '@overflow/commons-typescript/model/probe';
import { Target } from '@overflow/commons-typescript/model/target'; import { Target } from '@overflow/commons-typescript/model/target';
import { BreadcrumbService } from '@app/commons/service/breadcrumb.service'; import { BreadcrumbService } from '@app/commons/service/breadcrumb.service';

View File

@ -1,6 +1,6 @@
import { Component, OnDestroy } from '@angular/core'; import { Component, OnDestroy } from '@angular/core';
import { Router, ActivatedRoute, NavigationEnd } from '@angular/router'; import { Router, ActivatedRoute, NavigationEnd } from '@angular/router';
import { Subscription } from 'rxjs/Subscription'; import { Subscription } from 'rxjs';
import { ProbeHost, Probe } from '@overflow/commons-typescript/model/probe'; import { ProbeHost, Probe } from '@overflow/commons-typescript/model/probe';
import { Target } from '@overflow/commons-typescript/model/target'; import { Target } from '@overflow/commons-typescript/model/target';
import { BreadcrumbService } from '@app/commons/service/breadcrumb.service'; import { BreadcrumbService } from '@app/commons/service/breadcrumb.service';

View File

@ -1,6 +1,6 @@
import { Component, OnDestroy } from '@angular/core'; import { Component, OnDestroy } from '@angular/core';
import { Router, NavigationEnd } from '@angular/router'; import { Router, NavigationEnd } from '@angular/router';
import { Subscription } from 'rxjs/Subscription'; import { Subscription } from 'rxjs';
@Component({ @Component({
selector: 'of-pages-sensor-tab', selector: 'of-pages-sensor-tab',