From 99906509257c220ca0a1900d0495a9862d9863ad Mon Sep 17 00:00:00 2001 From: crusader Date: Mon, 4 Jun 2018 17:55:47 +0900 Subject: [PATCH] ing --- .../component/discovery.component.ts | 12 ++-- .../component/search-result.component.ts | 12 ++-- .../component/service-selector.component.ts | 5 +- .../infra/component/infra-host.component.ts | 5 +- @overflow/infra/service/infra.service.ts | 2 - ...member-confirm-reset-password.component.ts | 5 +- .../member-confirm-signup.component.ts | 5 +- .../member-modify-password.component.ts | 5 +- .../component/member-profile.component.ts | 15 +++-- .../member-reset-password.component.ts | 5 +- .../component/member-signin.component.ts | 5 +- .../component/member-signup.component.ts | 5 +- .../member/component/member-totp.component.ts | 12 ++-- @overflow/member/service/member.service.ts | 2 - .../component/noauth-probe-list.component.ts | 11 ++-- .../service/noauth-probe.service.ts | 2 - .../service/notification.service.ts | 2 - .../notification/notification.effect.ts | 60 ++++++++++--------- .../probe/component/probe-detail.component.ts | 5 +- .../component/probe-general.component.ts | 8 ++- .../probe/component/probe-list.component.ts | 12 ++-- .../component/probe-selector.component.ts | 5 +- @overflow/probe/service/probe-host.service.ts | 1 - @overflow/probe/service/probe.service.ts | 2 - .../component/sensor-detail.component.ts | 5 +- .../sensor/component/sensor-list.component.ts | 5 +- @overflow/sensor/service/sensor.service.ts | 2 - @overflow/target/service/target.service.ts | 2 - .../breadcrumb/app.breadcrumb.component.ts | 2 +- src/app/commons/service/breadcrumb.service.ts | 3 +- .../pages/probes/probe-tab-page.component.ts | 2 +- .../probe/probe-detail-page.component.ts | 2 +- .../probes/probe/probe-list-page.component.ts | 2 +- .../sensors/sensor-tab-page.component.ts | 2 +- 34 files changed, 127 insertions(+), 103 deletions(-) diff --git a/@overflow/discovery/component/discovery.component.ts b/@overflow/discovery/component/discovery.component.ts index ececa20..64f5bfb 100644 --- a/@overflow/discovery/component/discovery.component.ts +++ b/@overflow/discovery/component/discovery.component.ts @@ -1,13 +1,17 @@ import { Component, Input, Output, EventEmitter, OnDestroy, ViewChild, } from '@angular/core'; -import { Probe, ProbeHost } from '@overflow/commons-typescript/model/probe'; -import { Anim } from './animation'; + import { Store, select } from '@ngrx/store'; + import { Observable, of, Subscription } from 'rxjs'; -import { DiscoveryService } from '../service/discovery.service'; -import { catchError, exhaustMap, map, tap } from 'rxjs/operators'; +import { catchError, exhaustMap, map, tap, take } 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 { Anim } from './animation'; +import { DiscoveryService } from '../service/discovery.service'; import { DiscoverySubscriber, DiscoveryNotify } from '../subscriber/discovery.subscriber'; import { SearchResultComponent } from './search-result.component'; import { SearchFilterComponent } from './search-filter.component'; diff --git a/@overflow/discovery/component/search-result.component.ts b/@overflow/discovery/component/search-result.component.ts index 9d2ddac..fe4b4ec 100644 --- a/@overflow/discovery/component/search-result.component.ts +++ b/@overflow/discovery/component/search-result.component.ts @@ -5,13 +5,17 @@ import { SimpleChanges, OnInit, } 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 { 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 { Anim } from './animation'; +import { DiscoveryNotify } from '../subscriber/discovery.subscriber'; + @Component({ selector: 'of-discovery-result', templateUrl: './search-result.component.html', diff --git a/@overflow/discovery/component/service-selector.component.ts b/@overflow/discovery/component/service-selector.component.ts index ca9ddd2..ee25973 100644 --- a/@overflow/discovery/component/service-selector.component.ts +++ b/@overflow/discovery/component/service-selector.component.ts @@ -9,7 +9,7 @@ import { } from '@angular/core'; import { Store, select, StateObservable } from '@ngrx/store'; 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 { MetaCrawler } from '@overflow/commons-typescript/model/meta'; @@ -55,7 +55,8 @@ export class ServiceSelectorComponent implements OnInit, AfterContentInit, OnDes this.includeServices = this.metaCrawlers.slice(); this.change.emit(this.includeServices); }), - ).take(1).subscribe(); + take(1), + ).subscribe(); } ngOnDestroy() { diff --git a/@overflow/infra/component/infra-host.component.ts b/@overflow/infra/component/infra-host.component.ts index 493bbaa..ccafd59 100644 --- a/@overflow/infra/component/infra-host.component.ts +++ b/@overflow/infra/component/infra-host.component.ts @@ -1,7 +1,7 @@ import { Component, Input, Output, EventEmitter, OnInit } from '@angular/core'; import { Store, select } from '@ngrx/store'; 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 { DomainMember } from '@overflow/commons-typescript/model/domain'; @@ -46,7 +46,8 @@ export class InfraHostComponent implements OnInit { tap(() => { this.pending$ = of(false); }), - ).take(1).subscribe(); + take(1), + ).subscribe(); } else { // error } diff --git a/@overflow/infra/service/infra.service.ts b/@overflow/infra/service/infra.service.ts index fe31a55..4ab5780 100644 --- a/@overflow/infra/service/infra.service.ts +++ b/@overflow/infra/service/infra.service.ts @@ -1,8 +1,6 @@ import { Injectable } from '@angular/core'; import { Observable } from 'rxjs'; -import 'rxjs/add/operator/map'; - import { RPCService } from '@loafer/ng-rpc'; import { Infra } from '@overflow/commons-typescript/model/infra'; diff --git a/@overflow/member/component/member-confirm-reset-password.component.ts b/@overflow/member/component/member-confirm-reset-password.component.ts index 658fb52..7b51edb 100644 --- a/@overflow/member/component/member-confirm-reset-password.component.ts +++ b/@overflow/member/component/member-confirm-reset-password.component.ts @@ -1,7 +1,7 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { Store, select } from '@ngrx/store'; 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 { EmailAuthService } from '../service/email-auth.service'; import { EmailAuth } from '@overflow/commons-typescript/model/email/EmailAuth'; @@ -40,7 +40,8 @@ export class MemberConfirmResetPasswordComponent implements OnInit { tap(() => { this.pending$ = of(false); }), - ).take(1).subscribe(); + take(1), + ).subscribe(); } onModifyPassword() { diff --git a/@overflow/member/component/member-confirm-signup.component.ts b/@overflow/member/component/member-confirm-signup.component.ts index 1097140..58837e0 100644 --- a/@overflow/member/component/member-confirm-signup.component.ts +++ b/@overflow/member/component/member-confirm-signup.component.ts @@ -1,7 +1,7 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { Store, select } from '@ngrx/store'; 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 { EmailAuthService } from '../service/email-auth.service'; import { EmailAuth } from '@overflow/commons-typescript/model/email/EmailAuth'; @@ -39,7 +39,8 @@ export class MemberConfirmSignupComponent implements OnInit { tap(() => { this.pending$ = of(false); }), - ).take(1).subscribe(); + take(1), + ).subscribe(); } onSignin() { diff --git a/@overflow/member/component/member-modify-password.component.ts b/@overflow/member/component/member-modify-password.component.ts index 171dca7..8d783a2 100644 --- a/@overflow/member/component/member-modify-password.component.ts +++ b/@overflow/member/component/member-modify-password.component.ts @@ -3,7 +3,7 @@ import { FormGroup, FormBuilder, Validators, FormControl, ValidationErrors, Abst import { Member } from '@overflow/commons-typescript/model/member'; import { Store, select } from '@ngrx/store'; 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'; @@ -95,7 +95,8 @@ export class MemberModifyPasswordComponent implements OnInit { tap(() => { this.pending$ = of(false); }), - ).take(1).subscribe(); + take(1), + ).subscribe(); } onSignin() { diff --git a/@overflow/member/component/member-profile.component.ts b/@overflow/member/component/member-profile.component.ts index 8a9da1e..6ec79a5 100644 --- a/@overflow/member/component/member-profile.component.ts +++ b/@overflow/member/component/member-profile.component.ts @@ -1,12 +1,16 @@ 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 { DomainMember } from '@overflow/commons-typescript/model/domain'; -import { Observable, of } from 'rxjs'; + 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 * as AuthStore from '@overflow/shared/auth/store/auth'; -import { catchError, map, tap } from 'rxjs/operators'; import { MemberService } from '../service/member.service'; @Component({ @@ -98,7 +102,8 @@ export class MemberProfileComponent implements OnInit, OnDestroy { tap(() => { this.pending$ = of(false); }), - ).take(1).subscribe(); + take(1), + ).subscribe(); } private checkProfile(formValue: any): boolean { diff --git a/@overflow/member/component/member-reset-password.component.ts b/@overflow/member/component/member-reset-password.component.ts index e2f6f1c..75989a6 100644 --- a/@overflow/member/component/member-reset-password.component.ts +++ b/@overflow/member/component/member-reset-password.component.ts @@ -12,7 +12,7 @@ import { } from '@angular/forms'; import { Store, select } from '@ngrx/store'; 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 { MemberService } from '../service/member.service'; @@ -71,7 +71,8 @@ export class MemberResetPasswordComponent implements OnInit { tap(() => { this.pending$ = of(false); }), - ).take(1).subscribe(); + take(1), + ).subscribe(); } onSignin() { diff --git a/@overflow/member/component/member-signin.component.ts b/@overflow/member/component/member-signin.component.ts index e2403e7..87234b9 100644 --- a/@overflow/member/component/member-signin.component.ts +++ b/@overflow/member/component/member-signin.component.ts @@ -2,7 +2,7 @@ import { Component, OnInit, Output, EventEmitter, Input } from '@angular/core'; import { FormGroup, FormBuilder, Validators, AbstractControl } from '@angular/forms'; import { Store, select } from '@ngrx/store'; 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 {DomainMember} from '@overflow/commons-typescript/model/domain'; import * as AuthStore from '../../shared/auth/store/auth'; @@ -80,7 +80,8 @@ export class MemberSigninComponent implements OnInit { tap(() => { this.pending$ = of(false); }), - ).take(1).subscribe(); + take(1), + ).subscribe(); } onResetPassword() { diff --git a/@overflow/member/component/member-signup.component.ts b/@overflow/member/component/member-signup.component.ts index 7ffdb4e..26ad1cc 100644 --- a/@overflow/member/component/member-signup.component.ts +++ b/@overflow/member/component/member-signup.component.ts @@ -9,7 +9,7 @@ import { FormGroup, FormBuilder, Validators, AbstractControl, FormControl, Valid import { Member } from '@overflow/commons-typescript/model/member'; import { Store, select } from '@ngrx/store'; 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'; @Component({ @@ -146,7 +146,8 @@ export class MemberSignupComponent implements OnInit, OnDestroy { tap(() => { this.pending$ = of(false); }), - ).take(1).subscribe(); + take(1), + ).subscribe(); } termsDisplayOpen() { diff --git a/@overflow/member/component/member-totp.component.ts b/@overflow/member/component/member-totp.component.ts index 2a3d4f3..31c0f0d 100644 --- a/@overflow/member/component/member-totp.component.ts +++ b/@overflow/member/component/member-totp.component.ts @@ -1,11 +1,15 @@ 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 { 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 { catchError, map, tap } from 'rxjs/operators'; + +import {AuthSelector} from '../../shared/auth/store'; @Component({ selector: 'of-member-totp', diff --git a/@overflow/member/service/member.service.ts b/@overflow/member/service/member.service.ts index d6c9789..510b680 100644 --- a/@overflow/member/service/member.service.ts +++ b/@overflow/member/service/member.service.ts @@ -1,8 +1,6 @@ import { Injectable } from '@angular/core'; import { Observable } from 'rxjs'; -import 'rxjs/add/operator/map'; - import { RESTService } from '@loafer/ng-rest'; import { RPCService } from '@loafer/ng-rpc'; import { DomainMember } from '@overflow/commons-typescript/model/domain'; diff --git a/@overflow/noauth-probe/component/noauth-probe-list.component.ts b/@overflow/noauth-probe/component/noauth-probe-list.component.ts index c5ae558..1e11343 100644 --- a/@overflow/noauth-probe/component/noauth-probe-list.component.ts +++ b/@overflow/noauth-probe/component/noauth-probe-list.component.ts @@ -1,7 +1,7 @@ import { Component, Input, Output, EventEmitter, AfterContentInit, OnInit, OnDestroy } from '@angular/core'; import { Store, select } from '@ngrx/store'; 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 { NoAuthProbe } from '@overflow/commons-typescript/model/noauth'; @@ -53,7 +53,8 @@ export class NoAuthProbeListComponent implements OnInit, OnDestroy { tap(() => { this.pending$ = of(false); }), - ).take(1).subscribe(); + take(1), + ).subscribe(); this.noauthProbeSubscription = this.noAuthProbeSubscriber.observable().pipe( tap((noAuthProbeNotify: NoAuthProbeNotify) => { @@ -104,7 +105,8 @@ export class NoAuthProbeListComponent implements OnInit, OnDestroy { tap(() => { this.pending$ = of(false); }), - ).take(1).subscribe(); + take(1), + ).subscribe(); } else { this.noAuthProbeService.denyNoauthProbe(selected.id) .pipe( @@ -121,7 +123,8 @@ export class NoAuthProbeListComponent implements OnInit, OnDestroy { tap(() => { this.pending$ = of(false); }), - ).take(1).subscribe(); + take(1), + ).subscribe(); } }, reject: () => { diff --git a/@overflow/noauth-probe/service/noauth-probe.service.ts b/@overflow/noauth-probe/service/noauth-probe.service.ts index 459a70e..7f789ea 100644 --- a/@overflow/noauth-probe/service/noauth-probe.service.ts +++ b/@overflow/noauth-probe/service/noauth-probe.service.ts @@ -1,8 +1,6 @@ import { Injectable } from '@angular/core'; import { Observable } from 'rxjs'; -import 'rxjs/add/operator/map'; - import { RPCService } from '@loafer/ng-rpc'; import { Domain } from '@overflow/commons-typescript/model/domain'; diff --git a/@overflow/notification/service/notification.service.ts b/@overflow/notification/service/notification.service.ts index bf22edf..d27b26d 100644 --- a/@overflow/notification/service/notification.service.ts +++ b/@overflow/notification/service/notification.service.ts @@ -1,8 +1,6 @@ import { Injectable } from '@angular/core'; import { Observable } from 'rxjs'; -import 'rxjs/add/operator/map'; - import { RPCService } from '@loafer/ng-rpc'; import { Notification } from '@overflow/commons-typescript/model/notification'; diff --git a/@overflow/notification/store/entity/notification/notification.effect.ts b/@overflow/notification/store/entity/notification/notification.effect.ts index 8e8b36e..7a22545 100644 --- a/@overflow/notification/store/entity/notification/notification.effect.ts +++ b/@overflow/notification/store/entity/notification/notification.effect.ts @@ -4,15 +4,8 @@ import { Router } from '@angular/router'; import { Effect, Actions, ofType } from '@ngrx/effects'; import { Action } from '@ngrx/store'; -import { Observable } from 'rxjs'; -import { of } from 'rxjs/observable/of'; - -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 { of } from 'rxjs'; +import { catchError, exhaustMap, map, tap } from 'rxjs/operators'; import { RPCClientError } from '@loafer/ng-rpc'; @@ -39,26 +32,35 @@ export class Effects { ) { } @Effect() - readAllByMember$: Observable = this.actions$ - .ofType(ActionType.ReadAllByMember) - .map((action: ReadAllByMember) => action.payload) - .switchMap(payload => this.notificationService.readAllByMember(payload.member, payload.pageParams)) - .map(page => { - return new ReadAllByMemberSuccess(page); - }) - .catch((error: RPCClientError) => { - return of(new ReadAllByMemberFailure(error)); - }); + readAllByMember$ = this.actions$.pipe( + ofType(ActionType.ReadAllByMember), + map((action: ReadAllByMember) => action.payload), + exhaustMap(payload => + this.notificationService + .readAllByMember(payload.member, payload.pageParams) + .pipe( + map(page => { + return new ReadAllByMemberSuccess(page); + }), + catchError(error => of(new ReadAllByMemberFailure(error))) + ) + ) + ); @Effect() - markAllAsRead$: Observable = this.actions$ - .ofType(ActionType.MarkAllAsRead) - .map((action: MarkAllAsRead) => action.payload) - .switchMap(payload => this.notificationService.markAllAsRead(payload.member, payload.pageParams)) - .map(page => { - return new MarkAllAsReadSuccess(page); - }) - .catch((error: RPCClientError) => { - return of(new MarkAllAsReadFailure(error)); - }); + markAllAsRead$ = this.actions$.pipe( + ofType(ActionType.MarkAllAsRead), + map((action: MarkAllAsRead) => action.payload), + exhaustMap(payload => + this.notificationService + .markAllAsRead(payload.member, payload.pageParams) + .pipe( + map(page => { + return new MarkAllAsReadSuccess(page); + }), + catchError(error => of(new MarkAllAsReadFailure(error))) + ) + ) + ); + } diff --git a/@overflow/probe/component/probe-detail.component.ts b/@overflow/probe/component/probe-detail.component.ts index 15a38fc..6496308 100644 --- a/@overflow/probe/component/probe-detail.component.ts +++ b/@overflow/probe/component/probe-detail.component.ts @@ -2,7 +2,7 @@ import { Component, Input, Output, EventEmitter, OnInit } from '@angular/core'; import { Probe, ProbeHost } from '@overflow/commons-typescript/model/probe'; import { Store, select } from '@ngrx/store'; 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 { DomainMember } from '@overflow/commons-typescript/model/domain'; import { ProbeHostService } from '../service/probe-host.service'; @@ -42,7 +42,8 @@ export class ProbeDetailComponent implements OnInit { tap(() => { this.pending$ = of(false); }), - ).take(1).subscribe(); + take(1), + ).subscribe(); } modifiedGeneral(probe: Probe) { diff --git a/@overflow/probe/component/probe-general.component.ts b/@overflow/probe/component/probe-general.component.ts index 1c84bfb..cd0367c 100644 --- a/@overflow/probe/component/probe-general.component.ts +++ b/@overflow/probe/component/probe-general.component.ts @@ -2,7 +2,7 @@ import { Component, Input, Output, EventEmitter, OnInit } from '@angular/core'; import { Probe, ProbeHost } from '@overflow/commons-typescript/model/probe'; import { Store, select } from '@ngrx/store'; 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 { DomainMember } from '@overflow/commons-typescript/model/domain'; import { ProbeHostService } from '../service/probe-host.service'; @@ -54,7 +54,8 @@ export class ProbeGeneralComponent implements OnInit { tap(() => { this.pending$ = of(false); }), - ).take(1).subscribe(); + take(1), + ).subscribe(); } else { // error } @@ -101,7 +102,8 @@ export class ProbeGeneralComponent implements OnInit { tap(() => { this.pending$ = of(false); }), - ).take(1).subscribe(); + take(1), + ).subscribe(); } checkValidDisplayName(value: string): string | null { diff --git a/@overflow/probe/component/probe-list.component.ts b/@overflow/probe/component/probe-list.component.ts index fc65c99..5f7f800 100644 --- a/@overflow/probe/component/probe-list.component.ts +++ b/@overflow/probe/component/probe-list.component.ts @@ -1,11 +1,14 @@ 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 { 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 { 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({ selector: 'of-probe-list', @@ -45,7 +48,8 @@ export class ProbeListComponent implements OnInit { tap(() => { this.pending$ = of(false); }), - ).take(1).subscribe(); + take(1), + ).subscribe(); } onProbeSelect(event) { diff --git a/@overflow/probe/component/probe-selector.component.ts b/@overflow/probe/component/probe-selector.component.ts index 3f3a657..45771ec 100644 --- a/@overflow/probe/component/probe-selector.component.ts +++ b/@overflow/probe/component/probe-selector.component.ts @@ -2,7 +2,7 @@ import { Component, Input, Output, EventEmitter, OnChanges, SimpleChanges, OnIni import { ProbeHost, Probe } from '@overflow/commons-typescript/model/probe'; import { Store, select } from '@ngrx/store'; 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 { DomainMember } from '@overflow/commons-typescript/model/domain'; import { ProbeHostService } from '../service/probe-host.service'; @@ -52,7 +52,8 @@ export class ProbeSelectorComponent implements OnInit, OnChanges { this.generate(); this.pending$ = of(false); }), - ).take(1).subscribe(); + take(1), + ).subscribe(); } ngOnChanges(changes: SimpleChanges): void { diff --git a/@overflow/probe/service/probe-host.service.ts b/@overflow/probe/service/probe-host.service.ts index 755ab71..a63b70c 100644 --- a/@overflow/probe/service/probe-host.service.ts +++ b/@overflow/probe/service/probe-host.service.ts @@ -1,6 +1,5 @@ import { Injectable } from '@angular/core'; import { Observable } from 'rxjs'; -import 'rxjs/add/operator/map'; import { RPCService } from '@loafer/ng-rpc'; import { Probe, ProbeHost } from '@overflow/commons-typescript/model/probe'; import { Domain } from '@overflow/commons-typescript/model/domain'; diff --git a/@overflow/probe/service/probe.service.ts b/@overflow/probe/service/probe.service.ts index 60a1ab1..5a9107a 100644 --- a/@overflow/probe/service/probe.service.ts +++ b/@overflow/probe/service/probe.service.ts @@ -1,8 +1,6 @@ import { Injectable } from '@angular/core'; import { Observable } from 'rxjs'; -import 'rxjs/add/operator/map'; - import { RPCService } from '@loafer/ng-rpc'; import { Domain } from '@overflow/commons-typescript/model/domain'; diff --git a/@overflow/sensor/component/sensor-detail.component.ts b/@overflow/sensor/component/sensor-detail.component.ts index 2955da5..c88a642 100644 --- a/@overflow/sensor/component/sensor-detail.component.ts +++ b/@overflow/sensor/component/sensor-detail.component.ts @@ -3,7 +3,7 @@ import { Component, OnInit, Inject, AfterContentInit, OnDestroy, Input } from '@ import { Store, select } from '@ngrx/store'; 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'; @@ -50,7 +50,8 @@ export class SensorDetailComponent implements OnInit, OnDestroy { tap(() => { this.pending$ = of(false); }), - ).take(1).subscribe(); + take(1), + ).subscribe(); } ngOnDestroy() { diff --git a/@overflow/sensor/component/sensor-list.component.ts b/@overflow/sensor/component/sensor-list.component.ts index 48c709e..6475453 100644 --- a/@overflow/sensor/component/sensor-list.component.ts +++ b/@overflow/sensor/component/sensor-list.component.ts @@ -2,7 +2,7 @@ import { Component, Input, OnInit, OnChanges, SimpleChanges, Output, EventEmitte import { Store, select } from '@ngrx/store'; 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'; @@ -66,7 +66,8 @@ export class SensorListComponent implements OnInit, OnChanges { tap(() => { this.pending$ = of(false); }), - ).take(1).subscribe(); + take(1), + ).subscribe(); } diff --git a/@overflow/sensor/service/sensor.service.ts b/@overflow/sensor/service/sensor.service.ts index c287b58..a6c0781 100644 --- a/@overflow/sensor/service/sensor.service.ts +++ b/@overflow/sensor/service/sensor.service.ts @@ -1,8 +1,6 @@ import { Injectable } from '@angular/core'; import { Observable } from 'rxjs'; -import 'rxjs/add/operator/map'; - import { RPCService } from '@loafer/ng-rpc'; // import { PageParams, Page } from 'app/commons/model'; diff --git a/@overflow/target/service/target.service.ts b/@overflow/target/service/target.service.ts index 4c8f8e0..346e622 100644 --- a/@overflow/target/service/target.service.ts +++ b/@overflow/target/service/target.service.ts @@ -1,8 +1,6 @@ import { Injectable } from '@angular/core'; import { Observable } from 'rxjs'; -import 'rxjs/add/operator/map'; - import { RPCService } from '@loafer/ng-rpc'; import { Target } from '@overflow/commons-typescript/model/target'; diff --git a/src/app/commons/component/layout/breadcrumb/app.breadcrumb.component.ts b/src/app/commons/component/layout/breadcrumb/app.breadcrumb.component.ts index 6eeb2cb..41c0e7e 100644 --- a/src/app/commons/component/layout/breadcrumb/app.breadcrumb.component.ts +++ b/src/app/commons/component/layout/breadcrumb/app.breadcrumb.component.ts @@ -1,7 +1,7 @@ import { Component, OnDestroy } from '@angular/core'; import { AppComponent } from '../../../../app.component'; import { BreadcrumbService } from '@app/commons/service/breadcrumb.service'; -import { Subscription } from 'rxjs/Subscription'; +import { Subscription } from 'rxjs'; import { MenuItem } from 'primeng/primeng'; @Component({ diff --git a/src/app/commons/service/breadcrumb.service.ts b/src/app/commons/service/breadcrumb.service.ts index eb5f017..4436250 100644 --- a/src/app/commons/service/breadcrumb.service.ts +++ b/src/app/commons/service/breadcrumb.service.ts @@ -1,6 +1,5 @@ import { Injectable } from '@angular/core'; -import { Subject } from 'rxjs/Subject'; -import { Observable } from 'rxjs'; +import { Observable, Subject } from 'rxjs'; import { MenuItem } from 'primeng/primeng'; @Injectable() diff --git a/src/app/pages/probes/probe-tab-page.component.ts b/src/app/pages/probes/probe-tab-page.component.ts index 4043d2d..cf2c2a3 100644 --- a/src/app/pages/probes/probe-tab-page.component.ts +++ b/src/app/pages/probes/probe-tab-page.component.ts @@ -1,6 +1,6 @@ import { Component, OnDestroy } from '@angular/core'; import { Router, NavigationEnd } from '@angular/router'; -import { Subscription } from 'rxjs/Subscription'; +import { Subscription } from 'rxjs'; @Component({ selector: 'of-pages-probe-tab', diff --git a/src/app/pages/probes/probe/probe-detail-page.component.ts b/src/app/pages/probes/probe/probe-detail-page.component.ts index 3d4cce9..8e3c57b 100644 --- a/src/app/pages/probes/probe/probe-detail-page.component.ts +++ b/src/app/pages/probes/probe/probe-detail-page.component.ts @@ -1,6 +1,6 @@ import { Component, OnDestroy } from '@angular/core'; 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 { Target } from '@overflow/commons-typescript/model/target'; import { BreadcrumbService } from '@app/commons/service/breadcrumb.service'; diff --git a/src/app/pages/probes/probe/probe-list-page.component.ts b/src/app/pages/probes/probe/probe-list-page.component.ts index ab05898..7d5ed7c 100644 --- a/src/app/pages/probes/probe/probe-list-page.component.ts +++ b/src/app/pages/probes/probe/probe-list-page.component.ts @@ -1,6 +1,6 @@ import { Component, OnDestroy } from '@angular/core'; 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 { Target } from '@overflow/commons-typescript/model/target'; import { BreadcrumbService } from '@app/commons/service/breadcrumb.service'; diff --git a/src/app/pages/sensors/sensor-tab-page.component.ts b/src/app/pages/sensors/sensor-tab-page.component.ts index 428c5f9..6a27032 100644 --- a/src/app/pages/sensors/sensor-tab-page.component.ts +++ b/src/app/pages/sensors/sensor-tab-page.component.ts @@ -1,6 +1,6 @@ import { Component, OnDestroy } from '@angular/core'; import { Router, NavigationEnd } from '@angular/router'; -import { Subscription } from 'rxjs/Subscription'; +import { Subscription } from 'rxjs'; @Component({ selector: 'of-pages-sensor-tab',