]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: Update RxJS to version 6 21826/head
authorTiago Melo <tmelo@suse.com>
Fri, 4 May 2018 19:07:21 +0000 (20:07 +0100)
committerTiago Melo <tmelo@suse.com>
Sat, 2 Jun 2018 21:00:33 +0000 (22:00 +0100)
I used rxjs-tslint tool to automatically update most of the necessary code.

I added a new package, rxjs-compat, to maintain the compatibility
of external plugins that are still using RxJS v5.X.

Signed-off-by: Tiago Melo <tmelo@suse.com>
34 files changed:
src/pybind/mgr/dashboard/frontend/package.json
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/flatten-confirmation-modal/flatten-confimation-modal.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/mirroring.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-form/rbd-form.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-list/rbd-list.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-form/rbd-snapshot-form.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-list/rbd-snapshot-list.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rollback-confirmation-modal/rollback-confimation-modal.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-clients/cephfs-clients.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-detail/cephfs-detail.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-detail/cephfs-detail.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-list/cephfs-list.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/configuration/configuration.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health/health.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-form/rgw-bucket-form.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-list/rgw-bucket-list.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-form/rgw-user-form.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-form/rgw-user-form.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-list/rgw-user-list.component.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/api/performance-counter.service.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/api/rgw-bucket.service.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/api/rgw-user.service.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/components/deletion-modal/deletion-modal.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/components/deletion-modal/deletion-modal.component.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/services/api-interceptor.service.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/services/module-status-guard.service.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/services/module-status-guard.service.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/services/notification.service.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/services/summary.service.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/services/summary.service.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/services/task-manager.service.spec.ts
src/pybind/mgr/dashboard/frontend/src/setupJest.ts
src/pybind/mgr/dashboard/frontend/tslint.json

index d089d0719f20230a2a6545d87c925f6c5524f51a..e5bedfbc3a44b9b7f2a3ac91b4c44762501c3bce 100644 (file)
@@ -49,7 +49,8 @@
     "ng2-charts": "^1.6.0",
     "ng2-toastr": "4.1.2",
     "ngx-bootstrap": "^2.0.1",
-    "rxjs": "^5.5.2",
+    "rxjs": "^6.2.0",
+    "rxjs-compat": "^6.2.0",
     "zone.js": "^0.8.14"
   },
   "devDependencies": {
index 6d9174f80b3d449fd24deb495bffd613fd4a3d0f..bf9cd1647bf5ffbcaa7e2bbb27f16215c5b5b126 100644 (file)
@@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core';
 import { FormGroup } from '@angular/forms';
 
 import { BsModalRef } from 'ngx-bootstrap';
-import { Subject } from 'rxjs/Subject';
+import { Subject } from 'rxjs';
 
 @Component({
   selector: 'cd-flatten-confimation-modal',
@@ -10,7 +10,6 @@ import { Subject } from 'rxjs/Subject';
   styleUrls: ['./flatten-confimation-modal.component.scss']
 })
 export class FlattenConfirmationModalComponent implements OnInit {
-
   child: string;
   parent: string;
 
index a9deeae7eec0e23d3cd3d3633bc3e8b013316dcc..0fb423cc1fa2b81d6b3bf62d15269fd748f33bf4 100644 (file)
@@ -3,7 +3,7 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing';
 
 import { BsDropdownModule, TabsModule } from 'ngx-bootstrap';
 import { ProgressbarModule } from 'ngx-bootstrap/progressbar';
-import { Observable } from 'rxjs/Observable';
+import { Observable } from 'rxjs';
 
 import { RbdMirroringService } from '../../../shared/api/rbd-mirroring.service';
 import { SharedModule } from '../../../shared/shared.module';
index 3b97e91314576422e11e9812605eaffc81e365d3..9ec6577985ab5590c4aa5d82efdc167545853203 100644 (file)
@@ -3,8 +3,7 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing';
 import { ReactiveFormsModule } from '@angular/forms';
 import { RouterTestingModule } from '@angular/router/testing';
 
-import 'rxjs/add/observable/of';
-import { Observable } from 'rxjs/Observable';
+import { of as observableOf } from 'rxjs';
 
 import { PoolService } from '../../../shared/api/pool.service';
 import { RbdService } from '../../../shared/api/rbd.service';
@@ -23,7 +22,7 @@ describe('RbdFormComponent', () => {
     subscribe: (name, metadata, onTaskFinished: (finishedTask: any) => any) => {
       return null;
     },
-    defaultFeatures: () => Observable.of([]),
+    defaultFeatures: () => observableOf([]),
     list: (attrs = []) => {
       return new Promise(function(resolve, reject) {
         return;
index 6b535b36813125eab3c8da1a7d3f3e5be9bade56..3e1d5c2d78fa847c0c5885f24fdaf59b27c6bd9c 100644 (file)
@@ -11,8 +11,7 @@ import {
   TabsModule,
   TooltipModule
 } from 'ngx-bootstrap';
-import 'rxjs/add/observable/throw';
-import { Observable } from 'rxjs/Observable';
+import { throwError as observableThrowError } from 'rxjs';
 
 import { RbdService } from '../../../shared/api/rbd.service';
 import { ComponentsModule } from '../../../shared/components/components.module';
@@ -73,7 +72,7 @@ describe('RbdListComponent', () => {
         null,
         null
       );
-      spyOn(rbdService, 'delete').and.returnValue(Observable.throw({ status: 500 }));
+      spyOn(rbdService, 'delete').and.returnValue(observableThrowError({ status: 500 }));
       spyOn(notificationService, 'notifyTask').and.stub();
       component.modalRef = new BsModalRef();
       component.modalRef.content = {
index e18e5bca110c363420e185bec8fc695f1eb65b63..a0acb1c0bb4fc6bf9e565e1c1dc512a705eb6c22 100644 (file)
@@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core';
 import { FormControl, FormGroup, Validators } from '@angular/forms';
 
 import { BsModalRef } from 'ngx-bootstrap';
-import { Subject } from 'rxjs/Subject';
+import { Subject } from 'rxjs';
 
 import { RbdService } from '../../../shared/api/rbd.service';
 import { FinishedTask } from '../../../shared/models/finished-task';
index 54ebf3671aa427e8545ac5c3df4587347acf7ee2..2dd79cef41b1c84f462db427253197d493a5f334 100644 (file)
@@ -4,7 +4,7 @@ import { RouterTestingModule } from '@angular/router/testing';
 
 import { ToastModule } from 'ng2-toastr';
 import { BsModalRef, ModalModule } from 'ngx-bootstrap';
-import { Observable } from 'rxjs/Observable';
+import { throwError as observableThrowError } from 'rxjs';
 
 import { ApiModule } from '../../../shared/api/api.module';
 import { RbdService } from '../../../shared/api/rbd.service';
@@ -21,7 +21,7 @@ describe('RbdSnapshotListComponent', () => {
 
   beforeEach(async(() => {
     TestBed.configureTestingModule({
-      declarations: [ RbdSnapshotListComponent ],
+      declarations: [RbdSnapshotListComponent],
       imports: [
         DataTableModule,
         ComponentsModule,
@@ -32,9 +32,8 @@ describe('RbdSnapshotListComponent', () => {
         HttpClientTestingModule,
         RouterTestingModule
       ],
-      providers: [ AuthStorageService ]
-    })
-    .compileComponents();
+      providers: [AuthStorageService]
+    }).compileComponents();
   }));
 
   beforeEach(() => {
@@ -56,13 +55,20 @@ describe('RbdSnapshotListComponent', () => {
       called = false;
       rbdService = new RbdService(null);
       notificationService = new NotificationService(null, null);
-      component = new RbdSnapshotListComponent(null, null, null, rbdService, null, null,
-                                               notificationService);
-      spyOn(rbdService, 'deleteSnapshot').and.returnValue(Observable.throw({status: 500}));
+      component = new RbdSnapshotListComponent(
+        null,
+        null,
+        null,
+        rbdService,
+        null,
+        null,
+        notificationService
+      );
+      spyOn(rbdService, 'deleteSnapshot').and.returnValue(observableThrowError({ status: 500 }));
       spyOn(notificationService, 'notifyTask').and.stub();
       component.modalRef = new BsModalRef();
       component.modalRef.content = {
-        stopLoadingSpinner: () => called = true
+        stopLoadingSpinner: () => (called = true)
       };
     });
 
index b95d7e47046f7ff42ef9c450db6d73572e1c2a50..bef646f920488bb11e843b44d7c5ad2cf85cfde7 100644 (file)
@@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core';
 import { FormGroup } from '@angular/forms';
 
 import { BsModalRef } from 'ngx-bootstrap';
-import { Subject } from 'rxjs/Subject';
+import { Subject } from 'rxjs';
 
 @Component({
   selector: 'cd-rollback-confimation-modal',
index d699a262a788ee50f42b6cafdd82b49be61a0ea7..6d3402e04cae4fd06970ba269f72856072053f2b 100644 (file)
@@ -2,7 +2,7 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing';
 import { RouterTestingModule } from '@angular/router/testing';
 
 import { BsDropdownModule } from 'ngx-bootstrap';
-import { Observable } from 'rxjs/Observable';
+import { Observable } from 'rxjs';
 
 import { CephfsService } from '../../../shared/api/cephfs.service';
 import { SharedModule } from '../../../shared/shared.module';
index b959aedb912080114b6ffbba9b091c3d2b8f1403..6c27edb9be68f1a1dcf228f7dc4d01fe00b74fe0 100644 (file)
@@ -4,7 +4,7 @@ import { RouterTestingModule } from '@angular/router/testing';
 
 import { ChartsModule } from 'ng2-charts/ng2-charts';
 import { BsDropdownModule, ProgressbarModule, TabsModule } from 'ngx-bootstrap';
-import { Observable } from 'rxjs/Observable';
+import { Observable } from 'rxjs';
 
 import { CephfsService } from '../../../shared/api/cephfs.service';
 import { SharedModule } from '../../../shared/shared.module';
index 378261026d196ed31a18bf1d6b9c56bc0864625f..21170748106bb1146532108b6becc0fb8e938f2a 100644 (file)
@@ -1,6 +1,7 @@
 import { Component, Input, OnChanges, OnInit, TemplateRef, ViewChild } from '@angular/core';
 
 import * as _ from 'lodash';
+import { Subscription } from 'rxjs';
 
 import { CephfsService } from '../../../shared/api/cephfs.service';
 import { CdTableSelection } from '../../../shared/models/cd-table-selection';
index 65856bd5c7bfff1fdc9c8dd4386e18611aed7594..9b9acd3d8ec8ec49f750a8b97bf59dd6009fe0ec 100644 (file)
@@ -1,7 +1,7 @@
 import { Component, Input } from '@angular/core';
 import { async, ComponentFixture, TestBed } from '@angular/core/testing';
 
-import { Observable } from 'rxjs/Observable';
+import { Observable } from 'rxjs';
 
 import { CephfsService } from '../../../shared/api/cephfs.service';
 import { CdTableSelection } from '../../../shared/models/cd-table-selection';
index 4ac81a1b77e7cf51a1242952067ddd4adf22891a..7334b249bf5c392ff6a072fb6bbc42d8d0f8587d 100644 (file)
@@ -2,7 +2,7 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing';
 import { FormsModule } from '@angular/forms';
 
 import { TabsModule } from 'ngx-bootstrap/tabs/tabs.module';
-import { Observable } from 'rxjs/Observable';
+import { Observable } from 'rxjs';
 
 import { ConfigurationService } from '../../../shared/api/configuration.service';
 import { SharedModule } from '../../../shared/shared.module';
index 012136cc450f97525e0c9a846041699d6ad3068b..335d91e37da1a55b65109b107e2306226401f4cf 100644 (file)
@@ -1,7 +1,7 @@
 import { NO_ERRORS_SCHEMA } from '@angular/core';
 import { async, ComponentFixture, TestBed } from '@angular/core/testing';
 
-import { Observable } from 'rxjs/Observable';
+import { of as observableOf } from 'rxjs';
 
 import { DashboardService } from '../../../shared/api/dashboard.service';
 import { SharedModule } from '../../../shared/shared.module';
@@ -20,7 +20,7 @@ describe('HealthComponent', () => {
 
   const fakeService = {
     getHealth: () => {
-      return Observable.of({
+      return observableOf({
         health: {},
         df: {
           stats: {}
index 77cd85f8a4385d244bc289c7ba235f821b58a4d4..cbb82dab8ac3e13ed7e73a0e26a3279a13f49335 100644 (file)
@@ -3,8 +3,7 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing';
 import { FormControl, ReactiveFormsModule } from '@angular/forms';
 import { RouterTestingModule } from '@angular/router/testing';
 
-import 'rxjs/add/observable/of';
-import { Observable } from 'rxjs/Observable';
+import { of as observableOf } from 'rxjs';
 
 import { RgwBucketService } from '../../../shared/api/rgw-bucket.service';
 import { RgwUserService } from '../../../shared/api/rgw-user.service';
@@ -18,7 +17,7 @@ describe('RgwBucketFormComponent', () => {
 
   class MockRgwBucketService extends RgwBucketService {
     enumerate() {
-      return Observable.of(queryResult);
+      return observableOf(queryResult);
     }
   }
 
index 82e32c050fb27768d5d3d2c92866d14f269ba543..a6dbd6bcd160a50fcb04860d018278f89c58d29d 100644 (file)
@@ -2,9 +2,7 @@ import { Component, ViewChild } from '@angular/core';
 import { Router } from '@angular/router';
 
 import { BsModalService } from 'ngx-bootstrap';
-import 'rxjs/add/observable/forkJoin';
-import { Observable } from 'rxjs/Observable';
-import { Subscriber } from 'rxjs/Subscriber';
+import { forkJoin as observableForkJoin, Observable, Subscriber } from 'rxjs';
 
 import { RgwBucketService } from '../../../shared/api/rgw-bucket.service';
 import { DeletionModalComponent } from '../../../shared/components/deletion-modal/deletion-modal.component';
@@ -67,7 +65,7 @@ export class RgwBucketListComponent {
       deletionObserver: (): Observable<any> => {
         return new Observable((observer: Subscriber<any>) => {
           // Delete all selected data table rows.
-          Observable.forkJoin(
+          observableForkJoin(
             this.selection.selected.map((bucket: any) => {
               return this.rgwBucketService.delete(bucket.bucket);
             })
index 69cd35f39ae61e2f00745002a09c667b0b9eb013..bcadfc44299547f9e2728a9587b9ab0a747abc53 100644 (file)
@@ -4,8 +4,7 @@ import { FormControl, ReactiveFormsModule } from '@angular/forms';
 import { RouterTestingModule } from '@angular/router/testing';
 
 import { BsModalService } from 'ngx-bootstrap/modal';
-import 'rxjs/add/observable/of';
-import { Observable } from 'rxjs/Observable';
+import { of as observableOf } from 'rxjs';
 
 import { RgwUserService } from '../../../shared/api/rgw-user.service';
 import { SharedModule } from '../../../shared/shared.module';
@@ -18,7 +17,7 @@ describe('RgwUserFormComponent', () => {
 
   class MockRgwUserService extends RgwUserService {
     enumerate() {
-      return Observable.of(queryResult);
+      return observableOf(queryResult);
     }
   }
 
index a9f0f0478fc9d6d7661cd8e058e59932d0aec810..66a44720680973c747f57bcadbe841209972fad2 100644 (file)
@@ -11,8 +11,7 @@ import { ActivatedRoute, Router } from '@angular/router';
 
 import * as _ from 'lodash';
 import { BsModalService } from 'ngx-bootstrap';
-import 'rxjs/add/observable/forkJoin';
-import { Observable } from 'rxjs/Observable';
+import { forkJoin as observableForkJoin, Observable } from 'rxjs';
 
 import { RgwUserService } from '../../../shared/api/rgw-user.service';
 import { FormatterService } from '../../../shared/services/formatter.service';
@@ -163,7 +162,7 @@ export class RgwUserFormComponent implements OnInit {
       const observables = [];
       observables.push(this.rgwUserService.get(params.uid));
       observables.push(this.rgwUserService.getQuota(params.uid));
-      Observable.forkJoin(observables).subscribe(
+      observableForkJoin(observables).subscribe(
         (resp: any[]) => {
           this.loading = false;
           // Get the default values.
@@ -248,7 +247,7 @@ export class RgwUserFormComponent implements OnInit {
       this.submitObservables.push(this.rgwUserService.putQuota(bucketQuotaArgs));
     }
     // Finally execute all observables.
-    Observable.forkJoin(this.submitObservables).subscribe(
+    observableForkJoin(this.submitObservables).subscribe(
       () => {
         this.goToListView();
       },
index 70c4d9142b25e0e3e6bb2290e65b297d367f1b3d..49b0e04018775fae03456b00c89ae163d24396ff 100644 (file)
@@ -2,9 +2,7 @@ import { Component, ViewChild } from '@angular/core';
 import { Router } from '@angular/router';
 
 import { BsModalService } from 'ngx-bootstrap';
-import 'rxjs/add/observable/forkJoin';
-import { Observable } from 'rxjs/Observable';
-import { Subscriber } from 'rxjs/Subscriber';
+import { forkJoin as observableForkJoin, Observable, Subscriber } from 'rxjs';
 
 import { RgwUserService } from '../../../shared/api/rgw-user.service';
 import { DeletionModalComponent } from '../../../shared/components/deletion-modal/deletion-modal.component';
@@ -84,7 +82,7 @@ export class RgwUserListComponent {
       deletionObserver: (): Observable<any> => {
         return new Observable((observer: Subscriber<any>) => {
           // Delete all selected data table rows.
-          Observable.forkJoin(
+          observableForkJoin(
             this.selection.selected.map((user: any) => {
               return this.rgwUserService.delete(user.user_id);
             })
index d4ae1fecdfee92686aec77385cad6ecd65c82540..05317bc28a6ee0d16662af3255b0bc5d036a39c7 100644 (file)
@@ -1,12 +1,11 @@
 import { HttpClient } from '@angular/common/http';
 import { Injectable } from '@angular/core';
 
-import 'rxjs/add/observable/of';
-import { Observable } from 'rxjs/Observable';
+import { of as observableOf } from 'rxjs';
+import { mergeMap } from 'rxjs/operators';
 
 @Injectable()
 export class PerformanceCounterService {
-
   private url = 'api/perf_counters';
 
   constructor(private http: HttpClient) {}
@@ -17,9 +16,10 @@ export class PerformanceCounterService {
 
   get(service_type: string, service_id: string) {
     const serviceType = service_type.replace('-', '_');
-    return this.http.get(`${this.url}/${serviceType}/${service_id}`)
-      .flatMap((resp) => {
-        return Observable.of(resp['counters']);
-      });
+    return this.http.get(`${this.url}/${serviceType}/${service_id}`).pipe(
+      mergeMap((resp) => {
+        return observableOf(resp['counters']);
+      })
+    );
   }
 }
index 0740d6dd4c3cad8296e113afce8ae871b377c1c0..acf03f664192f15014c000c55b595fc871574727 100644 (file)
@@ -2,9 +2,8 @@ import { HttpClient, HttpParams } from '@angular/common/http';
 import { Injectable } from '@angular/core';
 
 import * as _ from 'lodash';
-import 'rxjs/add/observable/forkJoin';
-import 'rxjs/add/observable/of';
-import { Observable } from 'rxjs/Observable';
+import { forkJoin as observableForkJoin, of as observableOf } from 'rxjs';
+import { mergeMap } from 'rxjs/operators';
 
 @Injectable()
 export class RgwBucketService {
@@ -17,16 +16,16 @@ export class RgwBucketService {
    * @return {Observable<Object[]>}
    */
   list() {
-    return this.enumerate().flatMap((buckets: string[]) => {
-      if (buckets.length > 0) {
-        return Observable.forkJoin(
-          buckets.map((bucket: string) => {
-            return this.get(bucket);
-          })
-        );
-      }
-      return Observable.of([]);
-    });
+    return this.enumerate().pipe(
+      mergeMap((buckets: string[]) => {
+        if (buckets.length > 0) {
+          return observableForkJoin(
+            buckets.map((bucket: string) => {
+              return this.get(bucket);
+            }));
+        }
+        return observableOf([]);
+      }));
   }
 
   /**
@@ -72,9 +71,10 @@ export class RgwBucketService {
    * @return {Observable<boolean>}
    */
   exists(bucket: string) {
-    return this.enumerate().flatMap((resp: string[]) => {
-      const index = _.indexOf(resp, bucket);
-      return Observable.of(-1 !== index);
-    });
+    return this.enumerate().pipe(
+      mergeMap((resp: string[]) => {
+        const index = _.indexOf(resp, bucket);
+        return observableOf(-1 !== index);
+      }));
   }
 }
index d3f9d9f65c40a02c0f4b3189168d5f5e2acb55e2..d031dde446f832fd99d4145d6b68ae66a8f6748c 100644 (file)
@@ -2,9 +2,8 @@ import { HttpClient, HttpParams } from '@angular/common/http';
 import { Injectable } from '@angular/core';
 
 import * as _ from 'lodash';
-import 'rxjs/add/observable/forkJoin';
-import 'rxjs/add/observable/of';
-import { Observable } from 'rxjs/Observable';
+import {forkJoin as observableForkJoin, of as observableOf } from 'rxjs';
+import { mergeMap } from 'rxjs/operators';
 
 @Injectable()
 export class RgwUserService {
@@ -17,16 +16,16 @@ export class RgwUserService {
    * @return {Observable<Object[]>}
    */
   list() {
-    return this.enumerate().flatMap((uids: string[]) => {
-      if (uids.length > 0) {
-        return Observable.forkJoin(
-          uids.map((uid: string) => {
-            return this.get(uid);
-          })
-        );
-      }
-      return Observable.of([]);
-    });
+    return this.enumerate().pipe(
+      mergeMap((uids: string[]) => {
+        if (uids.length > 0) {
+          return observableForkJoin(
+            uids.map((uid: string) => {
+              return this.get(uid);
+            }));
+        }
+        return observableOf([]);
+      }));
   }
 
   /**
@@ -161,9 +160,10 @@ export class RgwUserService {
    * @return {Observable<boolean>}
    */
   exists(uid: string) {
-    return this.enumerate().flatMap((resp: string[]) => {
-      const index = _.indexOf(resp, uid);
-      return Observable.of(-1 !== index);
-    });
+    return this.enumerate().pipe(
+      mergeMap((resp: string[]) => {
+        const index = _.indexOf(resp, uid);
+        return observableOf(-1 !== index);
+      }));
   }
 }
index 9ac9876826a81f89fd9087c29560a600b60e4225..84bdf0a9d5e8a5cf5fdbdb3247a6d57e8d3f4471 100644 (file)
@@ -3,8 +3,7 @@ import { async, ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core
 import { ReactiveFormsModule } from '@angular/forms';
 
 import { BsModalRef, BsModalService, ModalModule } from 'ngx-bootstrap';
-import { Observable } from 'rxjs/Observable';
-import { Subscriber } from 'rxjs/Subscriber';
+import { Observable, Subscriber, timer as observableTimer } from 'rxjs';
 
 import { ModalComponent } from '../modal/modal.component';
 import { DeletionModalComponent } from './deletion-modal.component';
@@ -76,7 +75,7 @@ class MockComponent {
   fakeDelete() {
     return (): Observable<any> => {
       return new Observable((observer: Subscriber<any>) => {
-        Observable.timer(100).subscribe(() => {
+        observableTimer(100).subscribe(() => {
           observer.next(this.finish());
           observer.complete();
         });
@@ -85,7 +84,7 @@ class MockComponent {
   }
 
   fakeDeleteController() {
-    Observable.timer(100).subscribe(() => {
+    observableTimer(100).subscribe(() => {
       this.finish();
       this.ctrlRef.hide();
     });
index d30d2e69e4ebb5166b92512de8b25925ee84cfd1..a4a9b34895428aa69e27801b4a2fd3ad38861837 100644 (file)
@@ -4,7 +4,7 @@ import {
 import { FormControl, FormGroup, Validators } from '@angular/forms';
 
 import { BsModalRef } from 'ngx-bootstrap';
-import { Observable } from 'rxjs/Observable';
+import { Observable } from 'rxjs';
 
 import { SubmitButtonComponent } from '../submit-button/submit-button.component';
 
index fe9035ad2b9374bc067be47c495d0cdf1a2fa749..d196125e8517b2d9879288162ffd79ff67aa23c2 100644 (file)
@@ -11,16 +11,15 @@ import {
   TemplateRef,
   ViewChild
 } from '@angular/core';
+
 import {
   DatatableComponent,
   SortDirection,
   SortPropDir,
   TableColumnProp
 } from '@swimlane/ngx-datatable';
-
 import * as _ from 'lodash';
-import 'rxjs/add/observable/timer';
-import { Observable } from 'rxjs/Observable';
+import { Observable, timer as observableTimer } from 'rxjs';
 
 import { CellTemplate } from '../../enum/cell-template.enum';
 import { CdTableColumn } from '../../models/cd-table-column';
@@ -48,15 +47,15 @@ export class TableComponent implements AfterContentChecked, OnInit, OnChanges, O
   // Each item -> { prop: 'attribute name', dir: 'asc'||'desc'}
   @Input() sorts?: SortPropDir[];
   // Method used for setting column widths.
-  @Input() columnMode ?= 'flex';
+  @Input() columnMode= 'flex';
   // Display the tool header, including reload button, pagination and search fields?
-  @Input() toolHeader ?= true;
+  @Input() toolHeader= true;
   // Display the table header?
-  @Input() header ?= true;
+  @Input() header= true;
   // Display the table footer?
-  @Input() footer ?= true;
+  @Input() footer= true;
   // Page size to show. Set to 0 to show unlimited number of rows.
-  @Input() limit ?= 10;
+  @Input() limit= 10;
 
   /**
    * Auto reload time in ms - per default every 5s
@@ -107,7 +106,7 @@ export class TableComponent implements AfterContentChecked, OnInit, OnChanges, O
 
   tableColumns: CdTableColumn[];
   cellTemplates: {
-    [key: string]: TemplateRef<any>
+    [key: string]: TemplateRef<any>;
   } = {};
   search = '';
   rows = [];
@@ -138,8 +137,9 @@ export class TableComponent implements AfterContentChecked, OnInit, OnChanges, O
       const exists = _.findIndex(this.columns, ['prop', this.identifier]) !== -1;
       // Auto-build the sorting configuration. If the specified identifier doesn't exist,
       // then use the property of the first column.
-      this.sorts = this.createSortingDefinition(exists ?
-        this.identifier : this.columns[0].prop + '');
+      this.sorts = this.createSortingDefinition(
+        exists ? this.identifier : this.columns[0].prop + ''
+      );
       // If the specified identifier doesn't exist and it is not forced to use it anyway,
       // then use the property of the first column.
       if (!exists && !this.forceIdentifier) {
@@ -147,7 +147,7 @@ export class TableComponent implements AfterContentChecked, OnInit, OnChanges, O
       }
     }
     this.initUserConfig();
-    this.columns.forEach(c => {
+    this.columns.forEach((c) => {
       if (c.cellTransformation) {
         c.cellTemplate = this.cellTemplates[c.cellTransformation];
       }
@@ -166,9 +166,9 @@ export class TableComponent implements AfterContentChecked, OnInit, OnChanges, O
     if (this.fetchData.observers.length > 0) {
       this.loadingIndicator = true;
     }
-    if (_.isInteger(this.autoReload) && (this.autoReload > 0)) {
+    if (_.isInteger(this.autoReload) && this.autoReload > 0) {
       this.ngZone.runOutsideAngular(() => {
-        this.reloadSubscriber = Observable.timer(0, this.autoReload).subscribe(x => {
+        this.reloadSubscriber = observableTimer(0, this.autoReload).subscribe((x) => {
           this.ngZone.run(() => {
             return this.reloadData();
           });
@@ -179,7 +179,7 @@ export class TableComponent implements AfterContentChecked, OnInit, OnChanges, O
     }
   }
 
-  initUserConfig () {
+  initUserConfig() {
     if (this.autoSave) {
       this.tableName = this._calculateUniqueTableName(this.columns);
       this._loadUserConfig();
@@ -200,7 +200,7 @@ export class TableComponent implements AfterContentChecked, OnInit, OnChanges, O
     }
   }
 
-  _calculateUniqueTableName (columns) {
+  _calculateUniqueTableName(columns) {
     const stringToNumber = (s) => {
       if (!_.isString(s)) {
         return 0;
@@ -211,12 +211,16 @@ export class TableComponent implements AfterContentChecked, OnInit, OnChanges, O
       }
       return result;
     };
-    return columns.reduce((result, value, index) =>
-      ((stringToNumber(value.prop) + stringToNumber(value.name)) * (index + 1)) + result,
-      0).toString();
+    return columns
+      .reduce(
+        (result, value, index) =>
+          (stringToNumber(value.prop) + stringToNumber(value.name)) * (index + 1) + result,
+        0
+      )
+      .toString();
   }
 
-  _loadUserConfig () {
+  _loadUserConfig() {
     const loaded = this.localStorage.getItem(this.tableName);
     if (loaded) {
       this.userConfig = JSON.parse(loaded);
@@ -228,7 +232,7 @@ export class TableComponent implements AfterContentChecked, OnInit, OnChanges, O
     this.saveSubscriber = source.subscribe(this._saveUserConfig.bind(this));
   }
 
-  _initUserConfigProxy (observer) {
+  _initUserConfigProxy(observer) {
     this.userConfig = new Proxy(this.userConfig, {
       set(config, prop, value) {
         config[prop] = value;
@@ -238,20 +242,20 @@ export class TableComponent implements AfterContentChecked, OnInit, OnChanges, O
     });
   }
 
-  _saveUserConfig (config) {
+  _saveUserConfig(config) {
     this.localStorage.setItem(this.tableName, JSON.stringify(config));
   }
 
-  updateUserColumns () {
-    this.userConfig.columns = this.columns.map(c => ({
+  updateUserColumns() {
+    this.userConfig.columns = this.columns.map((c) => ({
       prop: c.prop,
       name: c.name,
       isHidden: !!c.isHidden
     }));
   }
 
-  filterHiddenColumns () {
-    this.tableColumns = this.columns.filter(c => !c.isHidden);
+  filterHiddenColumns() {
+    this.tableColumns = this.columns.filter((c) => !c.isHidden);
   }
 
   ngOnDestroy() {
@@ -302,7 +306,7 @@ export class TableComponent implements AfterContentChecked, OnInit, OnChanges, O
     }
   }
 
-  refreshBtn () {
+  refreshBtn() {
     this.loadingIndicator = true;
     this.reloadData();
   }
@@ -366,18 +370,18 @@ export class TableComponent implements AfterContentChecked, OnInit, OnChanges, O
     this.updateColumns();
   }
 
-  updateColumns () {
+  updateColumns() {
     this.updateUserColumns();
     this.filterHiddenColumns();
     const sortProp = this.userConfig.sorts[0].prop;
     if (!_.find(this.tableColumns, (c: CdTableColumn) => c.prop === sortProp)) {
       this.userConfig.sorts = this.createSortingDefinition(this.tableColumns[0].prop);
-      this.table.onColumnSort({sorts: this.userConfig.sorts});
+      this.table.onColumnSort({ sorts: this.userConfig.sorts });
     }
     this.table.recalculate();
   }
 
-  createSortingDefinition (prop: TableColumnProp): SortPropDir[] {
+  createSortingDefinition(prop: TableColumnProp): SortPropDir[] {
     return [
       {
         prop: prop,
@@ -386,7 +390,7 @@ export class TableComponent implements AfterContentChecked, OnInit, OnChanges, O
     ];
   }
 
-  changeSorting ({sorts}) {
+  changeSorting({ sorts }) {
     this.userConfig.sorts = sorts;
   }
 
@@ -395,23 +399,26 @@ export class TableComponent implements AfterContentChecked, OnInit, OnChanges, O
       this.search = '';
     }
     let search = this.search.toLowerCase().replace(/,/g, '');
-    const columns = this.columns.filter(c => c.cellTransformation !== CellTemplate.sparkline);
+    const columns = this.columns.filter((c) => c.cellTransformation !== CellTemplate.sparkline);
     if (search.match(/['"][^'"]+['"]/)) {
       search = search.replace(/['"][^'"]+['"]/g, (match: string) => {
         return match.replace(/(['"])([^'"]+)(['"])/g, '$2').replace(/ /g, '+');
       });
     }
     // update the rows
-    this.rows = this.subSearch(this.data, search.split(' ').filter(s => s.length > 0), columns);
+    this.rows = this.subSearch(this.data, search.split(' ').filter((s) => s.length > 0), columns);
     // Whenever the filter changes, always go back to the first page
     this.table.offset = 0;
   }
 
-  subSearch (data: any[], currentSearch: string[], columns: CdTableColumn[]) {
+  subSearch(data: any[], currentSearch: string[], columns: CdTableColumn[]) {
     if (currentSearch.length === 0 || data.length === 0) {
       return data;
     }
-    const searchTerms: string[] = currentSearch.pop().replace('+', ' ').split(':');
+    const searchTerms: string[] = currentSearch
+      .pop()
+      .replace('+', ' ')
+      .split(':');
     const columnsClone = [...columns];
     const dataClone = [...data];
     const filterColumns = (columnName: string) =>
@@ -432,22 +439,24 @@ export class TableComponent implements AfterContentChecked, OnInit, OnChanges, O
     if (searchTerm.length === 0) {
       return data;
     }
-    return data.filter(d => {
-      return columns.filter(c => {
-        let cellValue: any = _.get(d, c.prop);
-        if (!_.isUndefined(c.pipe)) {
-          cellValue = c.pipe.transform(cellValue);
-        }
-        if (_.isUndefined(cellValue)) {
-          return;
-        }
-        if (_.isArray(cellValue)) {
-          cellValue = cellValue.join(' ');
-        } else if (_.isNumber(cellValue) || _.isBoolean(cellValue)) {
-          cellValue = cellValue.toString();
-        }
-        return cellValue.toLowerCase().indexOf(searchTerm) !== -1;
-      }).length > 0;
+    return data.filter((d) => {
+      return (
+        columns.filter((c) => {
+          let cellValue: any = _.get(d, c.prop);
+          if (!_.isUndefined(c.pipe)) {
+            cellValue = c.pipe.transform(cellValue);
+          }
+          if (_.isUndefined(cellValue)) {
+            return;
+          }
+          if (_.isArray(cellValue)) {
+            cellValue = cellValue.join(' ');
+          } else if (_.isNumber(cellValue) || _.isBoolean(cellValue)) {
+            cellValue = cellValue.toString();
+          }
+          return cellValue.toLowerCase().indexOf(searchTerm) !== -1;
+        }).length > 0
+      );
     });
   }
 
index 40fae89b00ae7382fbb0649e429a04b83000c7fe..b706cd55d4f8fe604587504eeb5613fc166998f5 100644 (file)
@@ -9,9 +9,8 @@ import { Injectable } from '@angular/core';
 import { Router } from '@angular/router';
 
 import * as _ from 'lodash';
-import 'rxjs/add/observable/throw';
-import 'rxjs/add/operator/catch';
-import { Observable } from 'rxjs/Observable';
+import { Observable, throwError as observableThrowError } from 'rxjs';
+import { catchError } from 'rxjs/operators';
 
 import { NotificationType } from '../enum/notification-type.enum';
 import { FinishedTask } from '../models/finished-task';
@@ -20,71 +19,76 @@ import { NotificationService } from './notification.service';
 
 @Injectable()
 export class ApiInterceptorService implements HttpInterceptor {
-
-  constructor(private router: Router,
-              private authStorageService: AuthStorageService,
-              public notificationService: NotificationService) {}
+  constructor(
+    private router: Router,
+    private authStorageService: AuthStorageService,
+    public notificationService: NotificationService
+  ) {}
 
   intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
-    return next.handle(request).catch((resp) => {
-      if (resp instanceof HttpErrorResponse) {
-        let showNotification = true;
-        switch (resp.status) {
-          case 400:
-            const finishedTask = new FinishedTask();
+    return next.handle(request).pipe(
+      catchError((resp) => {
+        if (resp instanceof HttpErrorResponse) {
+          let showNotification = true;
+          switch (resp.status) {
+            case 400:
+              const finishedTask = new FinishedTask();
 
-            const task = resp.error.task;
-            if (_.isPlainObject(task)) {
-              task.metadata.component = task.metadata.component || resp.error.component;
+              const task = resp.error.task;
+              if (_.isPlainObject(task)) {
+                task.metadata.component = task.metadata.component || resp.error.component;
 
-              finishedTask.name = task.name;
-              finishedTask.metadata = task.metadata;
-            } else {
-              finishedTask.metadata = resp.error;
-            }
+                finishedTask.name = task.name;
+                finishedTask.metadata = task.metadata;
+              } else {
+                finishedTask.metadata = resp.error;
+              }
 
-            finishedTask.success = false;
-            finishedTask.exception = resp.error;
-            this.notificationService.notifyTask(finishedTask);
-            showNotification = false;
-            break;
-          case 401:
-            this.authStorageService.remove();
-            this.router.navigate(['/login']);
-            break;
-          case 404:
-            this.router.navigate(['/404']);
-            break;
-        }
+              finishedTask.success = false;
+              finishedTask.exception = resp.error;
+              this.notificationService.notifyTask(finishedTask);
+              showNotification = false;
+              break;
+            case 401:
+              this.authStorageService.remove();
+              this.router.navigate(['/login']);
+              break;
+            case 404:
+              this.router.navigate(['/404']);
+              break;
+          }
 
-        let timeoutId;
-        if (showNotification) {
-          timeoutId = this.notificationService.show(NotificationType.error,
-            resp.error.detail || '',
-            `${resp.status} - ${resp.statusText}`);
-        }
+          let timeoutId;
+          if (showNotification) {
+            timeoutId = this.notificationService.show(
+              NotificationType.error,
+              resp.error.detail || '',
+              `${resp.status} - ${resp.statusText}`
+            );
+          }
 
-        /**
-         * Decorated preventDefault method (in case error previously had
-         * preventDefault method defined). If called, it will prevent a
-         * notification to be shown.
-         */
-        resp['preventDefault'] = () => {
-          this.notificationService.cancel(timeoutId);
-        };
+          /**
+           * Decorated preventDefault method (in case error previously had
+           * preventDefault method defined). If called, it will prevent a
+           * notification to be shown.
+           */
+          resp['preventDefault'] = () => {
+            this.notificationService.cancel(timeoutId);
+          };
 
-        /**
-         * If called, it will prevent a notification for the specific status code.
-         * @param {number} status The status code to be ignored.
-         */
-        resp['ignoreStatusCode'] = function(status: number) {
-          if (this.status === status) {
-            this.preventDefault();
-          }
-        };
-      }
-      // Return the error to the method that called it.
-      return Observable.throw(resp);
-    });
+          /**
+           * If called, it will prevent a notification for the specific status code.
+           * @param {number} status The status code to be ignored.
+           */
+          resp['ignoreStatusCode'] = function(status: number) {
+            if (this.status === status) {
+              this.preventDefault();
+            }
+          };
+        }
+        // Return the error to the method that called it.
+        return observableThrowError(resp);
+      })
+    );
   }
 }
index 6ffe06433f80aa3118229bd6c28c1e510debb132..e1b2596870835cca8d60bfb341cebe5459ca4144 100644 (file)
@@ -4,8 +4,7 @@ import { fakeAsync, TestBed, tick } from '@angular/core/testing';
 import { ActivatedRouteSnapshot, Router, Routes } from '@angular/router';
 import { RouterTestingModule } from '@angular/router/testing';
 
-import 'rxjs/add/observable/of';
-import { Observable } from 'rxjs/Observable';
+import { of as observableOf } from 'rxjs';
 
 import { ModuleStatusGuardService } from './module-status-guard.service';
 
@@ -47,7 +46,7 @@ describe('ModuleStatusGuardService', () => {
         }
       };
       const httpClient = TestBed.get(HttpClient);
-      spyOn(httpClient, 'get').and.returnValue(Observable.of({ available: true, message: 'foo' }));
+      spyOn(httpClient, 'get').and.returnValue(observableOf({ available: true, message: 'foo' }));
       service.canActivate(route, null).subscribe((resp) => {
         result = resp;
       });
@@ -70,7 +69,7 @@ describe('ModuleStatusGuardService', () => {
       };
       const httpClient = TestBed.get(HttpClient);
       const router = TestBed.get(Router);
-      spyOn(httpClient, 'get').and.returnValue(Observable.of({ available: false, message: null }));
+      spyOn(httpClient, 'get').and.returnValue(observableOf({ available: false, message: null }));
       service.canActivateChild(route, null).subscribe((resp) => {
         result = resp;
       });
@@ -94,7 +93,7 @@ describe('ModuleStatusGuardService', () => {
       };
       const httpClient = TestBed.get(HttpClient);
       const router = TestBed.get(Router);
-      spyOn(httpClient, 'get').and.returnValue(Observable.of(null));
+      spyOn(httpClient, 'get').and.returnValue(observableOf(null));
       service.canActivateChild(route, null).subscribe((resp) => {
         result = resp;
       });
index 8ef40c416396cb8794f9898198f837cd3cdfea49..a70e75d6fcde0def8428f880ebdc6de1538c0efc 100644 (file)
@@ -8,9 +8,8 @@ import {
   RouterStateSnapshot
 } from '@angular/router';
 
-import 'rxjs/add/observable/of';
-import 'rxjs/add/operator/catch';
-import { Observable } from 'rxjs/Observable';
+import { of as observableOf } from 'rxjs';
+import { catchError, map } from 'rxjs/operators';
 
 /**
  * This service checks if a route can be activated by executing a
@@ -51,17 +50,17 @@ export class ModuleStatusGuardService implements CanActivate, CanActivateChild {
 
   private doCheck(route: ActivatedRouteSnapshot) {
     const config = route.data['moduleStatusGuardConfig'];
-    return this.http
-      .get(`/api/${config.apiPath}/status`)
-      .map((resp: any) => {
+    return this.http.get(`/api/${config.apiPath}/status`).pipe(
+      map((resp: any) => {
         if (!resp.available) {
           this.router.navigate([config.redirectTo, resp.message || '']);
         }
         return resp.available;
-      })
-      .catch(() => {
+      }),
+      catchError(() => {
         this.router.navigate([config.redirectTo]);
-        return Observable.of(false);
-      });
+        return observableOf(false);
+      })
+    );
   }
 }
index a80d259303134f5be0bd49c4e496bd8324ba3c86..d698ee4a73911b9784614be8de4c2ccb7cd0acbd 100644 (file)
@@ -2,7 +2,7 @@ import { Injectable } from '@angular/core';
 
 import * as _ from 'lodash';
 import { ToastsManager } from 'ng2-toastr';
-import { BehaviorSubject } from 'rxjs/BehaviorSubject';
+import { BehaviorSubject } from 'rxjs';
 
 import { NotificationType } from '../enum/notification-type.enum';
 import { CdNotification } from '../models/cd-notification';
index 697e9401a084bdae62a218493db153a56a9b89ee..269278ab8635942aa174ea2e0d5a46085351e4a5 100644 (file)
@@ -1,8 +1,7 @@
 import { HttpClient } from '@angular/common/http';
 import { fakeAsync, TestBed, tick } from '@angular/core/testing';
 
-import 'rxjs/add/observable/of';
-import { Observable } from 'rxjs/Observable';
+import { of as observableOf } from 'rxjs';
 
 import { AuthStorageService } from './auth-storage.service';
 import { SummaryService } from './summary.service';
@@ -13,7 +12,7 @@ describe('SummaryService', () => {
 
   const httpClientSpy = {
     get: () =>
-      Observable.of({
+      observableOf({
         executing_tasks: [],
         health_status: 'HEALTH_OK',
         mgr_id: 'x',
@@ -42,18 +41,21 @@ describe('SummaryService', () => {
     expect(summaryService).toBeTruthy();
   });
 
-  it('should call refresh', fakeAsync(() => {
-    authStorageService.set('foobar');
-    let result = false;
-    summaryService.refresh();
-    summaryService.summaryData$.subscribe((res) => {
-      result = true;
-    });
-    tick(5000);
-    spyOn(summaryService, 'refresh').and.callFake(() => true);
-    tick(5000);
-    expect(result).toEqual(true);
-  }));
+  it(
+    'should call refresh',
+    fakeAsync(() => {
+      authStorageService.set('foobar');
+      let result = false;
+      summaryService.refresh();
+      summaryService.summaryData$.subscribe((res) => {
+        result = true;
+      });
+      tick(5000);
+      spyOn(summaryService, 'refresh').and.callFake(() => true);
+      tick(5000);
+      expect(result).toEqual(true);
+    })
+  );
 
   it('should get summary', () => {
     expect(summaryService.get()).toEqual(jasmine.any(Object));
index a6fb493bcc6d3abda2bb75757db46b6470d96ef4..b597fb96c1adb0ca5208e28cec42c2844c63c875 100644 (file)
@@ -1,7 +1,7 @@
 import { HttpClient } from '@angular/common/http';
 import { Injectable, NgZone } from '@angular/core';
 
-import { Subject } from 'rxjs/Subject';
+import { Subject } from 'rxjs';
 
 import { AuthStorageService } from './auth-storage.service';
 
index 1daa3044c3c8cee0a21750e21df7017d901b1dc2..f57b5adb682ce8b5d9b53cb4160ed9e6afe875eb 100644 (file)
@@ -1,8 +1,7 @@
 import { fakeAsync, TestBed, tick } from '@angular/core/testing';
 
 import * as _ from 'lodash';
-import 'rxjs/add/observable/of';
-import { Subject } from 'rxjs/Subject';
+import { Subject } from 'rxjs';
 
 import { SummaryService } from './summary.service';
 import { TaskManagerService } from './task-manager.service';
index c5e3f7e8de055f7c21429a92e4068eeeaacdd5ff..f695767e6075be4b062d34ad4c7bbd58f061e697 100644 (file)
@@ -1,12 +1,4 @@
 import 'jest-preset-angular';
 import 'jest-zone-patch';
 
-// common rxjs imports
-import 'rxjs/add/observable/throw';
-import 'rxjs/add/operator/catch';
-import 'rxjs/add/operator/do';
-import 'rxjs/add/operator/map';
-import 'rxjs/add/operator/switchMap';
-// ...
-
 import './jestGlobalMocks';
index d915d4d8fe19e5f29795afc2281e27fe9a1d1916..7b1536d7e940e3bded5181d49e36ea78ff0f8d33 100644 (file)
     "curly": true,
     "eofline": true,
     "forin": true,
-    "import-blacklist": [true, "rxjs", "rxjs/Rx"],
+    "import-blacklist": [
+      true,
+      "rxjs/Rx"
+    ],
     "import-spacing": true,
     "indent": [true, "spaces"],
     "interface-over-type-literal": true,