]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/dashboard: Add 'no-unused-variable' rule to tslint
authorTiago Melo <tmelo@suse.com>
Wed, 30 May 2018 15:04:01 +0000 (16:04 +0100)
committerTiago Melo <tmelo@suse.com>
Sat, 2 Jun 2018 21:22:56 +0000 (22:22 +0100)
Signed-off-by: Tiago Melo <tmelo@suse.com>
22 files changed:
src/pybind/mgr/dashboard/frontend/src/app/app.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/mirroring.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-list/rbd-snapshot-list.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-list/cephfs-list.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health-pie/health-pie.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/mds-summary.pipe.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-list/pool-list.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-501/rgw-501.component.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-list/rgw-user-list.component.ts
src/pybind/mgr/dashboard/frontend/src/app/core/auth/login/login.component.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/api/configuration.service.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/api/dashboard.service.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/api/monitor.service.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/api/rbd-mirroring.service.spec.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/modal/modal.component.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/components/usage-bar/usage-bar.component.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/models/chart-tooltip.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/services/task-manager.service.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/services/task-manager.service.ts
src/pybind/mgr/dashboard/frontend/tslint.json

index c9e0e7e8773b3057836d9194816038c5d2c8fffa..9f5024eb621588b5ade9c2959cc788482104c371 100644 (file)
@@ -13,15 +13,16 @@ import { AuthStorageService } from './shared/services/auth-storage.service';
 export class AppComponent {
   title = 'cd';
 
-  constructor(private authStorageService: AuthStorageService,
-              private router: Router,
-              public toastr: ToastsManager,
-              private vcr: ViewContainerRef) {
-    this.toastr.setRootViewContainerRef(vcr);
+  constructor(
+    private authStorageService: AuthStorageService,
+    private router: Router,
+    public toastr: ToastsManager,
+    private vcr: ViewContainerRef
+  ) {
+    this.toastr.setRootViewContainerRef(this.vcr);
   }
 
   isLoginActive() {
     return this.router.url === '/login' || !this.authStorageService.isLoggedIn();
   }
-
 }
index 74de5628536db714022b3cd12ea053abee9b32e9..bf4a68c947234fc03d3d4798fe3717da459ff8d3 100644 (file)
@@ -1,8 +1,5 @@
-import { HttpClient } from '@angular/common/http';
 import { Component, OnInit, TemplateRef, ViewChild } from '@angular/core';
 
-import * as _ from 'lodash';
-
 import { RbdMirroringService } from '../../../shared/api/rbd-mirroring.service';
 import { ViewCacheStatus } from '../../../shared/enum/view-cache-status.enum';
 import { CephShortVersionPipe } from '../../../shared/pipes/ceph-short-version.pipe';
@@ -43,10 +40,9 @@ export class MirroringComponent implements OnInit {
   };
 
   constructor(
-    private http: HttpClient,
     private rbdMirroringService: RbdMirroringService,
     private cephShortVersionPipe: CephShortVersionPipe
-  ) { }
+  ) {}
 
   ngOnInit() {
     this.daemons.columns = [
index dae781dc1537d9e0366c092f9f768201d47028f6..2e3ecbaec5514aa80b63e245b449eda1cc5afe8f 100644 (file)
@@ -1,22 +1,10 @@
-import {
-  Component,
-  Input,
-  OnChanges,
-  OnInit,
-  TemplateRef,
-  ViewChild
-} from '@angular/core';
+import { Component, Input, OnChanges, OnInit, TemplateRef, ViewChild } from '@angular/core';
 
 import * as _ from 'lodash';
-import { ToastsManager } from 'ng2-toastr';
 import { BsModalRef, BsModalService } from 'ngx-bootstrap';
 
-import {
-  RbdService
-} from '../../../shared/api/rbd.service';
-import {
-  DeletionModalComponent
-} from '../../../shared/components/deletion-modal/deletion-modal.component';
+import { RbdService } from '../../../shared/api/rbd.service';
+import { DeletionModalComponent } from '../../../shared/components/deletion-modal/deletion-modal.component';
 import { CellTemplate } from '../../../shared/enum/cell-template.enum';
 import { CdTableColumn } from '../../../shared/models/cd-table-column';
 import { CdTableSelection } from '../../../shared/models/cd-table-selection';
@@ -24,14 +12,10 @@ import { ExecutingTask } from '../../../shared/models/executing-task';
 import { FinishedTask } from '../../../shared/models/finished-task';
 import { CdDatePipe } from '../../../shared/pipes/cd-date.pipe';
 import { DimlessBinaryPipe } from '../../../shared/pipes/dimless-binary.pipe';
-import {
-  NotificationService
-} from '../../../shared/services/notification.service';
+import { NotificationService } from '../../../shared/services/notification.service';
 import { TaskManagerService } from '../../../shared/services/task-manager.service';
 import { RbdSnapshotFormComponent } from '../rbd-snapshot-form/rbd-snapshot-form.component';
-import {
-  RollbackConfirmationModalComponent
-} from '../rollback-confirmation-modal/rollback-confimation-modal.component';
+import { RollbackConfirmationModalComponent } from '../rollback-confirmation-modal/rollback-confimation-modal.component';
 import { RbdSnapshotModel } from './rbd-snapshot.model';
 
 @Component({
@@ -40,7 +24,6 @@ import { RbdSnapshotModel } from './rbd-snapshot.model';
   styleUrls: ['./rbd-snapshot-list.component.scss']
 })
 export class RbdSnapshotListComponent implements OnInit, OnChanges {
-
   @Input() snapshots: RbdSnapshotModel[] = [];
   @Input() poolName: string;
   @Input() rbdName: string;
@@ -57,13 +40,14 @@ export class RbdSnapshotListComponent implements OnInit, OnChanges {
 
   selection = new CdTableSelection();
 
-  constructor(private modalService: BsModalService,
-              private dimlessBinaryPipe: DimlessBinaryPipe,
-              private cdDatePipe: CdDatePipe,
-              private rbdService: RbdService,
-              private toastr: ToastsManager,
-              private taskManagerService: TaskManagerService,
-              private notificationService: NotificationService) { }
+  constructor(
+    private modalService: BsModalService,
+    private dimlessBinaryPipe: DimlessBinaryPipe,
+    private cdDatePipe: CdDatePipe,
+    private rbdService: RbdService,
+    private taskManagerService: TaskManagerService,
+    private notificationService: NotificationService
+  ) {}
 
   ngOnInit() {
     this.columns = [
@@ -116,10 +100,8 @@ export class RbdSnapshotListComponent implements OnInit, OnChanges {
       if (snapshotExecuting) {
         if (executingTask.name === 'rbd/snap/delete') {
           snapshotExecuting.cdExecuting = 'deleting';
-
         } else if (executingTask.name === 'rbd/snap/edit') {
           snapshotExecuting.cdExecuting = 'updating';
-
         } else if (executingTask.name === 'rbd/snap/rollback') {
           snapshotExecuting.cdExecuting = 'rolling back';
         }
@@ -152,7 +134,7 @@ export class RbdSnapshotListComponent implements OnInit, OnChanges {
     this.modalRef.content.onSubmit.subscribe((snapshotName: string) => {
       const executingTask = new ExecutingTask();
       executingTask.name = taskName;
-      executingTask.metadata = {'snapshot_name': snapshotName};
+      executingTask.metadata = { snapshot_name: snapshotName };
       this.executingTasks.push(executingTask);
       this.ngOnChanges();
     });
@@ -172,21 +154,26 @@ export class RbdSnapshotListComponent implements OnInit, OnChanges {
     const finishedTask = new FinishedTask();
     finishedTask.name = 'rbd/snap/edit';
     finishedTask.metadata = {
-      'pool_name': this.poolName,
-      'image_name': this.rbdName,
-      'snapshot_name': snapshotName
+      pool_name: this.poolName,
+      image_name: this.rbdName,
+      snapshot_name: snapshotName
     };
-    this.rbdService.protectSnapshot(this.poolName, this.rbdName, snapshotName, !isProtected)
-      .toPromise().then((resp) => {
+    this.rbdService
+      .protectSnapshot(this.poolName, this.rbdName, snapshotName, !isProtected)
+      .toPromise()
+      .then((resp) => {
         const executingTask = new ExecutingTask();
         executingTask.name = finishedTask.name;
         executingTask.metadata = finishedTask.metadata;
         this.executingTasks.push(executingTask);
         this.ngOnChanges();
-        this.taskManagerService.subscribe(finishedTask.name, finishedTask.metadata,
+        this.taskManagerService.subscribe(
+          finishedTask.name,
+          finishedTask.metadata,
           (asyncFinishedTask: FinishedTask) => {
             this.notificationService.notifyTask(asyncFinishedTask);
-          });
+          }
+        );
       });
   }
 
@@ -194,22 +181,26 @@ export class RbdSnapshotListComponent implements OnInit, OnChanges {
     const finishedTask = new FinishedTask();
     finishedTask.name = taskName;
     finishedTask.metadata = {
-      'pool_name': this.poolName,
-      'image_name': this.rbdName,
-      'snapshot_name': snapshotName
+      pool_name: this.poolName,
+      image_name: this.rbdName,
+      snapshot_name: snapshotName
     };
     this.rbdService[task](this.poolName, this.rbdName, snapshotName)
-      .toPromise().then(() => {
+      .toPromise()
+      .then(() => {
         const executingTask = new ExecutingTask();
         executingTask.name = finishedTask.name;
         executingTask.metadata = finishedTask.metadata;
         this.executingTasks.push(executingTask);
         this.modalRef.hide();
         this.ngOnChanges();
-        this.taskManagerService.subscribe(executingTask.name, executingTask.metadata,
+        this.taskManagerService.subscribe(
+          executingTask.name,
+          executingTask.metadata,
           (asyncFinishedTask: FinishedTask) => {
             this.notificationService.notifyTask(asyncFinishedTask);
-          });
+          }
+        );
       })
       .catch((resp) => {
         this.modalRef.content.stopLoadingSpinner();
index d6ac4d1db21536a6882eb55f43aca898f239fb96..b95b7a5469d4790d4d59e366e3b3ab7b80ccbd5a 100644 (file)
@@ -1,7 +1,5 @@
 import { Component, OnInit } from '@angular/core';
 
-import * as _ from 'lodash';
-
 import { CephfsService } from '../../../shared/api/cephfs.service';
 import { CdTableColumn } from '../../../shared/models/cd-table-column';
 import { CdTableSelection } from '../../../shared/models/cd-table-selection';
index 196d871066ac95441048c7aa9372771d9843c3e7..92c2b983371bb7c7c1837294f0a0acc9b6784462 100644 (file)
@@ -10,7 +10,6 @@ import {
 } from '@angular/core';
 
 import * as Chart from 'chart.js';
-import * as _ from 'lodash';
 
 import { ChartTooltip } from '../../../shared/models/chart-tooltip';
 import { DimlessBinaryPipe } from '../../../shared/pipes/dimless-binary.pipe';
@@ -99,11 +98,10 @@ export class HealthPieComponent implements OnChanges, OnInit {
       this.chartCanvasRef,
       this.chartTooltipRef,
       getStyleLeft,
-      getStyleTop,
+      getStyleTop
     );
     chartTooltip.getBody = getBody;
 
-    const self = this;
     this.chart.options.tooltips.custom = (tooltip) => {
       chartTooltip.customTooltips(tooltip);
     };
index ce9e045f08e5964552b000028bdde0739ae2b8c5..bbf33b5ac9a0c812edb3559e7007e9bf6bfa1b85 100644 (file)
@@ -12,7 +12,6 @@ describe('MdsSummaryPipe', () => {
       standbys: [0],
       filesystems: [{ mdsmap: { info: [{ state: 'up:standby-replay' }] } }]
     };
-    const result = { color: '#FF2222' };
     expect(pipe.transform(value)).toBe('0 active, 2 standby');
   });
 
@@ -21,7 +20,6 @@ describe('MdsSummaryPipe', () => {
       standbys: [0],
       filesystems: [{ mdsmap: { info: [{ state: 'up:active' }] } }]
     };
-    const result = { color: '#FF2222' };
     expect(pipe.transform(value)).toBe('1 active, 1 standby');
   });
 
index 45857a69f0b1e518865c614a001e83eefe3ca771..1e449b0943402bbf99e5f0be1bc23996f669d5ad 100644 (file)
@@ -10,8 +10,6 @@ describe('PoolListComponent', () => {
   let component: PoolListComponent;
   let fixture: ComponentFixture<PoolListComponent>;
 
-  const fakeService = {};
-
   beforeEach(async(() => {
     TestBed.configureTestingModule({
       declarations: [PoolListComponent],
index d25ac7ba697363752148b368482b8d3437b765fa..77bea30a6be1e6f7f35f7f96664bbbfd0b9003c9 100644 (file)
@@ -1,8 +1,6 @@
 import { Component, OnDestroy, OnInit } from '@angular/core';
 import { ActivatedRoute } from '@angular/router';
 
-import * as _ from 'lodash';
-
 @Component({
   selector: 'cd-rgw-501',
   templateUrl: './rgw-501.component.html',
index 82e32c050fb27768d5d3d2c92866d14f269ba543..3628460800fd1eacaef229282de48a1006f6b811 100644 (file)
@@ -1,5 +1,4 @@
 import { Component, ViewChild } from '@angular/core';
-import { Router } from '@angular/router';
 
 import { BsModalService } from 'ngx-bootstrap';
 import 'rxjs/add/observable/forkJoin';
@@ -24,11 +23,7 @@ export class RgwBucketListComponent {
   buckets: object[] = [];
   selection: CdTableSelection = new CdTableSelection();
 
-  constructor(
-    private router: Router,
-    private rgwBucketService: RgwBucketService,
-    private bsModalService: BsModalService
-  ) {
+  constructor(private rgwBucketService: RgwBucketService, private bsModalService: BsModalService) {
     this.columns = [
       {
         name: 'Name',
index 70c4d9142b25e0e3e6bb2290e65b297d367f1b3d..8c9376fdfb4e00f37ab058e9643386391f13620f 100644 (file)
@@ -1,5 +1,4 @@
 import { Component, ViewChild } from '@angular/core';
-import { Router } from '@angular/router';
 
 import { BsModalService } from 'ngx-bootstrap';
 import 'rxjs/add/observable/forkJoin';
@@ -25,11 +24,7 @@ export class RgwUserListComponent {
   users: object[] = [];
   selection: CdTableSelection = new CdTableSelection();
 
-  constructor(
-    private router: Router,
-    private rgwUserService: RgwUserService,
-    private bsModalService: BsModalService
-  ) {
+  constructor(private rgwUserService: RgwUserService, private bsModalService: BsModalService) {
     this.columns = [
       {
         name: 'Username',
index 4147af81398015bdded1378d4ef8db18d108b8be..a1ff473e80c7c2ea5a3cbec4d5fbdcd26511acfe 100644 (file)
@@ -1,4 +1,4 @@
-import { Component, OnInit, ViewContainerRef } from '@angular/core';
+import { Component, OnInit } from '@angular/core';
 import { Router } from '@angular/router';
 
 import { AuthService } from '../../../shared/api/auth.service';
@@ -11,13 +11,13 @@ import { AuthStorageService } from '../../../shared/services/auth-storage.servic
   styleUrls: ['./login.component.scss']
 })
 export class LoginComponent implements OnInit {
-
   model = new Credentials();
 
-  constructor(private authService: AuthService,
-              private authStorageService: AuthStorageService,
-              private router: Router) {
-  }
+  constructor(
+    private authService: AuthService,
+    private authStorageService: AuthStorageService,
+    private router: Router
+  ) {}
 
   ngOnInit() {
     if (this.authStorageService.isLoggedIn()) {
index dcb5a9e10b9f3148bfd946029b8b4154a59de2e5..63381cfa28e4b9a27fe48dbcda1bcfd3eb0f07ec 100644 (file)
@@ -1,5 +1,5 @@
 import { HttpClientModule } from '@angular/common/http';
-import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
+import { HttpClientTestingModule } from '@angular/common/http/testing';
 import { inject, TestBed } from '@angular/core/testing';
 
 import { ConfigurationService } from './configuration.service';
index bf061e9f6452e18c83410d3a34752b2775fda315..f84b856020c01f85befff642fb92e2cfdd9dd9a3 100644 (file)
@@ -1,9 +1,7 @@
 import { HttpClientModule } from '@angular/common/http';
-import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
+import { HttpClientTestingModule } from '@angular/common/http/testing';
 import { inject, TestBed } from '@angular/core/testing';
 
-import { appendFile } from 'fs';
-
 import { DashboardService } from './dashboard.service';
 
 describe('DashboardService', () => {
index 1d5f7de97b77e98251a5f8c385225a3b05bcb688..53ca7212bab7f793c60825a7f71a373d50c016c5 100644 (file)
@@ -1,8 +1,5 @@
 import { HttpClientModule } from '@angular/common/http';
-import {
-  HttpClientTestingModule,
-  HttpTestingController
-} from '@angular/common/http/testing';
+import { HttpClientTestingModule } from '@angular/common/http/testing';
 import { inject, TestBed } from '@angular/core/testing';
 
 import { MonitorService } from './monitor.service';
@@ -15,7 +12,10 @@ describe('MonitorService', () => {
     });
   });
 
-  it('should be created', inject([MonitorService], (service: MonitorService) => {
-    expect(service).toBeTruthy();
-  }));
+  it(
+    'should be created',
+    inject([MonitorService], (service: MonitorService) => {
+      expect(service).toBeTruthy();
+    })
+  );
 });
index 0f598318a31dd4b5b48124a082483edbfe10c5e9..832b1a657c0d65aa2edaab180cb3c25237ec2a79 100644 (file)
@@ -1,5 +1,5 @@
 import { HttpClientModule } from '@angular/common/http';
-import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
+import { HttpClientTestingModule } from '@angular/common/http/testing';
 import { inject, TestBed } from '@angular/core/testing';
 
 import { RbdMirroringService } from './rbd-mirroring.service';
@@ -12,7 +12,10 @@ describe('RbdMirroringService', () => {
     });
   });
 
-  it('should be created', inject([RbdMirroringService], (service: RbdMirroringService) => {
-    expect(service).toBeTruthy();
-  }));
+  it(
+    'should be created',
+    inject([RbdMirroringService], (service: RbdMirroringService) => {
+      expect(service).toBeTruthy();
+    })
+  );
 });
index 9ac9876826a81f89fd9087c29560a600b60e4225..0781275be578481e61c707bc5eb6a1f9660cd6b5 100644 (file)
@@ -6,7 +6,6 @@ import { BsModalRef, BsModalService, ModalModule } from 'ngx-bootstrap';
 import { Observable } from 'rxjs/Observable';
 import { Subscriber } from 'rxjs/Subscriber';
 
-import { ModalComponent } from '../modal/modal.component';
 import { DeletionModalComponent } from './deletion-modal.component';
 
 @NgModule({
index 9a748329cd26ad4af31e1e7a69b107ee1ed82d7c..23e0455838a95fd4236aa05568bf94279fe07876 100644 (file)
@@ -1,6 +1,5 @@
-import { Component, Input, TemplateRef } from '@angular/core';
+import { Component, Input } from '@angular/core';
 
-import { BsModalService } from 'ngx-bootstrap/modal';
 import { BsModalRef } from 'ngx-bootstrap/modal/bs-modal-ref.service';
 
 @Component({
@@ -11,5 +10,5 @@ import { BsModalRef } from 'ngx-bootstrap/modal/bs-modal-ref.service';
 export class ModalComponent {
   @Input() modalRef: BsModalRef;
 
-  constructor(private modalService: BsModalService) {}
+  constructor() {}
 }
index 35d6f3e593a8c2a852e14ddb118305d2f8600fa3..69f1bbafe84577e620676604418d741c40cdd07e 100644 (file)
@@ -1,4 +1,4 @@
-import { Component, Input, OnChanges, OnInit } from '@angular/core';
+import { Component, Input, OnChanges } from '@angular/core';
 
 @Component({
   selector: 'cd-usage-bar',
@@ -6,7 +6,6 @@ import { Component, Input, OnChanges, OnInit } from '@angular/core';
   styleUrls: ['./usage-bar.component.scss']
 })
 export class UsageBarComponent implements OnChanges {
-
   @Input() totalBytes: number;
   @Input() usedBytes: number;
 
@@ -14,12 +13,11 @@ export class UsageBarComponent implements OnChanges {
   freePercentage: number;
   freeBytes: number;
 
-  constructor() { }
+  constructor() {}
 
   ngOnChanges() {
     this.usedPercentage = Math.round(this.usedBytes / this.totalBytes * 100);
     this.freePercentage = 100 - this.usedPercentage;
     this.freeBytes = this.totalBytes - this.usedBytes;
   }
-
 }
index 56962f3da69ff99a7962536ef16b8685132fe149..9b6552dd93c33e47d840ac9c25102180fdf23c69 100644 (file)
@@ -1,7 +1,5 @@
 import { ElementRef } from '@angular/core';
 
-import * as _ from 'lodash';
-
 export class ChartTooltip {
   tooltipEl: any;
   chartEl: any;
@@ -57,13 +55,13 @@ export class ChartTooltip {
     // Set Text
     if (tooltip.body) {
       const titleLines = tooltip.title || [];
-      const bodyLines = tooltip.body.map(bodyItem => {
+      const bodyLines = tooltip.body.map((bodyItem) => {
         return bodyItem.lines;
       });
 
       let innerHtml = '<thead>';
 
-      titleLines.forEach(title => {
+      titleLines.forEach((title) => {
         innerHtml += '<tr><th>' + this.getTitle(title) + '</th></tr>';
       });
       innerHtml += '</thead><tbody>';
index 1daa3044c3c8cee0a21750e21df7017d901b1dc2..5e391e97f10d52062ea3dec20061e2fdeb5d6c7a 100644 (file)
@@ -59,7 +59,7 @@ describe('TaskManagerService', () => {
       let called = false;
       taskManagerService.subscribe('foo', {}, () => (called = true));
       const original_subscriptions = _.cloneDeep(taskManagerService.subscriptions);
-      const new_summary = _.assign(summary, {
+      _.assign(summary, {
         executing_tasks: [{ name: 'foo', metadata: {} }],
         finished_tasks: []
       });
index cac1df061dfcfd383ce0b955f1b3ba30fde203cb..b7435e50b7c902dc6a30d17a9046f65db7e95438 100644 (file)
@@ -21,10 +21,9 @@ class TaskSubscription {
 
 @Injectable()
 export class TaskManagerService {
-
   subscriptions: Array<TaskSubscription> = [];
 
-  constructor(private summaryService: SummaryService) {
+  constructor(summaryService: SummaryService) {
     summaryService.summaryData$.subscribe((data: any) => {
       const executingTasks = data.executing_tasks;
       const finishedTasks = data.finished_tasks;
@@ -49,8 +48,7 @@ export class TaskManagerService {
 
   _getTask(subscription: TaskSubscription, tasks: Array<Task>): Task {
     for (const task of tasks) {
-      if (task.name === subscription.name &&
-        _.isEqual(task.metadata, subscription.metadata)) {
+      if (task.name === subscription.name && _.isEqual(task.metadata, subscription.metadata)) {
         return task;
       }
     }
index d915d4d8fe19e5f29795afc2281e27fe9a1d1916..e76a2d4e266b309a11194ed5969fcd40953a73e1 100644 (file)
@@ -15,7 +15,7 @@
     "indent": [true, "spaces"],
     "interface-over-type-literal": true,
     "label-position": true,
-    "max-line-length": [true, {"limit": 100, "ignore-pattern": "^import |^export {(.*?)}"}],
+    "max-line-length": [true, { "limit": 100, "ignore-pattern": "^import |^export {(.*?)}" }],
     "member-access": false,
     "member-ordering": [
       true,
@@ -42,6 +42,7 @@
     "no-trailing-whitespace": true,
     "no-unnecessary-initializer": true,
     "no-unused-expression": true,
+    "no-unused-variable": true,
     "no-use-before-declare": true,
     "no-var-keyword": true,
     "object-literal-sort-keys": false,